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
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...
Traceback (most recent call last): File "/tmp/tmp6kyb5qsu/tmpk35l_vsh.py", line 28, in <module> N = INT() ^^^^^ File "/tmp/tmp6kyb5qsu/tmpk35l_vsh.py", line 12, in INT def INT(): return int(input()) ^^^^^^^^^^^^ ValueError: invalid literal for int() with base 10: ''
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='')
File "/tmp/tmp1e2k6cxu/tmp10z6iio0.py", line 6 l.append((x,y)) ^ IndentationError: unindent does not match any outer indentation level
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)
File "/tmp/tmppip7dvw0/tmpuoqb4o5s.py", line 2 def mahattan([x1,y1],[x2,y2]): ^ SyntaxError: invalid syntax
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) ...
Traceback (most recent call last): File "/tmp/tmp6lmc4veh/tmp5ft84988.py", line 30, in <module> main() File "/tmp/tmp6lmc4veh/tmp5ft84988.py", line 7, in main N = int(input()) ^^^^^^^ EOFError: EOF when reading a line
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...
Traceback (most recent call last): File "/tmp/tmp4u0bxwbr/tmpoxhqu3uo.py", line 2, in <module> from fractions import gcd ImportError: cannot import name 'gcd' from 'fractions' (/root/miniconda3/envs/sandbox-runtime/lib/python3.11/fractions.py)
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(...
File "/tmp/tmp70tjwp1_/tmpmllggky4.py", line 7 for k in range N: ^ SyntaxError: invalid syntax
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...
Traceback (most recent call last): File "/tmp/tmpr5xs58tw/tmphloo3b8y.py", line 3, in <module> n=int(input()) ^^^^^^^ EOFError: EOF when reading a line
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...
Traceback (most recent call last): File "/tmp/tmpfr7m2hbz/tmp069ftr6o.py", line 1, in <module> n = int(input()) ^^^^^^^ EOFError: EOF when reading a line
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...
Traceback (most recent call last): File "/tmp/tmplneviarr/tmpczxl9art.py", line 57, in <module> main() File "/tmp/tmplneviarr/tmpczxl9art.py", line 13, in main N = I() ^^^ File "/tmp/tmplneviarr/tmpczxl9art.py", line 3, in I def I(): return int(sys.stdin.readline().rstrip()) ...
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(...
File "/tmp/tmp9zpq4mcs/tmph30lq4uw.py", line 79 Submission Info ^^^^ SyntaxError: invalid syntax
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(...
File "/tmp/tmpr6sve910/tmp4lm0mp2w.py", line 79 Submission Info ^^^^ SyntaxError: invalid syntax
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....
Traceback (most recent call last): File "/tmp/tmpu5jq1_2d/tmpvlj7iveh.py", line 1, in <module> n = int(input()) ^^^^^^^ EOFError: EOF when reading a line
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...
Traceback (most recent call last): File "/tmp/tmpblup4hwy/tmpnezxvfzk.py", line 67, in <module> main() File "/tmp/tmpblup4hwy/tmpnezxvfzk.py", line 13, in main N = I() ^^^ File "/tmp/tmpblup4hwy/tmpnezxvfzk.py", line 3, in I def I(): return int(sys.stdin.readline().rstrip()) ...
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] ...
Traceback (most recent call last): File "/tmp/tmps60s6xjh/tmp9vqbx7kl.py", line 3, in <module> n = int(input()) ^^^^^^^ EOFError: EOF when reading a line
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] ...
Traceback (most recent call last): File "/tmp/tmpw3umrtll/tmp1jx5pkcp.py", line 3, in <module> n = int(input()) ^^^^^^^ EOFError: EOF when reading a line
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] ...
Traceback (most recent call last): File "/tmp/tmpu35gdvdw/tmpq6kjbxr_.py", line 3, in <module> n = int(input()) ^^^^^^^ EOFError: EOF when reading a line
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...
Traceback (most recent call last): File "/tmp/tmpkm2zfr8i/tmpgj2ar9zn.py", line 52, in <module> main() File "/tmp/tmpkm2zfr8i/tmpgj2ar9zn.py", line 13, in main N = I() ^^^ File "/tmp/tmpkm2zfr8i/tmpgj2ar9zn.py", line 3, in I def I(): return int(sys.stdin.readline().rstrip()) ...
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...
Traceback (most recent call last): File "/tmp/tmpw2izafe1/tmp5q_lt6ay.py", line 52, in <module> main() File "/tmp/tmpw2izafe1/tmp5q_lt6ay.py", line 13, in main N = I() ^^^ File "/tmp/tmpw2izafe1/tmp5q_lt6ay.py", line 3, in I def I(): return int(sys.stdin.readline().rstrip()) ...
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の定理」というのが有効らしい。高校数学の美しい物語参照。 ...
Traceback (most recent call last): File "/tmp/tmpt6i_54fw/tmpss9uc3f5.py", line 121, in <module> main() File "/tmp/tmpt6i_54fw/tmpss9uc3f5.py", line 7, in main N = int(input()) ^^^^^^^^^^^^ ValueError: invalid literal for int() with base 10: ''
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 ...
Traceback (most recent call last): File "/tmp/tmpqzyus5em/tmpbf0vjabl.py", line 33, in <module> main() File "/tmp/tmpqzyus5em/tmpbf0vjabl.py", line 5, in main n = int(input()) ^^^^^^^ EOFError: EOF when reading a line
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...
Traceback (most recent call last): File "/tmp/tmpwx_i1kg0/tmpfwoe_9u7.py", line 53, in <module> main() File "/tmp/tmpwx_i1kg0/tmpfwoe_9u7.py", line 13, in main N = I() ^^^ File "/tmp/tmpwx_i1kg0/tmpfwoe_9u7.py", line 3, in I def I(): return int(sys.stdin.readline().rstrip()) ...
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...
Traceback (most recent call last): File "/tmp/tmpsn0lp1de/tmp7tt1y8h6.py", line 45, in <module> main() File "/tmp/tmpsn0lp1de/tmp7tt1y8h6.py", line 13, in main N = I() ^^^ File "/tmp/tmpsn0lp1de/tmp7tt1y8h6.py", line 3, in I def I(): return int(sys.stdin.readline().rstrip()) ...
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...
Traceback (most recent call last): File "/tmp/tmp7f5c56wi/tmp99xbm19a.py", line 45, in <module> main() File "/tmp/tmp7f5c56wi/tmp99xbm19a.py", line 13, in main N = I() ^^^ File "/tmp/tmp7f5c56wi/tmp99xbm19a.py", line 3, in I def I(): return int(sys.stdin.readline().rstrip()) ...
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]-...
Traceback (most recent call last): File "/tmp/tmpdjgfxmzl/tmpsl25mas_.py", line 1, in <module> n=int(input()) ^^^^^^^ EOFError: EOF when reading a line
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 =...
Traceback (most recent call last): File "/tmp/tmpxf8eg_ak/tmppr1demol.py", line 3, in <module> N = int(input()) ^^^^^^^ EOFError: EOF when reading a line
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) ...
Traceback (most recent call last): File "/tmp/tmpr6cpdphb/tmpz0q6nsjt.py", line 50, in <module> resolve() File "/tmp/tmpr6cpdphb/tmpz0q6nsjt.py", line 8, in resolve N = int(input()) ^^^^^^^ EOFError: EOF when reading a line
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...
Traceback (most recent call last): File "/tmp/tmpatqjnqwg/tmp71sqvlsu.py", line 70, in <module> n = ii1() ^^^^^ File "/tmp/tmpatqjnqwg/tmp71sqvlsu.py", line 7, in <lambda> ii1=lambda:int(stdin.readline().strip()) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ValueError: invalid literal for int() with...
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...
Traceback (most recent call last): File "/tmp/tmpb2_lp7vi/tmp4hbitegi.py", line 1, in <module> n=int(input()) ^^^^^^^ EOFError: EOF when reading a line
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...
Traceback (most recent call last): File "/tmp/tmped09zxo9/tmprx86wmu3.py", line 28, in <module> solve() File "/tmp/tmped09zxo9/tmprx86wmu3.py", line 2, in solve n = int(input()) ^^^^^^^ EOFError: EOF when reading a line
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())) ...
Traceback (most recent call last): File "/tmp/tmplyqemelc/tmp5bydd9wt.py", line 10, in <module> N = int(readline()) ^^^^^^^^^^^^^^^ ValueError: invalid literal for int() with base 10: b''
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())) ...
Traceback (most recent call last): File "/tmp/tmpvar3bymz/tmpki9t236t.py", line 10, in <module> N = int(readline()) ^^^^^^^^^^^^^^^ ValueError: invalid literal for int() with base 10: b''
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...
Traceback (most recent call last): File "/tmp/tmpkksq6al4/tmpda81ba6v.py", line 15, in <module> N=int(input()) ^^^^^^^ EOFError: EOF when reading a line
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...
Traceback (most recent call last): File "/tmp/tmp_7i_2r1e/tmpij411mc4.py", line 154, in <module> ret = main() ^^^^^^ File "/tmp/tmp_7i_2r1e/tmpij411mc4.py", line 16, in main n = int(input()) ^^^^^^^ EOFError: EOF when reading a line
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...
Traceback (most recent call last): File "/tmp/tmpceb7m8x1/tmp8tb55rt2.py", line 3, in <module> n = int(input()) ^^^^^^^ EOFError: EOF when reading a line
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
Traceback (most recent call last): File "/tmp/tmpro0fdy5l/tmpfxcke2ml.py", line 3, in <module> n = int(input()) ^^^^^^^ EOFError: EOF when reading a line
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...
Traceback (most recent call last): File "/tmp/tmpie7rq4ey/tmp0_zjxuhx.py", line 109, in <module> ret = main() ^^^^^^ File "/tmp/tmpie7rq4ey/tmp0_zjxuhx.py", line 16, in main n = int(input()) ^^^^^^^ EOFError: EOF when reading a line
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') ...
Traceback (most recent call last): File "/tmp/tmp1xyv4c9z/tmpsm2tydah.py", line 3, in <module> N = int(input()) ^^^^^^^^^^^^ ValueError: invalid literal for int() with base 10: ''
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 >>...
File "/tmp/tmp5sw32r6s/tmp347q80ws.py", line 10 // 一番多いもの、reverseした後一番多いものをずらす、あとはずらすのは一箇所のみ ^ SyntaxError: invalid character '、' (U+3001)
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...
Traceback (most recent call last): File "/tmp/tmpboudz6u0/tmp4ykhryhw.py", line 105, in <module> ret = main() ^^^^^^ File "/tmp/tmpboudz6u0/tmp4ykhryhw.py", line 16, in main n = int(input()) ^^^^^^^ EOFError: EOF when reading a line
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...
Traceback (most recent call last): File "/tmp/tmp2ad5v4s1/tmp7rcqwtcy.py", line 3, in <module> n = int(input()) ^^^^^^^^^^^^ ValueError: invalid literal for int() with base 10: ''
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: ...
Traceback (most recent call last): File "/tmp/tmpluxvua2x/tmpgp_0hq6y.py", line 2, in <module> N=int(input()) ^^^^^^^ EOFError: EOF when reading a line
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...
Traceback (most recent call last): File "/tmp/tmpf0dpuf5q/tmpg787knkc.py", line 7, in <module> N = int(input()) ^^^^^^^ EOFError: EOF when reading a line
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...
Traceback (most recent call last): File "/tmp/tmpj6v8lxet/tmpl1pe7awx.py", line 7, in <module> N = int(input()) ^^^^^^^ EOFError: EOF when reading a line
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]: ...
Traceback (most recent call last): File "/tmp/tmpb_lh2b0t/tmp4biinzky.py", line 3, in <module> N = int(input()) ^^^^^^^ EOFError: EOF when reading a line
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...
Traceback (most recent call last): File "/tmp/tmp2chzmx8a/tmp1fodbnx6.py", line 28, in <module> main() File "/tmp/tmp2chzmx8a/tmp1fodbnx6.py", line 7, in main N = NI() ^^^^ File "/tmp/tmp2chzmx8a/tmp1fodbnx6.py", line 5, in <lambda> NI = lambda : int(sys.stdin.readline()) ^^^...
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...
Traceback (most recent call last): File "/tmp/tmpu_ziw0o8/tmp1u7p_wb0.py", line 120, in <module> run() File "/tmp/tmpu_ziw0o8/tmp1u7p_wb0.py", line 24, in run N = int(sysread()) ^^^^^^^^^^^^^^ ValueError: invalid literal for int() with base 10: b''
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) ...
Traceback (most recent call last): File "/tmp/tmpt1ht_2k4/tmp_122i6tw.py", line 3, in <module> N = int(input()) ^^^^^^^^^^^^ ValueError: invalid literal for int() with base 10: ''
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) ...
Traceback (most recent call last): File "/tmp/tmp1u4h6fur/tmp0g4cdyn4.py", line 3, in <module> N = int(input()) ^^^^^^^^^^^^ ValueError: invalid literal for int() with base 10: ''
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) ...
Traceback (most recent call last): File "/tmp/tmpn77kap18/tmp448rvack.py", line 3, in <module> N = int(input()) ^^^^^^^^^^^^ ValueError: invalid literal for int() with base 10: ''
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]: ...
Traceback (most recent call last): File "/tmp/tmpdqzwrzyr/tmpq_2aeuxo.py", line 30, in <module> resolve() File "/tmp/tmpdqzwrzyr/tmpq_2aeuxo.py", line 4, in resolve N = int(input()) ^^^^^^^ EOFError: EOF when reading a line
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]: ...
Traceback (most recent call last): File "/tmp/tmp6vtf0vdc/tmpjtt8dw94.py", line 30, in <module> resolve() File "/tmp/tmp6vtf0vdc/tmpjtt8dw94.py", line 4, in resolve N = int(input()) ^^^^^^^ EOFError: EOF when reading a line
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]...
Traceback (most recent call last): File "/tmp/tmpd12qs0c4/tmp76pxsky8.py", line 24, in <module> n=int(input()) ^^^^^^^ EOFError: EOF when reading a line
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), (...
Traceback (most recent call last): File "/tmp/tmpvliv7xsg/tmp5iaawaf0.py", line 1, in <module> N = int(input()) ^^^^^^^ EOFError: EOF when reading a line
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), (...
Traceback (most recent call last): File "/tmp/tmp7c6gwjhk/tmp6setxw1e.py", line 1, in <module> N = int(input()) ^^^^^^^ EOFError: EOF when reading a line
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), (...
Traceback (most recent call last): File "/tmp/tmp0de6i72v/tmpgnxvlk4g.py", line 1, in <module> N = int(input()) ^^^^^^^ EOFError: EOF when reading a line
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), (...
Traceback (most recent call last): File "/tmp/tmpgs3ptkkn/tmp1rkv6yd1.py", line 1, in <module> N = int(input()) ^^^^^^^ EOFError: EOF when reading a line
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, ...
Traceback (most recent call last): File "/tmp/tmpiinlcvh4/tmpb5l2nekf.py", line 1, in <module> N = int(input()) ^^^^^^^ EOFError: EOF when reading a line
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, ...
Traceback (most recent call last): File "/tmp/tmpe68_ehq8/tmpisyba_a3.py", line 1, in <module> N = int(input()) ^^^^^^^ EOFError: EOF when reading a line
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...
Traceback (most recent call last): File "/tmp/tmp85n8smyf/tmpqv7kvrzp.py", line 4, in <module> N=int(pin()) ^^^^^^^^^^ ValueError: invalid literal for int() with base 10: ''
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')
Traceback (most recent call last): File "/tmp/tmptn_6mfre/tmp_liws60t.py", line 3, in <module> N = int(input()) ^^^^^^^ EOFError: EOF when reading a line
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')
Traceback (most recent call last): File "/tmp/tmps9qxfvvt/tmpm3_34vur.py", line 3, in <module> N = int(input()) ^^^^^^^ EOFError: EOF when reading a line
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...
File "/tmp/tmp1bt5g8kz/tmphg3fem8b.py", line 23 print(*brr) TabError: inconsistent use of tabs and spaces in indentation
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]: ...
File "/tmp/tmpwel5mktj/tmpvmzjbjur.py", line 19 return ^^^^^^ SyntaxError: 'return' outside function
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]...
Traceback (most recent call last): File "/tmp/tmpcdawzdmh/tmp7mubgjl7.py", line 24, in <module> n=int(input()) ^^^^^^^ EOFError: EOF when reading a line
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]...
Traceback (most recent call last): File "/tmp/tmp8jypheic/tmpujzn38ot.py", line 24, in <module> n=int(input()) ^^^^^^^ EOFError: EOF when reading a line
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...
Traceback (most recent call last): File "/tmp/tmpxt63p8tu/tmp1jflxcn5.py", line 4, in <module> n=int(input()) ^^^^^^^ EOFError: EOF when reading a line
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...
Traceback (most recent call last): File "/tmp/tmpqxuwxkda/tmpi36pv6wu.py", line 4, in <module> n=int(input()) ^^^^^^^ EOFError: EOF when reading a line
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...
Traceback (most recent call last): File "/tmp/tmp9x8vuzul/tmpegxvrsdm.py", line 1, in <module> n = int(input()) ^^^^^^^ EOFError: EOF when reading a line
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...
Traceback (most recent call last): File "/tmp/tmp921p0ha6/tmp5a6b8x3c.py", line 4, in <module> n = int(input()) ^^^^^^^ EOFError: EOF when reading a line
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...
Traceback (most recent call last): File "/tmp/tmpk9rai29_/tmp1vr6p091.py", line 4, in <module> n = int(input()) ^^^^^^^ EOFError: EOF when reading a line
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...
Traceback (most recent call last): File "/tmp/tmpr8axv0le/tmpfbrmd9u0.py", line 77, in <module> main() File "/tmp/tmpr8axv0le/tmpfbrmd9u0.py", line 24, in main n = int(ipt()) ^^^^^^^^^^ ValueError: invalid literal for int() with base 10: ''
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 [...
Traceback (most recent call last): File "/tmp/tmpab7avcvf/tmpndukismb.py", line 22, in <module> N = INT() ^^^^^ File "/tmp/tmpab7avcvf/tmpndukismb.py", line 10, in INT def INT(): return int(input()) ^^^^^^^^^^^^ ValueError: invalid literal for int() with base 10: ''
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(...
Traceback (most recent call last): File "/tmp/tmpuqr293or/tmp_gs40iu5.py", line 50, in <module> print(solve()) ^^^^^^^ File "/tmp/tmpuqr293or/tmp_gs40iu5.py", line 8, in solve N = int(input()) ^^^^^^^ EOFError: EOF when reading a line
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: ...
Traceback (most recent call last): File "/tmp/tmpd_ce1cw8/tmp0kxs7nwz.py", line 7, in <module> N = int(input()) ^^^^^^^ EOFError: EOF when reading a line
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);...
Traceback (most recent call last): File "/tmp/tmp05r44nbk/tmpz1kkusic.py", line 3, in <module> N = int(input()) ^^^^^^^ EOFError: EOF when reading a line
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...
Traceback (most recent call last): File "/tmp/tmpeyy6wi1x/tmprrdi1ad7.py", line 92, in <module> main() File "/tmp/tmpeyy6wi1x/tmprrdi1ad7.py", line 34, in main n=II() ^^^^ File "/tmp/tmpeyy6wi1x/tmprrdi1ad7.py", line 12, in II def II(): return int(input()) ^^^^^^^^^^^^ Value...
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...
Traceback (most recent call last): File "/tmp/tmpp6luezwl/tmprlzsvo6v.py", line 1, in <module> n = int(input()) ^^^^^^^ EOFError: EOF when reading a line
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...
Traceback (most recent call last): File "/tmp/tmp634v3t6q/tmpr9lizixb.py", line 1, in <module> n = int(input()) ^^^^^^^ EOFError: EOF when reading a line
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...
File "/tmp/tmpywhq3xgp/tmpu6fmacue.py", line 32 0 += 1 ^ SyntaxError: 'literal' is an illegal expression for augmented assignment
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...
Traceback (most recent call last): File "/tmp/tmpj3mviww2/tmp6c1d1o18.py", line 7, in <module> n=int(input()) ^^^^^^^^^^^^ ValueError: invalid literal for int() with base 10: ''
s229409653
p02557
u419978514
1600034790
Python
Python (3.8.2)
py
Runtime Error
33
9096
8
print(a)
Traceback (most recent call last): File "/tmp/tmpbttgxm8t/tmpytodhfds.py", line 1, in <module> print(a) ^ NameError: name 'a' is not defined
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...
Traceback (most recent call last): File "/tmp/tmpk0xbpnrv/tmpmkhj529x.py", line 7, in <module> n=int(input()) ^^^^^^^^^^^^ ValueError: invalid literal for int() with base 10: ''
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 ...
Traceback (most recent call last): File "/tmp/tmpjbw1ef1f/tmp_abfj8ob.py", line 62, in <module> main() File "/tmp/tmpjbw1ef1f/tmp_abfj8ob.py", line 5, in main N = int( input()) ^^^^^^^ EOFError: EOF when reading a line
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...
Traceback (most recent call last): File "/tmp/tmpdsez8d11/tmp83c027km.py", line 4, in <module> N=int(input()) ^^^^^^^^^^^^ ValueError: invalid literal for int() with base 10: ''
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...
Traceback (most recent call last): File "/tmp/tmpvfgl9mhc/tmpkh07_oi2.py", line 62, in <module> main() File "/tmp/tmpvfgl9mhc/tmpkh07_oi2.py", line 5, in main N = int( input()) ^^^^^^^ EOFError: EOF when reading a line
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...
Traceback (most recent call last): File "/tmp/tmpin6sdk72/tmp_5vsuwrr.py", line 63, in <module> main() File "/tmp/tmpin6sdk72/tmp_5vsuwrr.py", line 58, in main n = int(input()) ^^^^^^^^^^^^ ValueError: invalid literal for int() with base 10: ''
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 ...
Traceback (most recent call last): File "/tmp/tmp1tbpja1u/tmpymt3j22m.py", line 1, in <module> N, = map(int, input().split()) ^^^^^^^ EOFError: EOF when reading a line
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: ...
Traceback (most recent call last): File "/tmp/tmpmduifepw/tmp7onbm0rt.py", line 91, in <module> main() File "/tmp/tmpmduifepw/tmp7onbm0rt.py", line 4, in main N=int(sys.stdin.readline()) ^^^^^^^^^^^^^^^^^^^^^^^^^ ValueError: invalid literal for int() with base 10: ''
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...
Traceback (most recent call last): File "/tmp/tmp7tbulh8l/tmpomodbrzw.py", line 62, in <module> main() File "/tmp/tmp7tbulh8l/tmpomodbrzw.py", line 57, in main n = int(input()) ^^^^^^^^^^^^ ValueError: invalid literal for int() with base 10: ''
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: ...
Traceback (most recent call last): File "/tmp/tmp19clbmii/tmpgvonuorp.py", line 100, in <module> main() File "/tmp/tmp19clbmii/tmpgvonuorp.py", line 4, in main N=int(sys.stdin.readline()) ^^^^^^^^^^^^^^^^^^^^^^^^^ ValueError: invalid literal for int() with base 10: ''
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...
Traceback (most recent call last): File "/tmp/tmpshh3nd57/tmpdj3acexl.py", line 1, in <module> N, = map(int, input().split()) ^^^^^^^ EOFError: EOF when reading a line
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...
File "/tmp/tmpck5xvf4h/tmp9fom7srd.py", line 20 if arr1[i]==ans[i] ^ SyntaxError: expected ':'
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()) ...
Traceback (most recent call last): File "/tmp/tmplxij0x5f/tmp2lqt__8j.py", line 2, in <module> n = int(input()) ^^^^^^^ EOFError: EOF when reading a line
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 = -...
Traceback (most recent call last): File "/tmp/tmpcb1y_yzq/tmpu4mkqfe4.py", line 3, in <module> N = int(input()) ^^^^^^^ EOFError: EOF when reading a line
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()) ...
Traceback (most recent call last): File "/tmp/tmpq03cxaqy/tmpu0msao4s.py", line 2, in <module> n = int(input()) ^^^^^^^ EOFError: EOF when reading a line
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()) ...
Traceback (most recent call last): File "/tmp/tmpvknoykei/tmplk7zwzmy.py", line 2, in <module> n = int(input()) ^^^^^^^ EOFError: EOF when reading a line
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...
Traceback (most recent call last): File "/tmp/tmp7lxg1naa/tmpqtrvelau.py", line 1, in <module> n = int(input()) ^^^^^^^ EOFError: EOF when reading a line
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
Traceback (most recent call last): File "/tmp/tmpmu_k6i_1/tmpacoz64nh.py", line 5, in <module> import solve ModuleNotFoundError: No module named '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 ...
Traceback (most recent call last): File "/tmp/tmpjt15v1ql/tmpsjc4mxyc.py", line 59, in <module> solve() File "/tmp/tmpjt15v1ql/tmpsjc4mxyc.py", line 29, in solve n = I() ^^^ File "/tmp/tmpjt15v1ql/tmpsjc4mxyc.py", line 9, in I def I(): return int(sys.stdin.readline()) ^^^^^...
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 ...
Traceback (most recent call last): File "/tmp/tmpnvsti9c3/tmp6pytumj3.py", line 94, in <module> k = int(input()) ^^^^^^^ EOFError: EOF when reading a line