s_id stringlengths 10 10 | p_id stringlengths 6 6 | u_id stringlengths 10 10 | date stringlengths 10 10 | language stringclasses 1
value | original_language stringclasses 11
values | filename_ext stringclasses 1
value | status stringclasses 1
value | cpu_time stringlengths 1 5 | memory stringlengths 1 7 | code_size stringlengths 1 6 | code stringlengths 1 539k |
|---|---|---|---|---|---|---|---|---|---|---|---|
s199012759 | p02556 | u285891772 | 1600025498 | Python | Python (3.8.2) | py | Runtime Error | 1018 | 113360 | 1460 | import sys, re
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, tan, asin, acos, atan, radians, degrees, log2, gcd
from itertools import accumulate, permutations, combinations, combinations_with_replacement, product, groupby
from operator import itemgetter... |
s819162736 | p02556 | u296992541 | 1600025346 | Python | Python (3.8.2) | py | Runtime Error | 27 | 8944 | 286 |
n = int(input())
l = list()
for _ in range(n):
x, y = map(int, input().split())
l.append((x,y))
max_dist = 0
for i in range(n):
for j in range(n):
if i == j:
continue
max_dist = min(max_dist, abs(l[i][0]-l[j][0]) + abs(l[i][1]-l[j][1]))
print(max_dist, end='') |
s504589519 | p02556 | u770293614 | 1600024725 | Python | Python (3.8.2) | py | Runtime Error | 28 | 8932 | 295 | from itertools import permutations
def mahattan([x1,y1],[x2,y2]):
return(abs(x1-x2)+abs(y1-y2))
N=input()
coors=[]
for i in range(N):
coors.append([map(int,input().split(" "))])
perm=permutations(coors,2)
most=0
for coor_pair in perm:
v,w=coor_pair
most=max(most,mahattan(v,w))
print(most) |
s118516481 | p02557 | u086503932 | 1600738941 | Python | Python (3.8.2) | py | Runtime Error | 347 | 83296 | 673 | #!/usr/bin/env python3
from collections import Counter
INF = 1e12
def main():
N = int(input())
A = list(map(int, input().split()))
B = list(map(int, input().split()))
lA = Counter(A)
lB = Counter(B)
if max(Counter(A+B).values()) > N:
print('No')
exit(1)
C = [0] * (N + 1)
... |
s059767252 | p02557 | u912862653 | 1600726268 | Python | PyPy3 (7.3.0) | py | Runtime Error | 187 | 130900 | 669 | from functools import reduce
from fractions import gcd
import math
import bisect
import itertools
import sys
input = sys.stdin.readline
INF = float("inf")
# 処理内容
def main():
N = int(input())
A = list(map(int, input().split()))
B = list(map(int, input().split()))
C = [0] * N
D = [0] * N
for i... |
s598548284 | p02557 | u921676506 | 1600692251 | Python | Python (3.8.2) | py | Runtime Error | 28 | 9024 | 384 | N = int(input())
A = map(int, input().split())
B = map(int, input().split())
C = B
buff = 0
maxi = 0
for k in range N:
for i in range N:
if (A[i] == k):
buff++
if (B[i] == k):
buff++
maxi = max(maxi, buff)
if (buff > N):
print(No)
k = N + 1
else:
buff = 0
if (buff == 0):
print(... |
s164311043 | p02557 | u730769327 | 1600604131 | Python | PyPy3 (7.3.0) | py | Runtime Error | 297 | 153028 | 380 | from collections import*
from bisect import*
n=int(input())
a=list(map(int,input().split()))
b=list(map(int,input().split()))
ca=Counter(a)
cb=Counter(b)
for i in a:
if ca[i]+cb[i]>n:
print('No')
exiit()
print('Yes')
ba=[bisect(a,i+1) for i in range(n)]
bb=[bisect_left(b,i+1) for i in range(n)]
i=0
for x,y in... |
s928913857 | p02557 | u413165887 | 1600474674 | Python | PyPy3 (7.3.0) | py | Runtime Error | 150 | 112588 | 402 | n = int(input())
a = list(map(int,input().split()))
from collections import deque
d = deque(list(map(int, input().split())))
r = []
for i in range(n):
c = 0
x = d.pop()
while x == a[i]:
d.appendleft(x)
x = d.pop()
c += 1
if c == n-i+1:
import sys
print... |
s179323920 | p02557 | u364693468 | 1600456771 | Python | PyPy3 (7.3.0) | py | Runtime Error | 387 | 175972 | 1444 | import bisect, collections, copy, heapq, itertools, math, string
import sys
def I(): return int(sys.stdin.readline().rstrip())
def MI(): return map(int, sys.stdin.readline().rstrip().split())
def LI(): return list(map(int, sys.stdin.readline().rstrip().split()))
def S(): return sys.stdin.readline().rstrip()
def LS(): r... |
s443573414 | p02557 | u848097937 | 1600454461 | Python | PyPy2 (7.3.0) | py | Runtime Error | 353 | 84664 | 1578 | import sys
readline = sys.stdin.readline
MOD = 10 ** 9 + 7
INF = float('INF')
sys.setrecursionlimit(10 ** 5)
def main():
from collections import Counter
N = int(readline())
a = list(map(int, readline().split()))
b = list(map(int, readline().split()))
cnt_a = Counter(a)
cnt_b = Counter(... |
s760882110 | p02557 | u848097937 | 1600454437 | Python | PyPy3 (7.3.0) | py | Runtime Error | 94 | 74708 | 1578 | import sys
readline = sys.stdin.readline
MOD = 10 ** 9 + 7
INF = float('INF')
sys.setrecursionlimit(10 ** 5)
def main():
from collections import Counter
N = int(readline())
a = list(map(int, readline().split()))
b = list(map(int, readline().split()))
cnt_a = Counter(a)
cnt_b = Counter(... |
s350269147 | p02557 | u358254559 | 1600452600 | Python | PyPy3 (7.3.0) | py | Runtime Error | 288 | 223216 | 697 | n = int(input())
a = list(map(int, input().split()))
b = list(map(int, input().split()))
import collections
ac = collections.Counter(a)
bc = collections.Counter(b)
for i in range(1,n+1):
if ac[i] + bc[i] > n:
print("No")
exit()
dup_lis = []
for i in range(n):
if a[i] == b[i]:
dup_lis.... |
s624903983 | p02557 | u364693468 | 1600436169 | Python | PyPy3 (7.3.0) | py | Runtime Error | 2212 | 236988 | 1806 | import bisect, collections, copy, heapq, itertools, math, string
import sys
def I(): return int(sys.stdin.readline().rstrip())
def MI(): return map(int, sys.stdin.readline().rstrip().split())
def LI(): return list(map(int, sys.stdin.readline().rstrip().split()))
def S(): return sys.stdin.readline().rstrip()
def LS(): r... |
s517047238 | p02557 | u509309113 | 1600427808 | Python | PyPy3 (7.3.0) | py | Runtime Error | 119 | 74668 | 807 | import numpy as np
n = int(input())
a = list(map(int, input().split(" ")))
b = list(map(int, input().split(" ")))
diffirence = 0
status ="yes"
for i in range(n + 1) :
if (a.count(i) + b.count(i)) > n :
print("No")
status = "no"
break
right_a = [j for j, x in enumerate(a) if x == i]
... |
s793055545 | p02557 | u509309113 | 1600427778 | Python | PyPy3 (7.3.0) | py | Runtime Error | 87 | 74732 | 807 | import numpy as np
n = int(input())
a = list(map(int, input().split(" ")))
b = list(map(int, input().split(" ")))
diffirence = 0
status ="yes"
for i in range(n + 1) :
if (a.count(i) + b.count(i)) > n :
print("No")
status = "no"
break
right_a = [j for j, x in enumerate(a) if x == i]
... |
s908045314 | p02557 | u509309113 | 1600427669 | Python | PyPy3 (7.3.0) | py | Runtime Error | 103 | 74740 | 806 | import numpy as np
n = int(input())
a = list(map(int, input().split(" ")))
b = list(map(int, input().split(" ")))
diffirence = 0
status ="es"
for i in range(n + 1) :
if (a.count(i) + b.count(i)) > n :
print("No")
status = "no"
break
right_a = [j for j, x in enumerate(a) if x == i]
... |
s702840007 | p02557 | u364693468 | 1600386570 | Python | PyPy3 (7.3.0) | py | Runtime Error | 447 | 186748 | 1437 | import bisect, collections, copy, heapq, itertools, math, string
import sys
def I(): return int(sys.stdin.readline().rstrip())
def MI(): return map(int, sys.stdin.readline().rstrip().split())
def LI(): return list(map(int, sys.stdin.readline().rstrip().split()))
def S(): return sys.stdin.readline().rstrip()
def LS(): r... |
s841115782 | p02557 | u364693468 | 1600386247 | Python | PyPy3 (7.3.0) | py | Runtime Error | 454 | 204384 | 1436 | import bisect, collections, copy, heapq, itertools, math, string
import sys
def I(): return int(sys.stdin.readline().rstrip())
def MI(): return map(int, sys.stdin.readline().rstrip().split())
def LI(): return list(map(int, sys.stdin.readline().rstrip().split()))
def S(): return sys.stdin.readline().rstrip()
def LS(): r... |
s430430042 | p02557 | u107639613 | 1600384162 | Python | PyPy3 (7.3.0) | py | Runtime Error | 2211 | 343220 | 4598 | import sys
from collections import defaultdict
def input(): return sys.stdin.readline().strip()
def main():
N = int(input())
A = list(map(int, input().split()))
B = list(map(int, input().split()))
"""
2つのリストの関係を調べる云々は「二部グラフの完全マッチング問題」というカテゴリ名で呼ばれる。
そしてこれに対しては「Hallの定理」というのが有効らしい。高校数学の美しい物語参照。
... |
s555648682 | p02557 | u672906805 | 1600373953 | Python | Python (3.8.2) | py | Runtime Error | 199 | 42872 | 1130 | #!/usr/bin/env python
def main():
n = int(input())
a = list(map(int, input().split()))
b = list(map(int, input().split()))
b = list(reversed(b))
bad = next((x for x, y in zip(a, b) if x == y), None)
if bad is None:
print(' '.join(map(str, b)))
else:
l_1 = sum(1 for x, y in ... |
s807175346 | p02557 | u364693468 | 1600366170 | Python | PyPy3 (7.3.0) | py | Runtime Error | 437 | 198228 | 1462 | import bisect, collections, copy, heapq, itertools, math, string
import sys
def I(): return int(sys.stdin.readline().rstrip())
def MI(): return map(int, sys.stdin.readline().rstrip().split())
def LI(): return list(map(int, sys.stdin.readline().rstrip().split()))
def S(): return sys.stdin.readline().rstrip()
def LS(): r... |
s508085723 | p02557 | u364693468 | 1600364980 | Python | PyPy3 (7.3.0) | py | Runtime Error | 309 | 173980 | 1251 | import bisect, collections, copy, heapq, itertools, math, string
import sys
def I(): return int(sys.stdin.readline().rstrip())
def MI(): return map(int, sys.stdin.readline().rstrip().split())
def LI(): return list(map(int, sys.stdin.readline().rstrip().split()))
def S(): return sys.stdin.readline().rstrip()
def LS(): r... |
s262676836 | p02557 | u364693468 | 1600361783 | Python | PyPy3 (7.3.0) | py | Runtime Error | 319 | 165560 | 1243 | import bisect, collections, copy, heapq, itertools, math, string
import sys
def I(): return int(sys.stdin.readline().rstrip())
def MI(): return map(int, sys.stdin.readline().rstrip().split())
def LI(): return list(map(int, sys.stdin.readline().rstrip().split()))
def S(): return sys.stdin.readline().rstrip()
def LS(): r... |
s676226093 | p02557 | u026788530 | 1600343266 | Python | Python (3.8.2) | py | Runtime Error | 434 | 60584 | 464 | n=int(input())
a=[int(_) for _ in input().split()]
b=[int(_) for _ in input().split()]
d_a={}
d_b={}
for i in range(n):
d_a[i]=0
d_b[i]=0
for i in range(n):
d_a[a[i]]+=1
d_b[b[i]]+=1
diff=0
for i in range(n):
if d_a[i]+d_b[i]>n:
print("No")
exit()
diff = max(diff,abs(d_a[i]-... |
s876980331 | p02557 | u724687935 | 1600316113 | Python | PyPy3 (7.3.0) | py | Runtime Error | 239 | 191136 | 451 | from collections import Counter
N = int(input())
A = list(map(int, input().split()))
B = list(map(int, input().split()))
AC = Counter(A)
BC = Counter(B)
if N < max((AC + BC).values()):
print('No')
exit()
a = 0
b = 0
while a < N:
if A[a] == B[a]:
while A[a] == B[b] or A[b] == B[a]:
b =... |
s650511215 | p02557 | u348805958 | 1600293921 | Python | PyPy3 (7.3.0) | py | Runtime Error | 300 | 152096 | 986 | #!python3
import sys
iim = lambda: map(int, sys.stdin.readline().rstrip().split())
from collections import Counter
def resolve():
N = int(input())
A = input()
B = input()
if A[-1] < B[0] or A[0] > B[-1]:
print("Yes")
print(B)
return
sa = A.split()
A = Counter(sa)
... |
s291217458 | p02557 | u592826944 | 1600278051 | Python | PyPy3 (7.3.0) | py | Runtime Error | 262 | 132504 | 2639 | # cook your dish here
import sys,math
try:sys.stdin,sys.stdout=open('input.txt','r'),open('out.txt','w')
except:pass
from sys import stdin,stdout;mod=int(1e9 + 7);from statistics import mode
from collections import *;from math import ceil,floor,inf,factorial,gcd,log2,sqrt,log
ii1=lambda:int(stdin.readline().strip())
is... |
s860372145 | p02557 | u651663683 | 1600274459 | Python | PyPy3 (7.3.0) | py | Runtime Error | 385 | 173580 | 1193 | n=int(input())
a=list(map(int,input().split()))
b=list(map(int,input().split()))
d={}
for i in a:
if i in d:
d[i][0]+=1
else:
d[i]=[1,0]
for i in b:
if i in d:
d[i][0]+=1
d[i][1]+=1
else:
d[i]=[1,1]
l=[]
for i in d:
l.append([d[i][0],i,d[i][1]])
l.sort()
l.reverse()
if l[0][0]>n:
print... |
s323922028 | p02557 | u694665829 | 1600265010 | Python | Python (3.8.2) | py | Runtime Error | 106 | 40292 | 597 | def solve():
n = int(input())
a = list(map(int,input().split()))
b = list(map(int,input().split()))
b = b[::-1]
l = []
num -= 1
for i in range(n):
if a[i] == b[i]:
l.append(i)
num = a[i]
ind = 0
for i in range(n):
if b[i] != num a... |
s297880482 | p02557 | u515740713 | 1600235676 | Python | PyPy3 (7.3.0) | py | Runtime Error | 665 | 160804 | 1410 | # -*- coding: utf-8 -*-
#<参考>https://atcoder.jp/contests/abc178/submissions/16700679
import sys
from heapq import *
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
N = int(readline())
A = list(map(int,readline().split()))
B = list(map(int,readline().split()))
... |
s791684575 | p02557 | u515740713 | 1600235437 | Python | PyPy3 (7.3.0) | py | Runtime Error | 630 | 162804 | 1362 | # -*- coding: utf-8 -*-
#<参考>https://atcoder.jp/contests/abc178/submissions/16700679
import sys
from heapq import *
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
N = int(readline())
A = list(map(int,readline().split()))
B = list(map(int,readline().split()))
... |
s684789628 | p02557 | u559315737 | 1600198989 | Python | PyPy3 (7.3.0) | py | Runtime Error | 228 | 178560 | 970 | from collections import defaultdict
def solve(N,A,B):
d1=defaultdict(int)
d2=defaultdict(int)
for i in range(N):
d1[A[i]]+=1
d2[B[i]]+=1
for i in d1:
if d1[i]+d2[i]>N:
return "No",[]
else:
return "Yes",B[::-1]
if __name__ == "__main__":
N=int(inpu... |
s336426725 | p02557 | u505830998 | 1600165983 | Python | PyPy3 (7.3.0) | py | Runtime Error | 607 | 169912 | 3132 | import sys
import collections
import queue
input_methods=['clipboard','file','key']
using_method=1
input_method=input_methods[using_method]
tin=lambda : map(int, input().split())
lin=lambda : list(tin())
mod=1000000007
#+++++
def main():
n = int(input())
#b , c = tin()
#s = input()
al = lin()
bl = lin()
al_c... |
s475080479 | p02557 | u893063840 | 1600162644 | Python | Python (3.8.2) | py | Runtime Error | 269 | 57076 | 504 | from collections import Counter
n = int(input())
a = list(map(int, input().split()))
b = list(map(int, input().split()))
ca = Counter(a)
cb = Counter(b)
for ka, va in ca.items():
vb = cb[ka]
if va + vb > n:
print("No")
exit()
print("Yes")
ans = [0] * n
i = 0
for j, e in enumerate(b):
whi... |
s816896800 | p02557 | u893063840 | 1600161333 | Python | Python (3.8.2) | py | Runtime Error | 178 | 56308 | 269 | from collections import Counter
n = int(input())
a = list(map(int, input().split()))
b = list(map(int, input().split()))
ca = Counter(a)
cb = Counter(b)
for ka, va in ca.items():
vb = cb[ka]
if va + vb > n:
print("No")
exit()
raise Exception |
s464442936 | p02557 | u505830998 | 1600160976 | Python | PyPy3 (7.3.0) | py | Runtime Error | 589 | 169524 | 1967 | import sys
import collections
import queue
input_methods=['clipboard','file','key']
using_method=1
input_method=input_methods[using_method]
tin=lambda : map(int, input().split())
lin=lambda : list(tin())
mod=1000000007
#+++++
def main():
n = int(input())
#b , c = tin()
#s = input()
al = lin()
bl = lin()
al_c... |
s508218130 | p02557 | u761320129 | 1600152016 | Python | Python (3.8.2) | py | Runtime Error | 200 | 41640 | 752 | import sys
input = sys.stdin.readline
N = int(input())
A = list(map(int,input().split()))
B = list(map(int,input().split()))
RB = B[::-1]
start = v = -1
seq = 0
for i,(a,b) in enumerate(zip(A,RB)):
if a==b:
v = a
seq += 1
if start == -1:
start = i
if v == -1:
print('Yes')
... |
s368641594 | p02557 | u600402037 | 1600148666 | Python | Python (3.8.2) | py | Runtime Error | 26 | 9004 | 1930 | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (n); ++i)
#define sz(x) int(x.size())
#define show(x) {for(auto i: x){cout << i << " ";} cout << endl;}
using namespace std;
using ll = long long;
using P = pair<int, int>;
int main() {
// 一番多いもの、reverseした後一番多いものをずらす、あとはずらすのは一箇所のみ
int N;
cin >>... |
s495596442 | p02557 | u505830998 | 1600145849 | Python | PyPy3 (7.3.0) | py | Runtime Error | 2208 | 169372 | 1905 | import sys
import collections
import queue
input_methods=['clipboard','file','key']
using_method=0
input_method=input_methods[using_method]
tin=lambda : map(int, input().split())
lin=lambda : list(tin())
mod=1000000007
#+++++
def main():
n = int(input())
#b , c = tin()
#s = input()
al = lin()
bl = lin()
al_c... |
s066798196 | p02557 | u366558796 | 1600122891 | Python | Python (3.8.2) | py | Runtime Error | 166 | 40360 | 521 | import sys; input = sys.stdin.readline
n = int(input())
A = list(map(int, input().split()))
B = sorted(map(int, input().split()), reverse=True)
v, c = -1, 0
for i in range(n):
if A[i] == B[i]:
v = i
while i<n and A[i] == B[i]: i+=1
c = i-v+1
break
if c == 0: print("YES"); print(*B)
elif c>n//2: print("NO")
e... |
s695996718 | p02557 | u559315737 | 1600119652 | Python | PyPy3 (7.3.0) | py | Runtime Error | 199 | 146600 | 685 | from collections import defaultdict
N=int(input())
A=[int(i) for i in input().split()][:N]
B=[int(i) for i in input().split()][:N]
arr=[0]*N
d=defaultdict(int)
for i in range(N):
if A[i]==B[i]:
d[B[i]]+=1
l=list(d.keys())
x=l.pop()
i=0
while i<N:
if A[i]!=B[i]:
#d[B[i]]-=1
arr[i]=B[i]
i+=1
else:
... |
s331180757 | p02557 | u285681431 | 1600111097 | Python | PyPy3 (7.3.0) | py | Runtime Error | 235 | 191960 | 553 | """
T E S T
"""
from collections import Counter, deque
N = int(input())
A = list(map(int, input().split()))
B = list(map(int, input().split()))
cnt_a = Counter(A)
cnt_b = Counter(B)
cnt_ab = cnt_a + cnt_b
for i in cnt_ab.values():
if i > N:
print("No")
exit()
print("Yes")
dq_a = deque(A)
dq_b... |
s548354919 | p02557 | u285681431 | 1600111072 | Python | PyPy3 (7.3.0) | py | Runtime Error | 238 | 191900 | 550 | """
T E S T
"""
from collections import Counter, deque
N = int(input())
A = list(map(int, input().split()))
B = list(map(int, input().split()))
cnt_a = Counter(A)
cnt_b = Counter(B)
cnt_ab = cnt_a + cnt_b
for i in cnt_ab.values():
if i > N:
print("No")
exit()
print("Yes")
dq_a = deque(A)
dq_b... |
s581363676 | p02557 | u667084803 | 1600106571 | Python | Python (3.8.2) | py | Runtime Error | 385 | 52548 | 581 | from collections import Counter, deque
N = int(input())
A = list(map(int, input().split())) + [N+1]
B = list(map(int, input().split())) + [N+1]
C = [0]
D = [0]
AB_cn = Counter(A+B)
if AB_cn.most_common()[0][1] > N:
print("No")
else:
print("Yes")
for i in range(N+1):
if len(C) != A[i]:
... |
s645392405 | p02557 | u703950586 | 1600106373 | Python | PyPy3 (7.3.0) | py | Runtime Error | 188 | 116576 | 631 | import sys,queue,math,copy,itertools,bisect,collections,heapq
def main():
LI = lambda : [int(x) for x in sys.stdin.readline().split()]
NI = lambda : int(sys.stdin.readline())
N = NI()
A = LI()
B = LI()
mb = B[-1]
s = 0
for i in range(N):
if A[i] == B[i]:
if B[i] < m... |
s742406671 | p02557 | u044220565 | 1600097532 | Python | Python (3.8.2) | py | Runtime Error | 613 | 106928 | 3586 | # coding: utf-8
import sys
#from operator import itemgetter
sysread = sys.stdin.buffer.readline
read = sys.stdin.buffer.read
#from heapq import heappop, heappush
from collections import defaultdict
sys.setrecursionlimit(10**7)
#import math
#from itertools import product, accumulate, combinations, product
#import bisect... |
s627050995 | p02557 | u761320129 | 1600097316 | Python | Python (3.8.2) | py | Runtime Error | 196 | 41616 | 714 | import sys
input = sys.stdin.readline
N = int(input())
A = list(map(int,input().split()))
B = list(map(int,input().split()))
RB = B[::-1]
start = -1
seq = 0
for i,(a,b) in enumerate(zip(A,RB)):
if a==b:
if start == -1:
start = i
seq += 1
if start == -1:
print('Yes')
print(*RB)
... |
s993134566 | p02557 | u761320129 | 1600096916 | Python | Python (3.8.2) | py | Runtime Error | 191 | 41276 | 680 | import sys
input = sys.stdin.readline
N = int(input())
A = list(map(int,input().split()))
B = list(map(int,input().split()))
B.reverse()
start = -1
seq = 0
for i,(a,b) in enumerate(zip(A,B)):
if a==b:
if start == -1:
start = i
seq += 1
if start == -1:
print('Yes')
print(*B)
... |
s397081929 | p02557 | u761320129 | 1600096417 | Python | Python (3.8.2) | py | Runtime Error | 194 | 40012 | 619 | import sys
input = sys.stdin.readline
N = int(input())
A = list(map(int,input().split()))
B = list(map(int,input().split()))
B.reverse()
start = -1
seq = 0
for i,(a,b) in enumerate(zip(A,B)):
if a==b:
if start == -1:
start = i
seq += 1
if start == -1:
print('Yes')
print(*B)
... |
s395772369 | p02557 | u581187895 | 1600091663 | Python | Python (3.8.2) | py | Runtime Error | 279 | 52468 | 625 |
from collections import Counter
def resolve():
N = int(input())
A = list(map(int, input().split()))
B = list(map(int, input().split()))
CNT = Counter(A + B)
num = CNT.most_common()[0][1]
if num > N:
print("No")
return
j = 0
for i in range(N):
if A[i] == B[i]:
... |
s772286071 | p02557 | u581187895 | 1600091615 | Python | Python (3.8.2) | py | Runtime Error | 287 | 52412 | 625 |
from collections import Counter
def resolve():
N = int(input())
A = list(map(int, input().split()))
B = list(map(int, input().split()))
CNT = Counter(A + B)
num = CNT.most_common()[0][1]
if num > N:
print("No")
return
j = 0
for i in range(N):
if A[i] == B[i]:
... |
s632910900 | p02557 | u438720156 | 1600089430 | Python | Python (3.8.2) | py | Runtime Error | 112 | 40340 | 590 | flag=0
def permute(p2,l,r):
global flag
if l==r and flag==0:
count=0
for i in range(n):
if p1[i]!=p2[i]:
count+=1
else:
break
if count==n:
flag=1
print("Yes")
for i in range(n):
print(p2[i],end=" ")
else:
for i in range(l,r+1):
p2[l],p2[i]... |
s062867426 | p02557 | u392319141 | 1600086842 | Python | Python (3.8.2) | py | Runtime Error | 400 | 92080 | 558 | N = int(input())
A = list(map(int, input().split()))
B = list(map(int, input().split()))
AB = [(a, i, 0) for i, a in enumerate(A)] + [(b, i, 1) for i, b in enumerate(B)]
AB.sort()
X = AB[:N]
Y = AB[N:]
if any(x[0] == y[0] for x, y in zip(X, Y)):
print('No')
exit()
ans = [-1] * N
swap = []
for (_, i, sx), (... |
s891961078 | p02557 | u392319141 | 1600086792 | Python | Python (3.8.2) | py | Runtime Error | 449 | 95392 | 630 | N = int(input())
A = list(map(int, input().split()))
B = list(map(int, input().split()))
AB = [(a, i, 0) for i, a in enumerate(A)] + [(b, i, 1) for i, b in enumerate(B)]
AB.sort()
X = AB[:N]
Y = AB[N:]
if any(x[0] == y[0] for x, y in zip(X, Y)):
print('No')
exit()
ans = [-1] * N
swap = []
for (_, i, sx), (... |
s816839710 | p02557 | u392319141 | 1600086673 | Python | Python (3.8.2) | py | Runtime Error | 466 | 95392 | 627 | N = int(input())
A = list(map(int, input().split()))
B = list(map(int, input().split()))
AB = [(a, i, 0) for i, a in enumerate(A)] + [(b, i, 1) for i, b in enumerate(B)]
AB.sort()
X = AB[:N]
Y = AB[N:]
if any(x[0] == y[0] for x, y in zip(X, Y)):
print('No')
exit()
ans = [-1] * N
swap = []
for (_, i, sx), (... |
s927111005 | p02557 | u392319141 | 1600086641 | Python | Python (3.8.2) | py | Runtime Error | 453 | 95500 | 609 | N = int(input())
A = list(map(int, input().split()))
B = list(map(int, input().split()))
AB = [(a, i, 0) for i, a in enumerate(A)] + [(b, i, 1) for i, b in enumerate(B)]
AB.sort()
X = AB[:N]
Y = AB[N:]
if any(x[0] == y[0] for x, y in zip(X, Y)):
print('No')
exit()
ans = [-1] * N
swap = []
for (_, i, sx), (... |
s400600235 | p02557 | u392319141 | 1600085700 | Python | Python (3.8.2) | py | Runtime Error | 257 | 70184 | 670 | N = int(input())
A = list(map(int, input().split()))
B = list(map(int, input().split()))
AB = [(a, i, 0) for i, a in enumerate(A)] + [(b, i, 1) for i, b in enumerate(B)]
AB.sort()
X = AB[:N]
Y = AB[N:]
if any(x[0] == y[0] for x, y in zip(X, Y)):
print('No')
exit()
print('No')
1 / 0
ans = [-1] * N
for (x, ... |
s161471391 | p02557 | u392319141 | 1600085689 | Python | Python (3.8.2) | py | Runtime Error | 244 | 71160 | 658 | N = int(input())
A = list(map(int, input().split()))
B = list(map(int, input().split()))
AB = [(a, i, 0) for i, a in enumerate(A)] + [(b, i, 1) for i, b in enumerate(B)]
AB.sort()
X = AB[:N]
Y = AB[N:]
if any(x[0] == y[0] for x, y in zip(X, Y)):
print('No')
exit()
1 / 0
ans = [-1] * N
for (x, i, sx), (y, ... |
s849274232 | p02557 | u519339498 | 1600085480 | Python | Python (3.8.2) | py | Runtime Error | 108 | 40004 | 429 | import sys
pin=sys.stdin.readline
N=int(pin())
A=list(map(int,pin().split()))
B=list(map(int,pin().split()))
C=reversed(B)
for i in range(N):
if A[i]==C[i]:
break
else:
print("Yes")
for k in C:
sys.stdout.write(f"{k} ")
print()
sys.exit()
D=B[N//2:]+B[:N//2]
for j in range(N):
if A[j]==D[j]:
p... |
s951173604 | p02557 | u392319141 | 1600084173 | Python | Python (3.8.2) | py | Runtime Error | 227 | 81728 | 280 | from collections import Counter
N = int(input())
A = list(map(int, input().split()))
B = list(map(int, input().split()))
cntA = Counter(A)
cntB = Counter(B)
V = set(A) & set(B)
mx = max(min(cntA[v], cntB[v]) for v in V)
if mx > N // 2:
print('No')
exit()
print('No')
|
s807152559 | p02557 | u392319141 | 1600084162 | Python | Python (3.8.2) | py | Runtime Error | 222 | 81244 | 290 | from collections import Counter
N = int(input())
A = list(map(int, input().split()))
B = list(map(int, input().split()))
cntA = Counter(A)
cntB = Counter(B)
V = set(A) & set(B)
mx = max(min(cntA[v], cntB[v]) for v in V)
if mx > N // 2:
print('No')
exit()
a = 1 / 0
print('No')
|
s446078386 | p02557 | u436519884 | 1600083921 | Python | PyPy3 (7.3.0) | py | Runtime Error | 88 | 74668 | 506 | n=int(input())
arr=list(map(int,input().split()))
brr=list(map(int,input().split()))[::-1]
start=end=-1
for i,val in range(n):
if arr[i]==brr[i]:
if start==-1:
start=end=i
else:
end=i
if start==-1:
print('Yes')
print(*brr)
else:
i=0
while i<n and start<=end:
if brr[i]!=arr[end] and arr... |
s902475611 | p02557 | u440566786 | 1600076743 | Python | PyPy3 (7.3.0) | py | Runtime Error | 91 | 74712 | 435 | from time import time
from random import randrange
n = int(input())
A = list(map(int, input().split()))
B = list(map(int, input().split()))
start = time()
for i in range(n):
if A[i] != B[i]:
continue
while time() - start < 1.8:
j = randrange(n)
if A[i] != B[j] and A[j] != B[i]:
... |
s940136129 | p02557 | u438720156 | 1600076493 | Python | Python (3.8.2) | py | Runtime Error | 118 | 40096 | 570 | flag=0
def permute(p2,l,r):
global flag
if l==r and flag==0:
count=0
for i in range(n):
if p1[i]!=p2[i]:
count+=1
else:
break
if count==n:
flag=1
print("Yes")
for i in range(n):
print(p2[i],end=" ")
else:
for i in range(l,r+1):
p2[l],p2[i]... |
s181822191 | p02557 | u438720156 | 1600076308 | Python | Python (3.8.2) | py | Runtime Error | 116 | 40340 | 590 | flag=0
def permute(p2,l,r):
global flag
if l==r and flag==0:
count=0
for i in range(n):
if p1[i]!=p2[i]:
count+=1
else:
break
if count==n:
flag=1
print("Yes")
for i in range(n):
print(p2[i],end=" ")
else:
for i in range(l,r+1):
p2[l],p2[i]... |
s869048627 | p02557 | u350093546 | 1600076281 | Python | PyPy3 (7.3.0) | py | Runtime Error | 2210 | 175904 | 947 | from math import ceil
from collections import defaultdict
n=int(input())
a=list(map(int,input().split()))
b=list(map(int,input().split()))
dict1=defaultdict()
dict2=defaultdict()
lst1=list(set(a))
lst2=list(set(b))
for i in lst1:
dict1.setdefault(i,0)
for i in lst2:
dict2.setdefault(i,0)
for i in a:
dic... |
s726597714 | p02557 | u350093546 | 1600076227 | Python | PyPy3 (7.3.0) | py | Runtime Error | 2209 | 176048 | 944 | from math import ceil
from collections import defaultdict
n=int(input())
a=list(map(int,input().split()))
b=list(map(int,input().split()))
dict1=defaultdict()
dict2=defaultdict()
lst1=list(set(a))
lst2=list(set(b))
for i in lst1:
dict1.setdefault(i,0)
for i in lst2:
dict2.setdefault(i,0)
for i in a:
dic... |
s233099545 | p02557 | u368796742 | 1600073147 | Python | Python (3.8.2) | py | Runtime Error | 255 | 42004 | 453 | n = int(input())
a = list(map(int,input().split()))
b = list(map(int,input().split()))
ca = [0]*(n+1)
cb = [0]*(n+1)
for i in a:
ca[i] += 1
for i in b:
cb[i] += 1
ma = 0
ind = -1
for i in range(n+1):
if ca[i]+cb[i]> ma:
ma = ca[i]+cb[i]
ind = i
if ma > n:
print("No")
exi... |
s798743193 | p02557 | u777496561 | 1600040784 | Python | Python (3.8.2) | py | Runtime Error | 666 | 86948 | 1009 | from collections import Counter
import bisect
n = int(input())
a = list(map(int, input().split()))
b = list(map(int, input().split()))
heap = Counter()
li1 = []
for i in range(n):
if a[i]!=b[i]:
li1.append((a[i], b[i]))
else:
heap[a[i]]+=1
arr = []
sm = 0
mx = float('-inf')
for k,v in heap.i... |
s144200905 | p02557 | u777496561 | 1600040662 | Python | Python (3.8.2) | py | Runtime Error | 654 | 87256 | 950 | from collections import Counter
import bisect
n = int(input())
a = list(map(int, input().split()))
b = list(map(int, input().split()))
heap = Counter()
li1 = []
for i in range(n):
if a[i]!=b[i]:
li1.append((a[i], b[i]))
else:
heap[a[i]]+=1
arr = []
sm = 0
mx = float('-inf')
for k,v in heap.i... |
s064955004 | p02557 | u169350228 | 1600038122 | Python | PyPy3 (7.3.0) | py | Runtime Error | 393 | 141336 | 1756 | '''
自宅用PCでの解答
'''
import math
#import numpy as np
import itertools
import queue
import bisect
from collections import deque,defaultdict
import heapq as hpq
from sys import stdin,setrecursionlimit
#from scipy.sparse.csgraph import dijkstra
#from scipy.sparse import csr_matrix
ipt = stdin.readline
setrecursionlimit(10**7... |
s438335514 | p02557 | u588341295 | 1600037913 | Python | PyPy3 (7.3.0) | py | Runtime Error | 624 | 189504 | 1388 | import sys
from collections import Counter
from random import randrange
def input(): return sys.stdin.readline().strip()
def list2d(a, b, c): return [[c for j in range(b)] for i in range(a)]
def list3d(a, b, c, d): return [[[d for k in range(c)] for j in range(b)] for i in range(a)]
def list4d(a, b, c, d, e): return [... |
s143515410 | p02557 | u667469290 | 1600036832 | Python | Python (3.8.2) | py | Runtime Error | 2212 | 169936 | 1368 | # -*- coding: utf-8 -*-
from collections import Counter
from heapq import heappush, heappop
import numpy as np
def solve():
N = int(input())
A = tuple(map(int, input().split()))
n_A = Counter(A)
B = tuple(map(int, input().split()))
n_B = dict()
for i,b in enumerate(B):
n_B.setdefault(... |
s515112029 | p02557 | u566159623 | 1600036488 | Python | PyPy3 (7.3.0) | py | Runtime Error | 2366 | 333756 | 621 | from collections import defaultdict
dic = defaultdict(int)
adic = defaultdict(int)
b = True
N = int(input())
A = list(map(int, input().split()))
B = list(map(int, input().split()))
for i in range(N):
dic[A[i]]+=1
dic[B[i]]+=1
adic[A[i]]+=1
if dic[A[i]]>N or dic[B[i]]>N:
b = False
if b:
... |
s064332029 | p02557 | u197457087 | 1600036362 | Python | PyPy3 (7.3.0) | py | Runtime Error | 318 | 178956 | 948 | from collections import defaultdict
dic = defaultdict(int)
N = int(input())
A = list(map(int,input().split()))
B = list(map(int,input().split()))
for x,y in zip(A,B):
dic[x] += 1
dic[y] += 1
L = list(dic.values())
MAX = max(L)
if MAX > N:
print("No"); exit()
INF = float("inf")
dicA_min = defaultdict(lambda: INF);... |
s145543010 | p02557 | u477977638 | 1600035979 | Python | Python (3.8.2) | py | Runtime Error | 1283 | 50476 | 1195 | import sys
input=sys.stdin.buffer.readline
#sys.setrecursionlimit(10**9)
#from functools import lru_cache
def RD(): return sys.stdin.read()
def II(): return int(input())
def MI(): return map(int,input().split())
def MF(): return map(float,input().split())
def LI(): return list(map(int,input().split()))
de... |
s149213712 | p02557 | u342563578 | 1600035930 | Python | PyPy3 (7.3.0) | py | Runtime Error | 213 | 114024 | 750 | n = int(input())
a = list(map(int,input().split()))
b = list(map(int,input().split()))
b.reverse()
p = 1
c = 0
d = 0
for i in range(n):
if a[i] == b[i]:
v = a[i]
h = i
p = 0
break
if p == 1:
print('Yes')
for i in range(n):
print(b[i],end = ' ')
else:
for i in rang... |
s498314439 | p02557 | u342563578 | 1600035863 | Python | PyPy3 (7.3.0) | py | Runtime Error | 221 | 113920 | 750 | n = int(input())
a = list(map(int,input().split()))
b = list(map(int,input().split()))
b.reverse()
p = 1
c = 0
d = 0
for i in range(n):
if a[i] == b[i]:
v = a[i]
h = i
p = 0
break
if p == 1:
print('Yes')
for i in range(n):
print(b[i],end = ' ')
else:
for i in rang... |
s679113490 | p02557 | u342563578 | 1600035830 | Python | PyPy3 (7.3.0) | py | Runtime Error | 88 | 74588 | 750 | n = int(input())
a = list(map(int,input().split()))
b = list(map(int,input().split()))
b.reverse()
p = 1
c = 0
d = 0
for i in range(n):
if a[i] == b[i]:
v = a[i]
h = i
p = 0
break
if p == 1:
print('Yes')
for i in range(n):
print(b[i],end = ' ')
else:
for i in rang... |
s671851009 | p02557 | u163320134 | 1600034830 | Python | Python (3.8.2) | py | Runtime Error | 563 | 57756 | 981 | #!/usr/bin/env python3
import collections
import sys
input=sys.stdin.readline
n=int(input())
arr1=list(map(int,input().split()))
arr2=list(map(int,input().split()))
cnt1=collections.Counter(arr1)
cnt2=collections.Counter(arr2)
ans=[0]*n
acum=0
pos=0
head=[]
for key in cnt1.keys():
tcnt1=cnt1[key]
tcnt2=cnt2[k... |
s229409653 | p02557 | u419978514 | 1600034790 | Python | Python (3.8.2) | py | Runtime Error | 33 | 9096 | 8 | print(a) |
s069946021 | p02557 | u163320134 | 1600034596 | Python | Python (3.8.2) | py | Runtime Error | 458 | 57908 | 1042 | #!/usr/bin/env python3
import collections
import sys
input=sys.stdin.readline
n=int(input())
arr1=list(map(int,input().split()))
arr2=list(map(int,input().split()))
cnt1=collections.Counter(arr1)
cnt2=collections.Counter(arr2)
ans=[0]*n
acum=0
pos=0
head=[]
for key in cnt1.keys():
tcnt1=cnt1[key]
tcnt2=cnt2[k... |
s902296916 | p02557 | u201234972 | 1600034539 | Python | Python (3.8.2) | py | Runtime Error | 201 | 56132 | 1305 | #import sys
#input = sys.stdin.readline
from collections import Counter
def main():
N = int( input())
A = list( map( int, input().split()))
B = list( map( int, input().split()))
CA = Counter(A)
CB = Counter(B)
count = 0
num = 0
for key in CA:
s, t = CA[key], CB[key]
if s ... |
s035082184 | p02557 | u695811449 | 1600034515 | Python | PyPy3 (7.3.0) | py | Runtime Error | 557 | 183444 | 1390 | import sys
input = sys.stdin.readline
N=int(input())
A=list(map(int,input().split()))
B=list(map(int,input().split()))
from collections import Counter
CA=Counter(A)
CB=Counter(B)
H=[]
for ca in CA:
if CA[ca]>0 and CB[ca]>0:
if CA[ca]+CB[ca]>N:
print("No")
sys.exit()
H.ap... |
s085918150 | p02557 | u201234972 | 1600034407 | Python | Python (3.8.2) | py | Runtime Error | 152 | 56348 | 1305 | #import sys
#input = sys.stdin.readline
from collections import Counter
def main():
N = int( input())
A = list( map( int, input().split()))
B = list( map( int, input().split()))
CA = Counter(A)
CB = Counter(B)
count = 0
num = 0
B.sort(reverse=true)
for key in CA:
s, t = CA[ke... |
s633624520 | p02557 | u693566873 | 1600033816 | Python | PyPy3 (7.3.0) | py | Runtime Error | 402 | 207304 | 1541 | import collections
import sys
def solve(n, A, B):
Ac = {}
ABc = {}
Bc = {}
for a in A:
Ac[a] = 1 + Ac.get(a, 0)
ABc[a] = 1 + ABc.get(a, 0)
Bc[a] = 0
for b in B:
Bc[b] = 1 + Bc.get(b, 0)
ABc[b] = 1 + ABc.get(b, 0)
cAB = sorted([(c, ab) for ab, c in ABc.items()])
#print(cAB)
pool = c... |
s715910354 | p02557 | u941407962 | 1600033785 | Python | PyPy3 (7.3.0) | py | Runtime Error | 166 | 115328 | 427 | N, = map(int, input().split())
X = list(map(int, input().split()))
Y = list(map(int, input().split()))[::-1]
z=zc=0
Z = []
for i in range(N):
if X[i]==Y[i]:
zc += 1
z = Y[i]
else:
Z.append(Y[i])
if zc:
if zc%2 == 0:
Z = [z]*(zc//2)+Z+[z]*((zc+1)//2)
else:
2/0
for ... |
s647399701 | p02557 | u129019798 | 1600033670 | Python | Python (3.8.2) | py | Runtime Error | 601 | 122656 | 1762 | def main():#WA(only 1)
import sys
from collections import Counter
N=int(sys.stdin.readline())
A=list(map(int,sys.stdin.readline().split()))
B=list(map(int,sys.stdin.readline().split()))
AC=Counter(A)
BC=Counter(B)
for a in AC:
if a in BC:
if AC[a]+BC[a]>N:
... |
s884432618 | p02557 | u693566873 | 1600033630 | Python | PyPy3 (7.3.0) | py | Runtime Error | 398 | 180176 | 1527 | import collections
import sys
def solve(n, A, B):
Ac = {}
ABc = {}
for a in A:
Ac[a] = 1 + Ac.get(a, 0)
ABc[a] = 1 + ABc.get(a, 0)
Bc = {}
for b in B:
Bc[b] = 1 + Bc.get(b, 0)
ABc[b] = 1 + ABc.get(b, 0)
cAB = sorted([(c, ab) for ab, c in ABc.items()])
#print(cAB)
pool = collections.deq... |
s991620615 | p02557 | u129019798 | 1600033587 | Python | Python (3.8.2) | py | Runtime Error | 583 | 122668 | 1963 | def main():#WA(only 1)
import sys
from collections import Counter
N=int(sys.stdin.readline())
A=list(map(int,sys.stdin.readline().split()))
B=list(map(int,sys.stdin.readline().split()))
AC=Counter(A)
BC=Counter(B)
for a in AC:
if a in BC:
if AC[a]+BC[a]>N:
... |
s461305960 | p02557 | u941407962 | 1600033313 | Python | PyPy3 (7.3.0) | py | Runtime Error | 181 | 115400 | 379 | N, = map(int, input().split())
X = list(map(int, input().split()))
Y = list(map(int, input().split()))[::-1]
z=zc=0
Z = []
for i in range(N):
if X[i]==Y[i]:
zc += 1
z = Y[i]
else:
Z.append(Y[i])
if zc:
Z = [z]*zc//2+Z+[z]*(zc+1)//2
for i in range(N):
if X[i] == Z[i]:
prin... |
s653007962 | p02557 | u163320134 | 1600032874 | Python | Python (3.8.2) | py | Runtime Error | 30 | 9088 | 510 | import collections
n=int(input())
arr1=list(map(int,input().split()))
arr2=list(map(int,input().split()))
cnt1=collections.Counter(arr1)
cnt2=collections.Counter(arr2)
acum1=[0]*(n+1)
acum2=[0]*(n+1)
for i in range(1,n+1):
acum1[i]=acum1[i-1]+cnt1[i]
acum2[i]=acum2[i-1]+cnt1[i]
rotate=0
for i in range(1,n+1):
ro... |
s282501150 | p02557 | u407267131 | 1600032766 | Python | Python (3.8.2) | py | Runtime Error | 2206 | 68516 | 760 | import sys
n = int(input())
a = list(map(int,input().split()))
b = list(map(int,input().split()))
da = {}
db = {}
for i in a:
if i in da:
da[i] += 1
else:
da[i] = 1
for i in b:
if i in db:
db[i] += 1
else:
db[i] = 1
damax = max(da.values())
dbmax = max(db.values())
... |
s812946872 | p02557 | u645855527 | 1600032713 | Python | PyPy3 (7.3.0) | py | Runtime Error | 186 | 132564 | 472 | from collections import Counter
N = int(input())
A = list(map(int, input().split()))
B = list(map(int, input().split()))
c = Counter(A)
c.update(B)
if c.most_common(1)[0][1] > N:
print('No')
exit()
A2 = [0] * (N + 1)
B2 = [0] * (N + 1)
for i in range(N):
A2[A[i]+1] = i+1
B2[B[i]+1] = i+1
offset = -... |
s633067917 | p02557 | u407267131 | 1600032406 | Python | Python (3.8.2) | py | Runtime Error | 2206 | 68000 | 754 | import sys
n = int(input())
a = list(map(int,input().split()))
b = list(map(int,input().split()))
da = {}
db = {}
for i in a:
if i in da:
da[i] += 1
else:
da[i] = 1
for i in b:
if i in db:
db[i] += 1
else:
db[i] = 1
damax = max(da.values())
dbmax = max(db.values())
... |
s908569840 | p02557 | u407267131 | 1600032320 | Python | PyPy3 (7.3.0) | py | Runtime Error | 2209 | 155240 | 754 | import sys
n = int(input())
a = list(map(int,input().split()))
b = list(map(int,input().split()))
da = {}
db = {}
for i in a:
if i in da:
da[i] += 1
else:
da[i] = 1
for i in b:
if i in db:
db[i] += 1
else:
db[i] = 1
damax = max(da.values())
dbmax = max(db.values())
... |
s849112874 | p02557 | u179376941 | 1600032288 | Python | Python (3.8.2) | py | Runtime Error | 279 | 40168 | 470 | n = int(input())
lst_a = [int(i) for i in input().split()]
lst_b = [int(i) for i in input().split()]
j = 0
for i in range(n):
if lst_a[i] != lst_b[i]:
continue
else:
flag = False
while j != n:
if lst_a[i] != lst_b[j]:
lst_b[i], lst_b[j] = lst_b[j], lst_b[i]
flag = True
brea... |
s380397391 | p02557 | u879921371 | 1600031916 | Python | Python (3.8.2) | py | Runtime Error | 30 | 8936 | 147 | import os, sys
if sys.argv[-1] == 'ONLINE_JUDGE':
open('solve.pyx', 'w').write(code)
os.system('cythonize -i -3 -b solve.pyx')
import solve |
s354480700 | p02557 | u585482323 | 1600031876 | Python | PyPy3 (7.3.0) | py | Runtime Error | 2208 | 131964 | 1315 | #!usr/bin/env python3
from collections import defaultdict, deque
from heapq import heappush, heappop
from itertools import permutations, accumulate
import sys
import math
import bisect
def LI(): return [int(x) for x in sys.stdin.readline().split()]
def I(): return int(sys.stdin.readline())
def LS():return [list(x) for ... |
s012897825 | p02557 | u415718506 | 1600031772 | Python | PyPy3 (7.3.0) | py | Runtime Error | 634 | 215108 | 2557 | import sys
import heapq, functools, collections
import math, random
from collections import Counter, defaultdict
# available on Google, not available on Codeforces
# import numpy as np
# import scipy
def solve(arr, brr): # fix inputs here
console(arr)
console(brr)
console("----- solving ------")
c1 ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.