s_id
string
p_id
string
u_id
string
date
string
language
string
original_language
string
filename_ext
string
status
string
cpu_time
string
memory
string
code_size
string
code
string
error
string
stdout
string
s135326811
p02557
u024340351
1600028753
Python
Python (3.8.2)
py
Runtime Error
2207
48492
801
N = int(input()) A = list(map(int, input().split())) B = list(map(int, input().split())) maxAB = max(max(A), max(B)) Avec = [0]*maxAB Bvec = [0]*maxAB for i in range (0, N): Avec[A[i]-1]+=1 Bvec[B[i]-1]+=1 for i in range (0, maxAB): if Avec[i]+Bvec[i] > N: print('No') exit() print('Yes') C = [0]*N i...
Traceback (most recent call last): File "/tmp/tmpmb739hve/tmps6n08wd_.py", line 1, in <module> N = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s447230419
p02557
u620480037
1600028750
Python
PyPy3 (7.3.0)
py
Runtime Error
660
168024
1223
N=int(input()) A=list(map(int,input().split())) B=list(map(int,input().split())) DA={} DB={} for i in range(N): if A[i] not in DA: DA[A[i]]=1 else: DA[A[i]]+=1 if B[i] not in DB: DB[B[i]]=1 else: DB[B[i]]+=1 for k,v in DB.items(): if k not in DA: pass ...
Traceback (most recent call last): File "/tmp/tmpb7iidemq/tmpqz2jmqk0.py", line 1, in <module> N=int(input()) ^^^^^^^ EOFError: EOF when reading a line
s461236790
p02557
u790710233
1600028731
Python
PyPy3 (7.3.0)
py
Runtime Error
262
175908
1062
from collections import Counter, defaultdict, deque n = int(input()) A = list(map(int, input().split())) B = list(map(int, input().split())) Acnt = Counter(A) NG = defaultdict(int) for k, v in Acnt.items(): NG[k] = n-v+1 Bcnt = Counter(B) B = deque(B) newB = [None]*n cnt = 0 is_skip = 0 for i, a in enumerate(A): ...
Traceback (most recent call last): File "/tmp/tmpbc9vecfj/tmptwmcjgci.py", line 2, in <module> n = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s597786629
p02557
u723792785
1600028728
Python
PyPy3 (7.3.0)
py
Runtime Error
2207
142228
756
import random from collections import Counter n = int(input()) a = list(map(int,input().split())) ac = Counter(a) b = list(map(int,input().split())) bc = Counter(b) mode = 1 for i in range(n): if ac[i] > n - bc[i]: mode = 0 break if mode: print("Yes") stack = [] b.reverse() for i in range(n): if a[i] == b[...
Traceback (most recent call last): File "/tmp/tmpz8hnj_pw/tmpuw7854uo.py", line 3, in <module> n = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s560163689
p02557
u948911484
1600028720
Python
PyPy3 (7.3.0)
py
Runtime Error
170
118164
689
import copy n = int(input()) a = list(map(int,input().split())) b = list(map(int,input().split())) la = [0]*(n+1) lb = [0]*(n+1) for i in range(n): la[a[i]] += 1 lb[b[i]] += 1 for i in range(1,n+1): if la[i] > n//2 and lb[i] > n//2: print("No") quit() print("Yes") b = b[::-1] s = 0 for i in ...
Traceback (most recent call last): File "/tmp/tmp042bn2st/tmprfz02miq.py", line 2, in <module> n = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s796135816
p02557
u711539583
1600028700
Python
PyPy3 (7.3.0)
py
Runtime Error
393
133844
752
import heapq import sys n = int(input()) a = list(map(int, input().split())) b = list(map(int, input().split())) c = [] heapq.heapify(b) heapq.heapify(c) ans = [0] * n A = [] for i in range(n): A.append((a[i],i)) A.sort(reverse=True) k = 0 for i in range(n): ai, j = A[i] bi = -1 if c and c[0] != ai: bi ...
Traceback (most recent call last): File "/tmp/tmpiktyz2gg/tmp4nmtpncg.py", line 3, in <module> n = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s722479912
p02557
u438720156
1600028692
Python
Python (3.8.2)
py
Runtime Error
110
41332
551
def permute(p2,l,r): 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]=p2[i],p2[l] if...
Traceback (most recent call last): File "/tmp/tmpx4sfl07p/tmpe3gscg_s.py", line 22, in <module> n=int(input()) ^^^^^^^ EOFError: EOF when reading a line
s575537322
p02557
u353797797
1600028676
Python
PyPy3 (7.3.0)
py
Runtime Error
197
121936
1198
import sys sys.setrecursionlimit(10**6) int1 = lambda x: int(x)-1 p2D = lambda x: print(*x, sep="\n") def II(): return int(sys.stdin.readline()) def MI(): return map(int, sys.stdin.readline().split()) def LI(): return list(map(int, sys.stdin.readline().split())) def LLI(rows_number): return [LI() for _ in range(rows_n...
Traceback (most recent call last): File "/tmp/tmpxwbqo0cv/tmpy7l_5kon.py", line 20, in <module> n=II() ^^^^ File "/tmp/tmpxwbqo0cv/tmpy7l_5kon.py", line 6, in II def II(): return int(sys.stdin.readline()) ^^^^^^^^^^^^^^^^^^^^^^^^^ ValueError: invalid literal for int() with base 10...
s973470827
p02557
u588341295
1600028615
Python
PyPy3 (7.3.0)
py
Runtime Error
203
137372
887
import sys from collections import Counter 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 [[[[e for l in range(d)] for k...
Traceback (most recent call last): File "/tmp/tmpxiuu26g7/tmpok4x73cp.py", line 21, in <module> N = INT() ^^^^^ File "/tmp/tmpxiuu26g7/tmpok4x73cp.py", line 9, in INT def INT(): return int(input()) ^^^^^^^^^^^^ ValueError: invalid literal for int() with base 10: ''
s286418031
p02557
u391731808
1600028608
Python
Python (3.8.2)
py
Runtime Error
303
56404
1303
from collections import deque N=int(input()) *A, = map(int,input().split()) *B, = map(int,input().split()) A_c = {} B_c = {} for a in A: A_c[a] = A_c.get(a,0) + 1 for b in B: B_c[b] = B_c.get(b,0) + 1 for a,n in A_c.items(): m = B_c.get(a,0) if n + m > N: print("No") exit() print("Y...
Traceback (most recent call last): File "/tmp/tmpntu_srx8/tmpn_mwxv3h.py", line 3, in <module> N=int(input()) ^^^^^^^ EOFError: EOF when reading a line
s555975802
p02557
u415718506
1600028599
Python
PyPy3 (7.3.0)
py
Runtime Error
596
215076
2496
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("----- solving ------") c1 = Counter(arr) c2 = Counter(br...
Traceback (most recent call last): File "/tmp/tmpk_dfkpm3/tmpht8oik_k.py", line 89, in <module> k = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s627363300
p02557
u711539583
1600028585
Python
PyPy3 (7.3.0)
py
Runtime Error
318
134208
723
import heapq import sys n = int(input()) a = list(map(int, input().split())) b = list(map(int, input().split())) c = [] heapq.heapify(b) heapq.heapify(c) ans = [0] * n A = [] for i in range(n): A.append((a[i],i)) A.sort(reverse=True) k = 0 for i in range(n): ai, j = A[i] bi = -1 if c and c[0] != ai: bi ...
Traceback (most recent call last): File "/tmp/tmpr6zw6i2d/tmpvtp32e5j.py", line 3, in <module> n = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s487614317
p02557
u711539583
1600028523
Python
PyPy3 (7.3.0)
py
Runtime Error
350
134552
713
import heapq import sys n = int(input()) a = list(map(int, input().split())) b = list(map(int, input().split())) c = [] heapq.heapify(b) heapq.heapify(c) ans = [0] * n A = [] for i in range(n): A.append((a[i],i)) A.sort(reverse=True) k = 0 for i in range(n): ai, j = A[i] bi = -1 if c and c[0] != ai: bi ...
Traceback (most recent call last): File "/tmp/tmpz7ccvw1m/tmpl95x5jgd.py", line 3, in <module> n = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s640590768
p02557
u225388820
1600028516
Python
PyPy3 (7.3.0)
py
Runtime Error
647
158132
1626
from collections import Counter from heapq import heappush, heapify, heappop from bisect import bisect_left, bisect_right # bisect_left(a,x):a[i]>=xとなるような最小のi. # 昇順ソートされたリストaに昇順を崩さずxを挿入できる位置s(0-index)を返す. # a=[1,3,5,7,9,11,13,15,17,19] #s = bisect_left(a,4) # s=2 n = int(input()) a = list(map(int, input().split())) b =...
Traceback (most recent call last): File "/tmp/tmphrinm92w/tmpguq5trk1.py", line 9, in <module> n = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s981619904
p02557
u152417130
1600028515
Python
PyPy3 (7.3.0)
py
Runtime Error
677
168920
1501
n = int(input()) a = list(map(int, input().split())) b = list(map(int, input().split())) sa = set(a) sb = set(b) count = [0] * (n + 1) counta = [0] * (n + 1) countb = [0] * (n + 1) for v in a: count[v] += 1 counta[v] += 1 for v in b: count[v] += 1 countb[v] += 1 for v in count: if v > n: ...
Traceback (most recent call last): File "/tmp/tmpp8h5e4cg/tmp71vylb8z.py", line 1, in <module> n = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s320722038
p02557
u607075479
1600028514
Python
PyPy3 (7.3.0)
py
Runtime Error
174
125460
1338
import sys import math from collections import deque sys.setrecursionlimit(1000000) MOD = 10 ** 9 + 7 input = lambda: sys.stdin.readline().strip() NI = lambda: int(input()) NMI = lambda: map(int, input().split()) NLI = lambda: list(NMI()) SI = lambda: input() def make_grid(h, w, num): return [[int(num)] * w for _ in...
Traceback (most recent call last): File "/tmp/tmpqsc3u4kj/tmp1hxe6y11.py", line 73, in <module> main() File "/tmp/tmpqsc3u4kj/tmp1hxe6y11.py", line 18, in main N = NI() ^^^^ File "/tmp/tmpqsc3u4kj/tmp1hxe6y11.py", line 8, in <lambda> NI = lambda: int(input()) ^^^^^^^^^^^^ Valu...
s434614814
p02557
u562016607
1600028500
Python
PyPy3 (7.3.0)
py
Runtime Error
1139
164780
1186
from collections import deque import heapq N=int(input()) A=[int(i) for i in input().split()] B=[int(i) for i in input().split()] if 0: import random N=2*10**5 A=[random.randrange(1,N+1) for i in range(N)] B=[random.randrange(1,N+1) for i in range(N)] A.sort() B.sort() a=[0 for i in range(N+1)] ...
Traceback (most recent call last): File "/tmp/tmpuf8t02d_/tmp59db77o9.py", line 3, in <module> N=int(input()) ^^^^^^^ EOFError: EOF when reading a line
s521978006
p02557
u225388820
1600028499
Python
PyPy3 (7.3.0)
py
Runtime Error
710
157952
1632
from collections import Counter from heapq import heappush, heapify, heappop from bisect import bisect_left, bisect_right # bisect_left(a,x):a[i]>=xとなるような最小のi. # 昇順ソートされたリストaに昇順を崩さずxを挿入できる位置s(0-index)を返す. # a=[1,3,5,7,9,11,13,15,17,19] #s = bisect_left(a,4) # s=2 n = int(input()) a = list(map(int, input().split())) b =...
Traceback (most recent call last): File "/tmp/tmp607m5l5x/tmpvk1ndlpp.py", line 9, in <module> n = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s779938572
p02557
u873915460
1600028473
Python
PyPy3 (7.3.0)
py
Runtime Error
2209
125944
729
N=int(input()) A=list(map(int,input().split())) B=list(map(int,input().split())) C=[0]*N D=[0]*N for i in range(N): C[A[i]-1]+=1 D[B[i]-1]+=1 E,F=max(C),max(D) if min(E,F)>N//2 and C.index(E)==D.index(F): print('No') exit() C,D=D[:],C[:] P=[0]*N X=[-1]*N for i in range(N): X[A[i]-1]=i P=[-1]*N for i in range(...
Traceback (most recent call last): File "/tmp/tmpdhhvhk10/tmpzf64v8ce.py", line 1, in <module> N=int(input()) ^^^^^^^ EOFError: EOF when reading a line
s543470159
p02557
u994988729
1600028472
Python
Python (3.8.2)
py
Runtime Error
1044
114612
1164
from collections import Counter import heapq U = 2*10**5 def main(): N = int(input()) A = list(map(int, input().split())) B = list(map(int, input().split())) ca = Counter(A) cb = Counter(B) ha = [] hb = [] for i in range(1, U+1): if cb[i] > N - ca[i]: print("No") ...
Traceback (most recent call last): File "/tmp/tmp5qznwf6m/tmpktud8ew_.py", line 52, in <module> main() File "/tmp/tmp5qznwf6m/tmpktud8ew_.py", line 8, in main N = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s925775756
p02557
u807772568
1600028462
Python
PyPy3 (7.3.0)
py
Runtime Error
301
183728
2259
import sys,collections as cl,bisect as bs sys.setrecursionlimit(100000) input = sys.stdin.readline mod = 10**9+7 Max = sys.maxsize def l(): #intのlist return list(map(int,input().split())) def m(): #複数文字 return map(int,input().split()) def onem(): #Nとかの取得 return int(input()) def s(x): #圧縮 a = [] if l...
Traceback (most recent call last): File "/tmp/tmppnl4hpfs/tmput9t0two.py", line 62, in <module> n = onem() ^^^^^^ File "/tmp/tmppnl4hpfs/tmput9t0two.py", line 11, in onem return int(input()) ^^^^^^^^^^^^ ValueError: invalid literal for int() with base 10: ''
s851635351
p02557
u770293614
1600028456
Python
Python (3.8.2)
py
Runtime Error
65
40204
258
N=int(input()) arr=[] for i in range(N): arr.append([map(int,input().split(' '))]) most=0 for j in range(len(arr)): for k in range(i,len(arr)): x1,y1,x2,y2=arr[j][0],arr[j][1],arr[k][0],arr[k][1] most=max(most,(abs(x1-x2)+abs(y1-y2))) print(most)
Traceback (most recent call last): File "/tmp/tmpvzii891w/tmplziw_a2e.py", line 3, in <module> N=int(input()) ^^^^^^^ EOFError: EOF when reading a line
s639954426
p02557
u211160392
1600028456
Python
PyPy3 (7.3.0)
py
Runtime Error
321
173948
604
N = int(input()) A = list(map(int,input().split())) B = list(map(int,input().split())) AL,AR = {},{} BL,BR = {},{} for i in range(N): if not A[i] in AL: AL[A[i]] = i AR[A[i]] = i for i in range(N): if not B[i] in BL: BL[B[i]] = i BR[B[i]] = i can = [1]*(N) for i in BL.keys(): if n...
Traceback (most recent call last): File "/tmp/tmprm54jyr0/tmpjfmc0k35.py", line 1, in <module> N = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s090575671
p02557
u438720156
1600028405
Python
Python (3.8.2)
py
Runtime Error
120
41508
499
def permute(p2,l,r): if l==r and flag==0: count=0 for i in range(n): if p1[i]!=p2[i]: count+=1 break if count==n: flag=1 print("YES") print(p2) else: for i in range(l,r+1): p2[l],p2[i]=p2[i],p2[l] if flag==0: permute(l+1,r) p2[l],p2[i]...
Traceback (most recent call last): File "/tmp/tmpgkn4v2kr/tmpkj4jmtp4.py", line 20, in <module> n=int(input()) ^^^^^^^ EOFError: EOF when reading a line
s733421301
p02557
u189479417
1600028405
Python
PyPy3 (7.3.0)
py
Runtime Error
284
148560
643
from collections import Counter import sys N = int(input()) A = list(map(int,input().split())) B = list(map(int,input().split())) ca = Counter(A) cb = Counter(B) maxA = 0 maxB = 0 for item in ca.values(): maxA = max(maxA, item) for item in cb.values(): maxB = max(maxB, item) if maxA + maxB > N: print('No')...
Traceback (most recent call last): File "/tmp/tmpjku2cexu/tmp3yj00fii.py", line 4, in <module> N = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s925330813
p02557
u740260565
1600028399
Python
PyPy3 (7.3.0)
py
Runtime Error
193
131940
765
import bisect n = int(input()) a = [int(i) for i in input().split()] b = [int(i) for i in input().split()] ab = [[0 for _ in range(2)] for _ in range(10)] for i in range(n): ab[a[i]][0] += 1 ab[b[i]][1] += 1 flag = 0 for i in range(10): if(ab[i][0] + ab[i][0] > n): flag = 1 if (flag == 1): ...
Traceback (most recent call last): File "/tmp/tmpvl0agcwm/tmpa375mkot.py", line 4, in <module> n = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s884876327
p02557
u167542063
1600028397
Python
Python (3.8.2)
py
Runtime Error
2206
40376
304
n=int(input()) a=list(map(int,input().split())) a.sort() b=list(map(int,input().split())) list=[] for i in range(n): for k in range(n): for j in range(n-k): if a[i]==b[j]: list.append(list[j]) del list[j] if i==n: print("".join(list)) if a[i]==b[j]:break
Traceback (most recent call last): File "/tmp/tmph14ahggj/tmpmcs3wyho.py", line 1, in <module> n=int(input()) ^^^^^^^ EOFError: EOF when reading a line
s421426030
p02557
u391731808
1600028386
Python
Python (3.8.2)
py
Runtime Error
299
56532
1285
from collections import deque N=int(input()) *A, = map(int,input().split()) *B, = map(int,input().split()) A_c = {} B_c = {} for a in A: A_c[a] = A_c.get(a,0) + 1 for b in B: B_c[b] = B_c.get(b,0) + 1 for a,n in A_c.items(): m = B_c.get(a,0) if n + m > N: print("No") exit() print("...
Traceback (most recent call last): File "/tmp/tmpi5ev8w_j/tmpvd16zwfg.py", line 4, in <module> N=int(input()) ^^^^^^^ EOFError: EOF when reading a line
s237627250
p02557
u887152994
1600028382
Python
Python (3.8.2)
py
Runtime Error
230
41864
1012
N=int(input()) A = list(map(int, input().split())) B = list(map(int, input().split())) B.sort(reverse=True) Arev=sorted(A, reverse=True) Brev=sorted(B) atai=0 s=0 for i in range(len(A)): if A[i]==B[i]: atai=A[i] s+=1 C=[] for i in range(len(A)): C.append(A[i]-B[i]) if 0 in C =="True": hajime...
Traceback (most recent call last): File "/tmp/tmp0i9xgt00/tmp_dar5wms.py", line 1, in <module> N=int(input()) ^^^^^^^ EOFError: EOF when reading a line
s715828546
p02557
u695811449
1600028370
Python
PyPy3 (7.3.0)
py
Runtime Error
424
181452
1641
import sys input = sys.stdin.readline from operator import itemgetter 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) U=[] for ca in CA: if CA[ca]>0 and CB[ca]>0: if CA[ca]+CB[ca]>N: print("No") ...
Traceback (most recent call last): File "/tmp/tmpwxclx5ox/tmpms7yjjh8.py", line 5, in <module> N=int(input()) ^^^^^^^^^^^^ ValueError: invalid literal for int() with base 10: ''
s733805575
p02557
u852110531
1600028368
Python
PyPy3 (7.3.0)
py
Runtime Error
304
169700
3091
""" pppppppppppppppppppp ppppp ppppppppppppppppppp ppppppp ppppppppppppppppppppp pppppppp pppppppppppppppppppppp pppppppppppppppppppppppppppppppp pppppppppppppppppppp...
Traceback (most recent call last): File "/tmp/tmpvyz3gefs/tmp5wbq6fo8.py", line 49, in <module> n = int(data()) ^^^^^^^^^^^ ValueError: invalid literal for int() with base 10: ''
s080097541
p02557
u067983636
1600028359
Python
PyPy3 (7.3.0)
py
Runtime Error
3668
264572
2185
import sys from collections import deque from functools import lru_cache import bisect import copy import heapq import itertools import math input = sys.stdin.readline sys.setrecursionlimit(1000000) mod = 10 ** 9 + 7 def read_values(): return map(int, input().split()) def read_index(): return map(lambda x: int(x) - 1,...
Traceback (most recent call last): File "/tmp/tmpm_18ve59/tmp185loff1.py", line 92, in <module> main() File "/tmp/tmpm_18ve59/tmp185loff1.py", line 20, in main N = int(input()) ^^^^^^^^^^^^ ValueError: invalid literal for int() with base 10: ''
s020851427
p02557
u820087133
1600028355
Python
Python (3.8.2)
py
Runtime Error
2208
80932
747
from collections import Counter import numpy as np N = int(input()) A = np.array([int(s) for s in input().split()]) B = np.array([int(s) for s in input().split()]) A_count = Counter(A) B_count = Counter(B) duplicate_counts = [max(A_count[i], B_count[i]) for i in A_count.keys() if i in B_count.k...
Traceback (most recent call last): File "/tmp/tmp30kcj8a9/tmp7p6_sejl.py", line 4, in <module> N = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s229142597
p02557
u968166680
1600028354
Python
PyPy3 (7.3.0)
py
Runtime Error
411
159092
2050
import sys from collections import Counter from heapq import heapify, heappush, heappop read = sys.stdin.read readline = sys.stdin.readline readlines = sys.stdin.readlines sys.setrecursionlimit(10 ** 9) INF = 1 << 60 MOD = 1000000007 def main(): N = int(readline()) A = list(map(int, readline().split())) ...
Traceback (most recent call last): File "/tmp/tmp_ynhhum2/tmpaeah8_z9.py", line 85, in <module> main() File "/tmp/tmp_ynhhum2/tmpaeah8_z9.py", line 14, in main N = int(readline()) ^^^^^^^^^^^^^^^ ValueError: invalid literal for int() with base 10: ''
s041712633
p02557
u740260565
1600028354
Python
PyPy3 (7.3.0)
py
Runtime Error
189
131952
761
import bisect n = int(input()) a = [int(i) for i in input().split()] b = [int(i) for i in input().split()] ab = [[0 for _ in range(2)] for _ in range(10)] for i in range(n): ab[a[i]][0] += 1 ab[b[i]][1] += 1 flag = 0 for i in range(10): if(ab[i][0] + ab[i][0] > n): flag = 1 if (flag == 1): ...
Traceback (most recent call last): File "/tmp/tmpac690fsf/tmpqr2sbdnq.py", line 4, in <module> n = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s307290278
p02557
u807772568
1600028347
Python
PyPy3 (7.3.0)
py
Runtime Error
321
183788
2254
import sys,collections as cl,bisect as bs sys.setrecursionlimit(100000) input = sys.stdin.readline mod = 10**9+7 Max = sys.maxsize def l(): #intのlist return list(map(int,input().split())) def m(): #複数文字 return map(int,input().split()) def onem(): #Nとかの取得 return int(input()) def s(x): #圧縮 a = [] if l...
Traceback (most recent call last): File "/tmp/tmp1w16yr5x/tmp9pb1sn8k.py", line 62, in <module> n = onem() ^^^^^^ File "/tmp/tmp1w16yr5x/tmp9pb1sn8k.py", line 11, in onem return int(input()) ^^^^^^^^^^^^ ValueError: invalid literal for int() with base 10: ''
s877856784
p02557
u800396927
1600028328
Python
PyPy3 (7.3.0)
py
Runtime Error
164
121692
1136
n = int(input()) A = list(map(int,input().split())) B =list(map(int,input().split())) f = True for i in range(n): if A[i]==B[i]: f = False break if f: print('Yes') ans =[str(i) for i in B] print(' '.join(ans)) exit() if A[-1]<B[0]: print('Yes') ans =[str(i) for i in B] p...
Traceback (most recent call last): File "/tmp/tmpbmva9o9r/tmpatgngmky.py", line 1, in <module> n = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s367141804
p02557
u424768586
1600028322
Python
PyPy3 (7.3.0)
py
Runtime Error
1042
188412
3725
import sys sys.setrecursionlimit(10**7) #再帰関数の上限,10**5以上の場合python import math from copy import copy, deepcopy from copy import deepcopy as dcp from operator import itemgetter from bisect import bisect_left, bisect, bisect_right#2分探索 #bisect_left(l,x), bisect(l,x)#aはソート済みである必要あり。aの中からx未満の要素数を返す。rightだと以下 from collection...
Traceback (most recent call last): File "/tmp/tmpvin0677d/tmp83ut8x1y.py", line 107, in <module> main() File "/tmp/tmpvin0677d/tmp83ut8x1y.py", line 62, in main N = int(input()) ^^^^^^^ File "/tmp/tmpvin0677d/tmp83ut8x1y.py", line 29, in input if x[-1]=="\n": ~^^^^ IndexError: stri...
s087021278
p02557
u190735555
1600028315
Python
Python (3.8.2)
py
Runtime Error
2206
40244
623
n=int(input()) a=list(map(int, input().split())) b=list(map(int, input().split())) l=[0]*(n+1) for i in range(n): x=a[i] y=b[i] l[x]+=1 l[y]+=1 if max(l)>n: print('No') else: print('Yes') for j in range(n): if l[j]==max(l): M=j for k in range(n): if a[k]=...
Traceback (most recent call last): File "/tmp/tmponypxu9i/tmpe5qgy6gy.py", line 1, in <module> n=int(input()) ^^^^^^^ EOFError: EOF when reading a line
s886105721
p02557
u046158516
1600028304
Python
PyPy3 (7.3.0)
py
Runtime Error
188
123404
1163
import sys import os,io input=io.BytesIO(os.read(0,os.fstat(0).st_size)).readline n=int(input()) a=list(map(int,input().split())) b=list(map(int,input().split())) counta=[0]*(n+1) countb=[0]*(n+1) dic={} for i in range(n): counta[a[i]]+=1 countb[b[i]]+=1 for i in range(n+1): if counta[i]+countb[i]>n: print('...
Traceback (most recent call last): File "/tmp/tmp3_zvk6qb/tmprzhlj96t.py", line 5, in <module> n=int(input()) ^^^^^^^^^^^^ ValueError: invalid literal for int() with base 10: b''
s164869945
p02557
u875291233
1600028303
Python
Python (3.8.2)
py
Runtime Error
2207
86216
1636
# coding: utf-8 # Your code here! import sys readline = sys.stdin.readline read = sys.stdin.read n, = map(int,readline().split()) *a, = map(int,readline().split()) *b, = map(int,readline().split()) ca = [0]*(n+1) cb = [0]*(n+1) for i in a: ca[i] += 1 for i in b: cb[i] += 1 from heapq import * qa = [] #qb = [] sb ...
Traceback (most recent call last): File "/tmp/tmpeoskgajb/tmpt6ss525w.py", line 7, in <module> n, = map(int,readline().split()) ^^ ValueError: not enough values to unpack (expected 1, got 0)
s400164145
p02557
u035603241
1600028297
Python
PyPy3 (7.3.0)
py
Runtime Error
156
121668
3216
# ------------------- fast io -------------------- import os import sys from io import BytesIO, IOBase BUFSIZE = 8192 class FastIO(IOBase): newlines = 0 def __init__(self, file): self._fd = file.fileno() self.buffer = BytesIO() self.writable = "x" in file.mode or "r" not in file.mode...
Traceback (most recent call last): File "/tmp/tmpjc62ahn4/tmpcxem87lj.py", line 88, in <module> n = int(input()) ^^^^^^^^^^^^ ValueError: invalid literal for int() with base 10: ''
s554436112
p02557
u391731808
1600028295
Python
Python (3.8.2)
py
Runtime Error
306
56332
1284
from collections import deque N=int(input()) *A, = map(int,input().split()) *B, = map(int,input().split()) A_c = {} B_c = {} for a in A: A_c[a] = A_c.get(a,0) + 1 for b in B: B_c[b] = B_c.get(b,0) + 1 for a,n in A_c.items(): m = B_c.get(a,0) if n + m > N: print("No") exit() print("Y...
Traceback (most recent call last): File "/tmp/tmp6l8ixtk9/tmpup3gdzng.py", line 3, in <module> N=int(input()) ^^^^^^^ EOFError: EOF when reading a line
s603326349
p02557
u095094246
1600028286
Python
PyPy3 (7.3.0)
py
Runtime Error
166
109348
423
import sys from collections import deque n=int(input()) A=list(map(int,input().split())) B=list(map(int,input().split())) # A_iでない値を充当していく。 ans = [0]*n B = deque(B) B.rotate() for i,a in enumerate(A): while 1: x = B.popleft() if a != x: ans[i] = x break y = B.pop() if x == y: print('...
Traceback (most recent call last): File "/tmp/tmpjeswu4ov/tmpxsq087ts.py", line 3, in <module> n=int(input()) ^^^^^^^ EOFError: EOF when reading a line
s782502361
p02557
u152417130
1600028274
Python
Python (3.8.2)
py
Runtime Error
26
9092
1424
n = int(input()) a = list(map(int, input().split())) b = list(map(int, input().split())) n += 5 sa = set(a) sb = set(b) count = [0] * n counta = [0] * n countb = [0] * n for v in a: count[v] += 1 counta[v] += 1 for v in b: count[v] += 1 countb[v] += 1 outA = dict() for v in a: outA[v] = [] impo...
File "/tmp/tmppxxs985h/tmp2y0f173x.py", line 67 if count[v}: ^ SyntaxError: closing parenthesis '}' does not match opening parenthesis '['
s109446188
p02557
u152417130
1600028259
Python
PyPy3 (7.3.0)
py
Runtime Error
149
68532
1424
n = int(input()) a = list(map(int, input().split())) b = list(map(int, input().split())) n += 5 sa = set(a) sb = set(b) count = [0] * n counta = [0] * n countb = [0] * n for v in a: count[v] += 1 counta[v] += 1 for v in b: count[v] += 1 countb[v] += 1 outA = dict() for v in a: outA[v] = [] impo...
File "/tmp/tmpco5tbwli/tmpytszd3n8.py", line 67 if count[v}: ^ SyntaxError: closing parenthesis '}' does not match opening parenthesis '['
s030222783
p02557
u190735555
1600028218
Python
Python (3.8.2)
py
Runtime Error
74
32492
608
a=list(map(int, input().split())) b=list(map(int, input().split())) l=[0]*(n+1) for i in range(n): x=a[i] y=b[i] l[x]+=1 l[y]+=1 if max(l)>n: print('No') else: print('Yes') for j in range(n): if l[j]==max(l): M=j for k in range(n): if a[k]==M and a[(k+1)%...
Traceback (most recent call last): File "/tmp/tmpustgjvoi/tmpxs58egx6.py", line 1, in <module> a=list(map(int, input().split())) ^^^^^^^ EOFError: EOF when reading a line
s599801545
p02557
u648881683
1600028184
Python
Python (3.8.2)
py
Runtime Error
313
81924
1495
import bisect, collections, copy, heapq, itertools, math, string, sys input = lambda: sys.stdin.readline().rstrip() sys.setrecursionlimit(10**7) INF = float('inf') def I(): return int(input()) def F(): return float(input()) def SS(): return input() def LI(): return [int(x) for x in input().split()] def LI_(): return [...
Traceback (most recent call last): File "/tmp/tmpgb2h18s1/tmp8fsa2gde.py", line 46, in <module> resolve() File "/tmp/tmpgb2h18s1/tmp8fsa2gde.py", line 14, in resolve N = I() ^^^ File "/tmp/tmpgb2h18s1/tmp8fsa2gde.py", line 5, in I def I(): return int(input()) ^^^^^^^^^^^^ V...
s543386736
p02557
u887152994
1600028179
Python
Python (3.8.2)
py
Runtime Error
258
41868
988
N=int(input()) A = list(map(int, input().split())) B = list(map(int, input().split())) B.sort(reverse=True) Arev=sorted(A, reverse=True) Brev=sorted(B) atai=0 s=0 for i in range(len(A)): if A[i]==B[i]: atai=A[i] s+=1 C=[] for i in range(len(A)): C.append(A[i]-B[i]) hajime=C.index(0) if s==0: ...
Traceback (most recent call last): File "/tmp/tmpplv0w5l0/tmpfpqugzrd.py", line 1, in <module> N=int(input()) ^^^^^^^ EOFError: EOF when reading a line
s136907880
p02557
u594803920
1600028167
Python
PyPy3 (7.3.0)
py
Runtime Error
100
92956
552
n = int(input()) l = [] ll = [] for _ in range(n): x, y = map(int, input().split()) l.append((x+y, x, y)) ll.append((x-y, x, y)) l.sort() ll.sort() ans1 = 0 ans2 = 0 cnt = 0 while True: a = l[-cnt] b = l[cnt] if a[1] >= b[1] and a[2] >= b[2]: ans1 = b[0]-a[0] break if cnt >=...
Traceback (most recent call last): File "/tmp/tmpgb253j3r/tmp0lackvg1.py", line 1, in <module> n = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s797524217
p02557
u535803878
1600028150
Python
PyPy3 (7.3.0)
py
Runtime Error
412
200028
1330
import sys input = lambda : sys.stdin.readline().rstrip() sys.setrecursionlimit(max(1000, 10**9)) write = lambda x: sys.stdout.write(x+"\n") n = int(input()) a = list(map(int, input().split())) b = list(map(int, input().split())) # 二分探索木の代わり BST HST # 存在しない要素に対するremoveはこないことを仮定している h = [] from collections import Co...
Traceback (most recent call last): File "/tmp/tmpdyqdt7c8/tmpwvyce6ho.py", line 7, in <module> n = int(input()) ^^^^^^^^^^^^ ValueError: invalid literal for int() with base 10: ''
s412019579
p02557
u711539583
1600028134
Python
PyPy3 (7.3.0)
py
Runtime Error
357
133696
609
import heapq import sys n = int(input()) a = list(map(int, input().split())) b = list(map(int, input().split())) c = [] heapq.heapify(b) heapq.heapify(c) ans = [0] * n A = [] for i in range(n): A.append((a[i],i)) A.sort(reverse=True) for i in range(n): ai, j = A[i] bi = -1 if c and c[0] != ai: bi = heap...
Traceback (most recent call last): File "/tmp/tmpts2vxg6n/tmp2gljil0f.py", line 3, in <module> n = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s822106077
p02557
u820087133
1600028133
Python
Python (3.8.2)
py
Runtime Error
2208
81024
705
from collections import Counter import numpy as np N = int(input()) A = np.array([int(s) for s in input().split()]) B = np.array([int(s) for s in input().split()]) A_count = Counter(A) B_count = Counter(B) duplicate_counts = [max(A_count[i], B_count[i]) for i in A_count.keys() if i in B_count.k...
Traceback (most recent call last): File "/tmp/tmpmyy6r9t5/tmpynt1vhhv.py", line 4, in <module> N = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s466959410
p02557
u852790844
1600028133
Python
Python (3.8.2)
py
Runtime Error
565
51748
832
import numpy as np n = int(input()) a = np.array(input().split(), dtype=np.int64) b = np.array(input().split(), dtype=np.int64) ac = np.bincount(a, minlength=n+2) ab = np.bincount(b, minlength=n+2) if np.max(ac+ab) <= n: print("Yes") num, count = np.unique(b, return_counts=True) ans = [] for i in range...
Traceback (most recent call last): File "/tmp/tmpklqxgv6p/tmp3n403wri.py", line 3, in <module> n = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s159925609
p02557
u714642969
1600028087
Python
PyPy3 (7.3.0)
py
Runtime Error
194
135488
505
# -*- coding: utf-8 -*- import sys sys.setrecursionlimit(10**9) INF=10**18 MOD=10**9+7 input=lambda: sys.stdin.readline().rstrip() YesNo=lambda b: bool([print('Yes')] if b else print('No')) YESNO=lambda b: bool([print('YES')] if b else print('NO')) int1=lambda x:int(x)-1 from collections import Counter N=int(input()) ...
Traceback (most recent call last): File "/tmp/tmp568lah03/tmpg4wbxf2q.py", line 12, in <module> N=int(input()) ^^^^^^^^^^^^ ValueError: invalid literal for int() with base 10: ''
s316192537
p02557
u969708690
1600028042
Python
Python (3.8.2)
py
Runtime Error
367
59360
1901
import collections N=int(input()) A=list(map(int,input().split())) B=list(map(int,input().split())) L=A+B c = collections.Counter(L) for i in c: if c[i]>N: print("No") exit() c = collections.Counter(B) K=list(c) M=dict(c) ans=list() for i in range(N): if A[i]==K[-1]: if len(K)==1: break ans.a...
Traceback (most recent call last): File "/tmp/tmpy1cb0j3u/tmpy98iocb2.py", line 2, in <module> N=int(input()) ^^^^^^^ EOFError: EOF when reading a line
s181001628
p02557
u807772568
1600027892
Python
PyPy3 (7.3.0)
py
Runtime Error
285
176356
2241
import sys,collections as cl,bisect as bs sys.setrecursionlimit(100000) input = sys.stdin.readline mod = 10**9+7 Max = sys.maxsize def l(): #intのlist return list(map(int,input().split())) def m(): #複数文字 return map(int,input().split()) def onem(): #Nとかの取得 return int(input()) def s(x): #圧縮 a = [] if l...
Traceback (most recent call last): File "/tmp/tmpup1okx33/tmpnqqgfs2n.py", line 62, in <module> n = onem() ^^^^^^ File "/tmp/tmpup1okx33/tmpnqqgfs2n.py", line 11, in onem return int(input()) ^^^^^^^^^^^^ ValueError: invalid literal for int() with base 10: ''
s699184837
p02557
u940831163
1600027871
Python
Python (3.8.2)
py
Runtime Error
394
56636
616
import collections n = int(input()) a = list(map(int, input().split())) b = list(map(int, input().split())) c = collections.Counter(a) d = collections.Counter(b) k = 1 count = 0 for i in range(n): if c[i+1] + d[i+1] > n: print('No') exit() if c[i+1] + d[i+1] > count: k = i+1 co...
Traceback (most recent call last): File "/tmp/tmple1oufkk/tmpqs7ii6db.py", line 2, in <module> n = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s092227476
p02557
u167542063
1600027869
Python
Python (3.8.2)
py
Runtime Error
45
25084
271
n=int(input()) a=list[map(int,input().split())] a.sort() b=list[map(int,input().split())] list=[] for i in range(n): for j in range(n): if a[i]==b[j]: list.append(list[j]) del list[j] if i==n: print("".join(list)) if a[i]==b[j]:break
Traceback (most recent call last): File "/tmp/tmpmzyyqrec/tmpextv6a66.py", line 1, in <module> n=int(input()) ^^^^^^^ EOFError: EOF when reading a line
s006113564
p02557
u424768586
1600027846
Python
PyPy3 (7.3.0)
py
Runtime Error
1088
188784
3715
import sys sys.setrecursionlimit(10**7) #再帰関数の上限,10**5以上の場合python import math from copy import copy, deepcopy from copy import deepcopy as dcp from operator import itemgetter from bisect import bisect_left, bisect, bisect_right#2分探索 #bisect_left(l,x), bisect(l,x)#aはソート済みである必要あり。aの中からx未満の要素数を返す。rightだと以下 from collection...
Traceback (most recent call last): File "/tmp/tmpggt0zrp5/tmpdo7kpm8a.py", line 107, in <module> main() File "/tmp/tmpggt0zrp5/tmpdo7kpm8a.py", line 62, in main N = int(input()) ^^^^^^^ File "/tmp/tmpggt0zrp5/tmpdo7kpm8a.py", line 29, in input if x[-1]=="\n": ~^^^^ IndexError: stri...
s843482736
p02557
u401686269
1600027846
Python
Python (3.8.2)
py
Runtime Error
589
124476
739
from collections import Counter,defaultdict from bisect import bisect_left,bisect_right N=int(input()) *A,=map(int,input().split()) *B,=map(int,input().split()) c1 = Counter(A) c2 = Counter(B) c3 = {} for k in c1.keys(): if c2.get(k): c3[k] = min(c1[k],c2[k]) c = Counter() c.update(c3) mc = c.most_common()[0...
Traceback (most recent call last): File "/tmp/tmpp4pnbi69/tmp9r6gpq6r.py", line 4, in <module> N=int(input()) ^^^^^^^ EOFError: EOF when reading a line
s460751690
p02557
u498487134
1600027796
Python
PyPy3 (7.3.0)
py
Runtime Error
541
173364
2869
import sys input = sys.stdin.readline def I(): return int(input()) def MI(): return map(int, input().split()) def LI(): return list(map(int, input().split())) def main(): import heapq from collections import defaultdict dd = defaultdict(int) N=I() A=LI() B=LI() cntA=[0]*(N+1) ...
Traceback (most recent call last): File "/tmp/tmpj7gqxqot/tmpcm_tmzxs.py", line 130, in <module> main() File "/tmp/tmpj7gqxqot/tmpcm_tmzxs.py", line 13, in main N=I() ^^^ File "/tmp/tmpj7gqxqot/tmpcm_tmzxs.py", line 4, in I def I(): return int(input()) ^^^^^^^^^^^^ ValueError...
s596052499
p02557
u187516587
1600027774
Python
Python (3.8.2)
py
Runtime Error
366
41204
1100
import heapq N=int(input()) A=list(map(int,input().split())) B=list(map(int,input().split())) la=[0]*N lb=[0]*N M=0 for i in range(N): la[A[i]-1]+=1 lb[B[i]-1]+=1 B[i]=-B[i] for i in range(N): s=la[i]+lb[i] if s>M: k=i+1 M=s if s>N: print("No") exit() ...
Traceback (most recent call last): File "/tmp/tmphh8_jvwj/tmpkn_obvys.py", line 2, in <module> N=int(input()) ^^^^^^^ EOFError: EOF when reading a line
s786960853
p02557
u870761020
1600027765
Python
PyPy3 (7.3.0)
py
Runtime Error
2209
147476
512
n = int(input()) set_a = list(input().split()) set_b = list(input().split()) inters = set(set_a) & set(set_b) set_a, set_b = ''.join(set_a), ''.join(set_b) lst = [] for i in inters: if set_a.count(i) >= set_b.count(i): lst.append(set_b.count(i)) else: lst.append(set_a.count(i)) if max(lst)...
Traceback (most recent call last): File "/tmp/tmpbnefni3l/tmpymnqsl4d.py", line 1, in <module> n = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s593859699
p02557
u807772568
1600027749
Python
PyPy3 (7.3.0)
py
Runtime Error
276
176164
2206
import sys,collections as cl,bisect as bs sys.setrecursionlimit(100000) input = sys.stdin.readline mod = 10**9+7 Max = sys.maxsize def l(): #intのlist return list(map(int,input().split())) def m(): #複数文字 return map(int,input().split()) def onem(): #Nとかの取得 return int(input()) def s(x): #圧縮 a = [] if l...
Traceback (most recent call last): File "/tmp/tmpmpscriu1/tmp11lwcf6h.py", line 62, in <module> n = onem() ^^^^^^ File "/tmp/tmpmpscriu1/tmp11lwcf6h.py", line 11, in onem return int(input()) ^^^^^^^^^^^^ ValueError: invalid literal for int() with base 10: ''
s545524265
p02557
u022979415
1600027736
Python
Python (3.8.2)
py
Runtime Error
222
49620
781
def main(): n = int(input()) a = list(map(int, input().split())) b = list(map(int, input().split()))[::-1] ind = [-1] * (n + 1) for i in range(n): if i == 0: ind[b[i]] = 0 elif b[i] != b[i - 1]: ind[b[i]] = i for i in range(n): if a[i] != b[i]: ...
Traceback (most recent call last): File "/tmp/tmpu1v16j7w/tmpnz9wk8mk.py", line 30, in <module> main() File "/tmp/tmpu1v16j7w/tmpnz9wk8mk.py", line 2, in main n = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s919555916
p02557
u498487134
1600027712
Python
PyPy3 (7.3.0)
py
Runtime Error
532
173328
2886
import sys input = sys.stdin.readline def I(): return int(input()) def MI(): return map(int, input().split()) def LI(): return list(map(int, input().split())) def main(): import heapq from collections import defaultdict dd = defaultdict(int) N=I() A=LI() B=LI() cntA=[0]*(N+1) ...
Traceback (most recent call last): File "/tmp/tmpmza4p0vm/tmpvuiefyu3.py", line 131, in <module> main() File "/tmp/tmpmza4p0vm/tmpvuiefyu3.py", line 13, in main N=I() ^^^ File "/tmp/tmpmza4p0vm/tmpvuiefyu3.py", line 4, in I def I(): return int(input()) ^^^^^^^^^^^^ ValueError...
s385710181
p02557
u249218427
1600027670
Python
PyPy3 (7.3.0)
py
Runtime Error
2210
149216
874
N = int(input()) A = list(map(int, input().split())) B = list(map(int, input().split())) dict_int = dict() dict_b = dict() def insert(dict_, a): if a in dict_.keys(): dict_[a] += 1 else: dict_[a] = 1 for a in A: insert(dict_int,a) for b in B: insert(dict_int,b) insert(dict_b,b) max_int = max(dic...
Traceback (most recent call last): File "/tmp/tmpix593s6z/tmpmmlz_8_p.py", line 1, in <module> N = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s165747558
p02557
u940831163
1600027636
Python
Python (3.8.2)
py
Runtime Error
407
56104
454
import collections n = int(input()) a = list(map(int, input().split())) b = list(map(int, input().split())) c = collections.Counter(a) d = collections.Counter(b) k = 1 count = 0 for i in range(n): if c[i+1] + d[i+1] > n: print('No') exit() if c[i+1] + d[i+1] > count: k = i+1 co...
Traceback (most recent call last): File "/tmp/tmpw39vquhp/tmpri4wfsrc.py", line 2, in <module> n = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s116023731
p02557
u498487134
1600027636
Python
PyPy3 (7.3.0)
py
Runtime Error
503
173336
2893
import sys input = sys.stdin.readline def I(): return int(input()) def MI(): return map(int, input().split()) def LI(): return list(map(int, input().split())) def main(): import heapq from collections import defaultdict dd = defaultdict(int) N=I() A=LI() B=LI() cntA=[0]*(N+1) ...
Traceback (most recent call last): File "/tmp/tmpkcenxqz_/tmpv48kui6g.py", line 139, in <module> main() File "/tmp/tmpkcenxqz_/tmpv48kui6g.py", line 13, in main N=I() ^^^ File "/tmp/tmpkcenxqz_/tmpv48kui6g.py", line 4, in I def I(): return int(input()) ^^^^^^^^^^^^ ValueError...
s850965159
p02557
u285681431
1600027634
Python
PyPy3 (7.3.0)
py
Runtime Error
201
116692
522
from copy import deepcopy from collections import deque import sys input = sys.stdin.readline N = int(input()) A = list(map(int, input().split())) B = list(map(int, input().split())) C = deepcopy(B) C.reverse() C = deque(C) ans = deque([]) for i in range(N): p = C.popleft() if A[i] != p: ans.append(...
Traceback (most recent call last): File "/tmp/tmped8z5asw/tmpw8lu9c5h.py", line 6, in <module> N = int(input()) ^^^^^^^^^^^^ ValueError: invalid literal for int() with base 10: ''
s646352064
p02557
u784120390
1600027634
Python
PyPy3 (7.3.0)
py
Runtime Error
534
196276
2897
# by the authority of GOD author: manhar singh sachdev # import os,sys from io import BytesIO, IOBase from collections import defaultdict from heapq import * class Node: def __init__(self,ind,val): self.ind = ind self.val = val def __lt__(self, other): return self.val > other.val ...
Traceback (most recent call last): File "/tmp/tmpc9e8oleq/tmpl54hf2tq.py", line 88, in <module> main() File "/tmp/tmpc9e8oleq/tmpl54hf2tq.py", line 16, in main n = int(input()) ^^^^^^^^^^^^ ValueError: invalid literal for int() with base 10: ''
s604870864
p02557
u867320886
1600027629
Python
Python (3.8.2)
py
Runtime Error
933
81196
1020
import sys from collections import Counter import heapq n = int(input()) a = list(map(int,input().split())) b = list(map(int,input().split())) a_count = Counter(a) b_count = Counter(b) for i in a_count.keys(): if a_count[i] + b_count[i] > n: print("No") sys.exit() b_can = [] for k,v in b_count.i...
Traceback (most recent call last): File "/tmp/tmp3m_3n4cn/tmp74j3t5fr.py", line 5, in <module> n = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s211187165
p02557
u843175622
1600027626
Python
Python (3.8.2)
py
Runtime Error
202
40284
309
n = int(input()) a = list(map(int, input().split())) b = list(map(int, input().split())) offset = 0 while a[0] == b[offset]: offset += 1 c = [] for i in range(offset, offset + n): c.append(b[i % n]) for i in range(n): if a[i] == c[i]: print('No') exit() print('Yes') print(*c)
Traceback (most recent call last): File "/tmp/tmpgqbdg_jv/tmpr2qrsr76.py", line 1, in <module> n = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s801043563
p02557
u852790844
1600027616
Python
Python (3.8.2)
py
Runtime Error
561
52688
843
import sys import numpy as np n = int(input()) a = np.array(input().split(), dtype=np.int64) b = np.array(input().split(), dtype=np.int64) ac = np.bincount(a, minlength=n+1) ab = np.bincount(b, minlength=n+1) if np.max(ac+ab) <= n: print("Yes") num, count = np.unique(b, return_counts=True) ans = [] for...
Traceback (most recent call last): File "/tmp/tmpgucqk1p_/tmp6_ky1erg.py", line 4, in <module> n = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s913464737
p02557
u219197917
1600027581
Python
Python (3.8.2)
py
Runtime Error
175
56060
329
from collections import Counter def main(): n = int(input()) a = [int(i) for i in input().split()] b = [int(i) for i in input().split()] ca = Counter(a) cb = Counter(b) for k in cb.keys(): if cb[k] > n - ca[k]: raise Exception print("No") if __name__ == '__main__': ...
Traceback (most recent call last): File "/tmp/tmp1lv_37ma/tmpvc7o9wli.py", line 17, in <module> main() File "/tmp/tmp1lv_37ma/tmpvc7o9wli.py", line 5, in main n = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s230053519
p02557
u285681431
1600027505
Python
PyPy3 (7.3.0)
py
Runtime Error
211
113940
486
from copy import deepcopy from collections import deque import sys input = sys.stdin.readline N = int(input()) A = list(map(int, input().split())) B = list(map(int, input().split())) C = deepcopy(B) C.reverse() C = deque(C) ans = deque([]) for i in range(N): p = C.popleft() if A[i] != p: ans.append(...
Traceback (most recent call last): File "/tmp/tmppsblxzxf/tmpgyjlohcx.py", line 6, in <module> N = int(input()) ^^^^^^^^^^^^ ValueError: invalid literal for int() with base 10: ''
s916094626
p02557
u219197917
1600027478
Python
Python (3.8.2)
py
Runtime Error
196
56212
348
from collections import Counter def main(): n = int(input()) a = [int(i) for i in input().split()] b = [int(i) for i in input().split()] ca = Counter(a) cb = Counter(b) for k in cb.keys(): if cb[k] > n - ca[k]: print("No") return raise Exception if __name_...
Traceback (most recent call last): File "/tmp/tmpt19msimx/tmppes5y1wu.py", line 18, in <module> main() File "/tmp/tmpt19msimx/tmppes5y1wu.py", line 5, in main n = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s782736021
p02557
u807772568
1600027442
Python
PyPy3 (7.3.0)
py
Runtime Error
233
176080
2211
import sys,collections as cl,bisect as bs sys.setrecursionlimit(100000) input = sys.stdin.readline mod = 10**9+7 Max = sys.maxsize def l(): #intのlist return list(map(int,input().split())) def m(): #複数文字 return map(int,input().split()) def onem(): #Nとかの取得 return int(input()) def s(x): #圧縮 a = [] if l...
Traceback (most recent call last): File "/tmp/tmp59199v3y/tmpiogg42ji.py", line 62, in <module> n = onem() ^^^^^^ File "/tmp/tmp59199v3y/tmpiogg42ji.py", line 11, in onem return int(input()) ^^^^^^^^^^^^ ValueError: invalid literal for int() with base 10: ''
s834409300
p02557
u813297429
1600027427
Python
Python (3.8.2)
py
Runtime Error
28
9112
269
n = int(input()) a = list(map(int,input().split())) b = list(map(int,input().split())) if n%2==0: mid = n//2-1 else: mid = n//2 if b[mid+1:] + b[:mid+1] != a: print('Yes') print(" ".join(map(str,b[mid+1:] + b[:mid+1]))) break else: print('no')
File "/tmp/tmp_b7rzrsj/tmp754ctmcb.py", line 12 break ^^^^^ SyntaxError: 'break' outside loop
s947439232
p02557
u034128150
1600027419
Python
PyPy3 (7.3.0)
py
Runtime Error
381
185500
1027
from collections import Counter N = int(input()) As = list(map(int, input().split())) Bs = list(map(int, input().split())) As_counter = Counter(As) Bs_counter = Counter(Bs) A_indices = dict() for i, A in enumerate(As): if A in A_indices: A_indices[A].append(i) else: A_indices[A] = [i] B_indic...
Traceback (most recent call last): File "/tmp/tmpw3_r72e9/tmp9tdaqs0b.py", line 3, in <module> N = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s686050795
p02557
u556610039
1600027387
Python
Python (3.8.2)
py
Runtime Error
241
49824
722
num = int(input()) a_i = list(map(int, input().split())) b_i = list(map(int, input().split())) ans = [0] * num r = num - 1 l = 0 isSuccess = True for id in range(num): if a_i[id] != b_i[l]: ans[id] += b_i[l] l += 1 elif a_i[id] != b_i[r]: ans[id] += b_i[r] r -= 1 else: ...
Traceback (most recent call last): File "/tmp/tmp9kgqv0qw/tmpe78gv397.py", line 1, in <module> num = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s026416496
p02557
u813297429
1600027376
Python
Python (3.8.2)
py
Runtime Error
32
9116
250
n = int(input()) a = list(map(int,input().split())) b = list(map(int,input().split())) if n%2==0: mid = n//2-1 else: mid = n//2 if b[mid+1:] + b[:mid+1] != a: print('Yes') print(b[mid+1:] + b[:mid+1]) break else: print('no')
File "/tmp/tmpl_goqp_g/tmp4mp5zyna.py", line 12 break ^^^^^ SyntaxError: 'break' outside loop
s056647617
p02557
u052499405
1600027339
Python
PyPy3 (7.3.0)
py
Runtime Error
164
116672
908
#!/usr/bin/env python3 import sys input = sys.stdin.readline n = int(input()) a = [int(item) for item in input().split()] b = [int(item) for item in input().split()] if n == 1: if a[0] == b[0]: print("No") else: print(*b) left = 0 lv = b[0] for i in range(n): if b[i] != lv: ...
Traceback (most recent call last): File "/tmp/tmp7t4xl847/tmpsqn5tm9i.py", line 5, in <module> n = int(input()) ^^^^^^^^^^^^ ValueError: invalid literal for int() with base 10: ''
s470175786
p02557
u677523557
1600027273
Python
PyPy3 (7.3.0)
py
Runtime Error
175
116828
467
import sys input = sys.stdin.readline N = int(input()) A = list(map(int, input().split())) B = list(map(int, input().split())) start = 0 ind = 0 for a in A: while start < N and B[(start+ind)%N] == a: start += 1 if start >= N: break ind += 1 if start >= N: print("No") else: print("Yes") ...
Traceback (most recent call last): File "/tmp/tmpssgfu6h2/tmp7t17sf_a.py", line 4, in <module> N = int(input()) ^^^^^^^^^^^^ ValueError: invalid literal for int() with base 10: ''
s499980126
p02557
u190735555
1600027221
Python
Python (3.8.2)
py
Runtime Error
2207
41304
796
n=int(input()) a=list(map(int, input().split())) b=list(map(int, input().split())) l=[0]*(n+1) la=[0]*(n+1) lb=[0]*(n+1) for i in range(n): x=a[i] y=b[i] l[x]+=1 la[x]+=1 l[y]+=1 lb[y]+=1 if max(l)>n: print('No') else: print('Yes') for j in range(n): if l[j]==max(l): ...
Traceback (most recent call last): File "/tmp/tmpqkrmglpc/tmpmmzan10j.py", line 1, in <module> n=int(input()) ^^^^^^^ EOFError: EOF when reading a line
s296805393
p02557
u046158516
1600027216
Python
PyPy3 (7.3.0)
py
Runtime Error
2208
123812
813
import sys import os,io input=io.BytesIO(os.read(0,os.fstat(0).st_size)).readline n=int(input()) a=list(map(int,input().split())) b=list(map(int,input().split())) counta=[0]*(n+1) countb=[0]*(n+1) dic={} for i in range(n): counta[a[i]]+=1 countb[b[i]]+=1 for i in range(n+1): if counta[i]+countb[i]>n: print('...
Traceback (most recent call last): File "/tmp/tmpc4ppikb5/tmp1itnpsa1.py", line 5, in <module> n=int(input()) ^^^^^^^^^^^^ ValueError: invalid literal for int() with base 10: b''
s456534739
p02557
u599114793
1600027209
Python
PyPy3 (7.3.0)
py
Runtime Error
134
91124
317
# import sys # input = sys.stdin.readline def mp(): return map(int, input().split()) def lmp(): return list(map(int, input().split())) n = int(input()) point = [] p = [] m = [] for i in range(n): a,b = mp() point.append((a,b)) p.append(a+b) m.append(a-b) print(max(max(p)-min(p), max(m)-min(m)))
Traceback (most recent call last): File "/tmp/tmpemrn9sjh/tmpkdof7oal.py", line 7, in <module> n = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s786942446
p02557
u143509139
1600027190
Python
PyPy3 (7.3.0)
py
Runtime Error
173
115556
714
def construct_table(n, s): table = [-1] * (n + 1) j = -1 for i in range(n): while j >= 0 and s[i] != s[j]: j = table[j] j += 1 table[i + 1] = j return table n = int(input()) m = n a = list(map(int, input().split())) t = list(map(int, input().split())) s2 = a + a tb ...
Traceback (most recent call last): File "/tmp/tmph_bx0wmt/tmp5o3pzql8.py", line 12, in <module> n = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s246962717
p02557
u667084803
1600027157
Python
PyPy3 (7.3.0)
py
Runtime Error
334
173032
607
from collections import Counter, deque N = int(input()) A = list(map(int, input().split())) B = list(map(int, input().split())) A_cn = Counter(A) B_cn = Counter(B) AB_cn = Counter(A+B) if AB_cn.most_common()[0][1] > N: print("No") else: print("Yes") b = deque(B) ans_dict = {} cntr = 0 while b: ...
Traceback (most recent call last): File "/tmp/tmp228a9xoy/tmpn36qi0dy.py", line 3, in <module> N = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s466011187
p02557
u187516587
1600027057
Python
Python (3.8.2)
py
Runtime Error
382
41888
684
import heapq N=int(input()) A=list(map(int,input().split())) B=list(map(int,input().split())) la=[0]*N lb=[0]*N for i in range(N): la[A[i]-1]+=1 lb[B[i]-1]+=1 B[i]=-B[i] for i in range(N): if la[i]+lb[i]>N: print("No") exit() print("Yes") l=[] heapq.heapify(B) c=0 t=0 for i in range(N): ...
Traceback (most recent call last): File "/tmp/tmp5xlurd_5/tmpan0ff1dn.py", line 2, in <module> N=int(input()) ^^^^^^^ EOFError: EOF when reading a line
s262213267
p02557
u022979415
1600027054
Python
Python (3.8.2)
py
Runtime Error
233
49324
767
def main(): n = int(input()) a = list(map(int, input().split())) b = list(map(int, input().split()))[::-1] ind = [-1] * (n + 1) for i in range(n): if i == 0: ind[b[i]] = 0 elif b[i] != b[i - 1]: ind[b[i]] = i for i in range(n): if a[i] != b[i]: ...
Traceback (most recent call last): File "/tmp/tmp_lmt_pr7/tmpviicdnxg.py", line 30, in <module> main() File "/tmp/tmp_lmt_pr7/tmpviicdnxg.py", line 2, in main n = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s264632973
p02557
u667084803
1600027023
Python
PyPy3 (7.3.0)
py
Runtime Error
339
196288
615
from collections import Counter, deque N = int(input()) A = list(map(int, input().split())) B = list(map(int, input().split())) A_cn = Counter(A) B_cn = Counter(B) AB_cn = Counter(A+B) if AB_cn.most_common()[0][1] > N: print("No") else: print("Yes") b = deque(B) ans_dict = {} cntr = 0 while b: ...
Traceback (most recent call last): File "/tmp/tmpxc16kvwk/tmp4ukrvayp.py", line 3, in <module> N = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s806313177
p02557
u017050982
1600027019
Python
PyPy3 (7.3.0)
py
Runtime Error
2209
141836
565
N = int(input()) A = list(map(int,input().split(" "))) B = list(map(int,input().split(" "))) B.reverse() d = dict() for i in range(1,len(B)): if B[i] != B[i - 1]: d[B[i-1]] = i swap = 0 print(d) for i in range(N): if A[i] == B[i]: for q in range(d[B[i]], len(B)): if B[q] != B[i]: ...
Traceback (most recent call last): File "/tmp/tmpxzzdy83k/tmpq0fh3zjm.py", line 1, in <module> N = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s208006972
p02557
u512007680
1600027013
Python
PyPy3 (7.3.0)
py
Runtime Error
346
144900
596
N = int(input()) A = list(map(int,input().split())) B = list(map(int,input().split())) X = [0]*N Y = [0]*N for i in range(N): X[A[i]-1] += 1 Y[B[i]-1] += 1 det = 0 for i in range(N): if X[i]+Y[i] > N: det = -1 break if det == -1: print('No') else: ans = [0]*N P = sorted(list(...
Traceback (most recent call last): File "/tmp/tmpr89tusag/tmp3e6vobur.py", line 1, in <module> N = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s206238307
p02557
u785989355
1600026961
Python
PyPy3 (7.3.0)
py
Runtime Error
474
222244
1089
from collections import Counter,defaultdict N = int(input()) A = list(map(int,input().split())) B = list(map(int,input().split())) A = Counter(A) B = Counter(B) A = [(c,A[c]) for c in A] B = [(c,B[c]) for c in B] A.sort(key = lambda x:x[1],reverse=True) B.sort(key = lambda x:x[1],reverse=True) i = 0 j = 0 C = de...
Traceback (most recent call last): File "/tmp/tmpgrk4dh9_/tmp2qdzjkei.py", line 3, in <module> N = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s126344253
p02557
u512007680
1600026854
Python
PyPy3 (7.3.0)
py
Runtime Error
323
150824
613
N = int(input()) A = list(map(int,input().split())) B = list(map(int,input().split())) X = [0]*N Y = [0]*N for i in range(N): X[A[i]-1] += 1 Y[B[i]-1] += 1 det = 0 for i in range(N): if X[i]+Y[i] > N: det = -1 break if det == -1: print('No') else: ans = [0]*N P = sorted(list(...
Traceback (most recent call last): File "/tmp/tmp960ocon4/tmprosdmonh.py", line 1, in <module> N = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s450968407
p02557
u521839937
1600026845
Python
Python (3.8.2)
py
Runtime Error
261
42844
585
n = int(input()) a = [int(x) for x in input().split(' ')] b = [int(x) for x in input().split(' ')] dict = {} for index, a_i in enumerate(a): if a_i == b[index]: dict.setdefault(a_i, 0) dict[a_i] += 1 max_same_number_key = max(dict, key=dict.get) if dict[max_same_number_key] > (n/2): print('No') exit()...
Traceback (most recent call last): File "/tmp/tmpw131afiq/tmpu6lr_jf0.py", line 1, in <module> n = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s548267612
p02557
u425184437
1600026666
Python
PyPy3 (7.3.0)
py
Runtime Error
2210
163772
573
N=int(input()) A=list(map(int,input().split())) B=list(map(int,input().split())) from collections import Counter a=Counter(A) b=Counter(B) aa=a.most_common() bb=b.most_common() bbb=[[0,0] for i in range(len(bb))] for i in range(len(bb)): bbb[i][0]=bb[i][0] bbb[i][1]=bb[i][1] if aa[0][0]==bb[0][0] and aa[0][1]+bb[0...
Traceback (most recent call last): File "/tmp/tmppwo_kjyf/tmpr87v0ks2.py", line 1, in <module> N=int(input()) ^^^^^^^ EOFError: EOF when reading a line
s043744425
p02557
u667084803
1600026609
Python
Python (3.8.2)
py
Runtime Error
228
72684
267
from collections import Counter, deque N = int(input()) A = list(map(int, input().split())) B = list(map(int, input().split())) A_cn = Counter(A) B_cn = Counter(B) AB_cn = Counter(A+B) if AB_cn.most_common()[0][1] > N: print("No") else: print("Yes") 0/0
Traceback (most recent call last): File "/tmp/tmp0r25gyap/tmpo4kpp66n.py", line 3, in <module> N = int(input()) ^^^^^^^ EOFError: EOF when reading a line