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
s378901424
p02574
u196579381
1598731132
Python
PyPy3 (7.3.0)
py
Runtime Error
361
198764
1535
from math import gcd N = int(input()) A = [int(i) for i in input().split()] st=set() s=0 pn = [2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97, 101, 103, 107, 109, 113, 127, 131, 137, 139, 149, 151, 157, 163, 167, 173, 179, 181, 191, 193, 197, 199, 211, 223, 227, 229, 233,...
Traceback (most recent call last): File "/tmp/tmpqn8abrjm/tmp5ge_tno_.py", line 2, in <module> N = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s203252009
p02574
u642012866
1598731117
Python
PyPy3 (7.3.0)
py
Runtime Error
2213
251480
1659
from collections import Counter import math N = int(input()) A = list(map(int, input().split())) pc = True gg = False cnt = Counter() def get_primenumber(number):#エラトステネスの篩 prime_list = [] search_list = list(range(2,number+1)) #search_listの先頭の値が√nの値を超えたら終了 while search_list[0] <= math.sqrt(number): ...
Traceback (most recent call last): File "/tmp/tmpd9mpbgcy/tmp4pv63671.py", line 3, in <module> N = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s334038945
p02574
u970369332
1598731083
Python
PyPy3 (7.3.0)
py
Runtime Error
286
186468
4381
import os import heapq import sys,threading import math as mt import bisect import operator from collections import defaultdict sys.setrecursionlimit(10**5) from io import BytesIO, IOBase def gcd(a,b): if b==0: return a else: return gcd(b,a%b) def power(x, p,m): res = 1 while p: ...
Traceback (most recent call last): File "/tmp/tmpnblo1avr/tmpzok86keo.py", line 184, in <module> main() File "/tmp/tmpnblo1avr/tmpzok86keo.py", line 104, in main n=int(input()) ^^^^^^^^^^^^ ValueError: invalid literal for int() with base 10: ''
s291199803
p02574
u397080265
1598731072
Python
Python (3.8.2)
py
Runtime Error
744
132636
530
import math n=int(input()) a=list(map(int,input().split())) m=max(a)+1 g=a[0] d=dict() for i in a: g=math.gcd(g,i) if i in d: d[i]+=1 else: d[i]=1 if g>1: print("not coprime") else: p=[0]*(m) ch=0 for i in range (2,m): if p[i]==1: continue p[i]=1 ...
Traceback (most recent call last): File "/tmp/tmp2e7mg2mj/tmpi5qh3_8b.py", line 2, in <module> n=int(input()) ^^^^^^^ EOFError: EOF when reading a line
s094688567
p02574
u618101737
1598731062
Python
PyPy2 (7.3.0)
py
Runtime Error
402
175976
1618
import sys import math if sys.subversion[0] == "PyPy": import io, atexit sys.stdout = io.BytesIO() atexit.register(lambda: sys.__stdout__.write(sys.stdout.getvalue())) sys.stdin = io.BytesIO(sys.stdin.read()) input = lambda: sys.stdin.readline().rstrip() RS = raw_input RA = lambda x=int: map(x, R...
Traceback (most recent call last): File "/tmp/tmptemhdm49/tmpxtryz022.py", line 4, in <module> if sys.subversion[0] == "PyPy": ^^^^^^^^^^^^^^ AttributeError: module 'sys' has no attribute 'subversion'. Did you mean: 'hexversion'?
s311291873
p02574
u192154323
1598731032
Python
PyPy3 (7.3.0)
py
Runtime Error
575
197436
1122
def make_divisors(n): divisors = [] # 試し割りで、かつ積でnを作るときの相方も同時に追加してる for i in range(1, int(n**0.5)+1): if n % i == 0: divisors.append(i) if i != n // i: divisors.append(n//i) divisors.sort() return divisors from math import gcd import sys n = int(input(...
Traceback (most recent call last): File "/tmp/tmpmyonrzs9/tmp7aiym4pv.py", line 14, in <module> n = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s882980641
p02574
u735891571
1598731002
Python
PyPy3 (7.3.0)
py
Runtime Error
335
189228
1641
# -*- coding: utf-8 -*- from bisect import bisect_right import math from functools import reduce def gcd(*numbers): return reduce(math.gcd, numbers) def gcd_list(numbers): return reduce(math.gcd, numbers) P=[2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73,...
Traceback (most recent call last): File "/tmp/tmpn0t70wvs/tmp1v3kc4qw.py", line 183, in <module> N = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s072613295
p02574
u043048943
1598730998
Python
PyPy3 (7.3.0)
py
Runtime Error
292
193788
2605
# Python3 program to find prime factorization # of a number n in O(Log n) time with # precomputation allowed. import math as mt MAXN = 100001 # stores smallest prime factor for # every number # Calculating SPF (Smallest Prime Factor) # for every number till MAXN. # Time Complexity : O(nloglogn) def sieve()...
Traceback (most recent call last): File "/tmp/tmppfvnqmdm/tmpwkdfaszu.py", line 114, in <module> main() File "/tmp/tmppfvnqmdm/tmpwkdfaszu.py", line 87, in main N = II() ^^^^ File "/tmp/tmppfvnqmdm/tmpwkdfaszu.py", line 83, in <lambda> II = lambda: int(input()) ^^^^^^^^^^^^ Va...
s700019894
p02574
u914802579
1598730986
Python
Python (3.8.2)
py
Runtime Error
606
132800
583
import math as mt n=int(input()) l=list(map(int,input().split())) gd=l[0] sv=[0]*(10**6+1) for i in range(2,len(sv)+1): if not sv[i]: sv[i]=i for j in range(2*i,len(sv),i): sv[j]=i an="not coprime" for i in range(n): gd=mt.gcd(gd,l[i]) if gd!=1: print(an) else: an="setwise coprime" pos=1 ...
Traceback (most recent call last): File "/tmp/tmpn5om_sam/tmpi64s0qct.py", line 2, in <module> n=int(input()) ^^^^^^^ EOFError: EOF when reading a line
s098829532
p02574
u162612857
1598730970
Python
Python (3.8.2)
py
Runtime Error
2206
134572
901
# https://cs.stackexchange.com/questions/93030/algorithm-for-checking-if-a-list-of-integers-is-pairwise-coprime import math n = int(input()) nums = list(map(int, input().split())) gcd_ = nums[0] for num in nums[1:]: gcd_ = math.gcd(gcd_, num) if gcd_ >= 2: print('not coprime') exit() def smallest_divi...
Traceback (most recent call last): File "/tmp/tmpelwbf4nf/tmpubr96nn5.py", line 4, in <module> n = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s854796256
p02574
u906501980
1598730959
Python
Python (3.8.2)
py
Runtime Error
2208
127568
746
from collections import defaultdict def get_prime_factors(x): out = [] while not x%2: out.append(2) x //= 2 i = 3 while i*i <= x: if not x%i: out.append(i) x //= i else: i += 2 if x != 1: out.append(x) return set(out) ...
Traceback (most recent call last): File "/tmp/tmpsskxqvgo/tmpr3el7pov.py", line 37, in <module> main() File "/tmp/tmpsskxqvgo/tmpr3el7pov.py", line 21, in main n = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s998487505
p02574
u478417863
1598730952
Python
Python (3.8.2)
py
Runtime Error
2208
150540
897
import numpy as np n=int(input()) a= list(map(int, input().strip().split())) a.sort() b=np.gcd(a[0],a[1]) def make_divisors(n): lower_divisors , upper_divisors = [], [] i = 1 while i*i <= n: if n % i == 0: lower_divisors.append(i) if i != n // i: upper_diviso...
Traceback (most recent call last): File "/tmp/tmpqsav9e9k/tmpnltrut_w.py", line 2, in <module> n=int(input()) ^^^^^^^ EOFError: EOF when reading a line
s661912276
p02574
u465597982
1598730949
Python
Python (3.8.2)
py
Runtime Error
2206
127412
650
def gcd(a, b): if (a == 0 or b == 0): return False if (a == b): return a if (a > b): return gcd(a-b, b) return gcd(a, b-a) def coprime(a, b) : return (gcd(a, b) == 1) n=int(input()) lst=list(map(int,input().strip().split())) flag=0 for i in range(0,n): for j in ...
Traceback (most recent call last): File "/tmp/tmp4ox0h3pa/tmp_bvoyys7.py", line 11, in <module> n=int(input()) ^^^^^^^ EOFError: EOF when reading a line
s440929992
p02574
u815269021
1598730907
Python
Python (3.8.2)
py
Runtime Error
113
90756
251
import math m=int(input()) a,b,c=map(int,input().split()) if math.gcd(a,b)==math.gcd(a,c)==math.gcd(b,c)==1: print("pairwise coprime") elif math.gcd(a,b)==math.gcd(a,c)==math.gcd(b,c)==2: print("not coprime") else: print("setwise coprime")
Traceback (most recent call last): File "/tmp/tmpdofpq2q4/tmp4k9b47mp.py", line 2, in <module> m=int(input()) ^^^^^^^ EOFError: EOF when reading a line
s071260667
p02574
u669173971
1598730902
Python
Python (3.8.2)
py
Runtime Error
628
127584
668
import math from functools import reduce n=int(input()) a=list(map(int, input().split())) q=0 size=16 judge=[0]*(size) for i in range(len(a)): num=a[i] for j in range(2,int(num**0.5)+1): if num%j==0: if judge[j-1]==-1: q=1 elif judge[num//j-1]==-1: ...
Traceback (most recent call last): File "/tmp/tmpb4xqju68/tmp9_tm0uvp.py", line 3, in <module> n=int(input()) ^^^^^^^ EOFError: EOF when reading a line
s208055917
p02574
u514118270
1598730895
Python
PyPy3 (7.3.0)
py
Runtime Error
316
72704
1130
import sys import math import itertools import bisect from copy import copy from collections import deque,Counter from decimal import Decimal import numpy as np def s(): return input() def i(): return int(input()) def S(): return input().split() def I(): return map(int,input().split()) def L(): return list(input().spli...
Traceback (most recent call last): File "/tmp/tmp0pk6xv91/tmpvmocm2wf.py", line 39, in <module> N = i() ^^^ File "/tmp/tmp0pk6xv91/tmpvmocm2wf.py", line 10, in i def i(): return int(input()) ^^^^^^^ EOFError: EOF when reading a line
s600095913
p02574
u651109406
1598730884
Python
Python (3.8.2)
py
Runtime Error
2207
127604
538
N = int(input()) A = list(map(int, input().split())) tmp = [False if i == 0 or i == 1 else True for i in range(1000)] p, s = True, True for i in range(2, int(max(A) ** 0.5) + 1): t = 0 if not tmp[i]: continue for j in range(N): if A[j] % i == 0: t += 1 A[j] //= i ...
Traceback (most recent call last): File "/tmp/tmpnq9802mk/tmpibda4206.py", line 1, in <module> N = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s329760902
p02574
u260216890
1598730875
Python
PyPy3 (7.3.0)
py
Runtime Error
2210
207804
446
n = int(input()) *a,=map(int, input().split()) mapa=[0]*(10**3+1) def func(m): for i in range(2,int(m**0.5)+2): if m%i==0: mapa[i]+=1 while m%i==0: m//=i else: continue if m>1: mapa[m]+=1 for ai in a: func(ai) tmp=max(mapa) #prin...
Traceback (most recent call last): File "/tmp/tmpkw6nb0nm/tmp5nz_yxyy.py", line 1, in <module> n = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s082611654
p02574
u618101737
1598730866
Python
PyPy2 (7.3.0)
py
Runtime Error
500
176372
1582
import sys import math if sys.subversion[0] == "PyPy": import io, atexit sys.stdout = io.BytesIO() atexit.register(lambda: sys.__stdout__.write(sys.stdout.getvalue())) sys.stdin = io.BytesIO(sys.stdin.read()) input = lambda: sys.stdin.readline().rstrip() RS = raw_input RA = lambda x=int: map(x, R...
Traceback (most recent call last): File "/tmp/tmpn8u_1ki0/tmpf7mloz92.py", line 4, in <module> if sys.subversion[0] == "PyPy": ^^^^^^^^^^^^^^ AttributeError: module 'sys' has no attribute 'subversion'. Did you mean: 'hexversion'?
s518535701
p02574
u669173971
1598730860
Python
Python (3.8.2)
py
Runtime Error
2297
127776
728
import math from functools import reduce n=int(input()) a=list(map(int, input().split())) q=0 size=16 judge=[0]*(size) for i in range(len(a)): num=a[i] print(i) for j in range(2,int(num**0.5)+1): if num%j==0: if judge[j-1]==-1: q=1 elif judge[num//j-1]==-1: ...
Traceback (most recent call last): File "/tmp/tmp45cqqyy6/tmpfua9rf3d.py", line 3, in <module> n=int(input()) ^^^^^^^ EOFError: EOF when reading a line
s979342428
p02574
u262597910
1598730847
Python
PyPy3 (7.3.0)
py
Runtime Error
668
197192
677
def pf(N): A = [] while N % 2 == 0: A.append(2) N //= 2 f = 3 while f * f <= N: if N % f == 0: A.append(f) N //= f else: f += 2 if N != 1: A.append(N) return A n = int(input()) a = list(map(int, input().split())) b = [0...
Traceback (most recent call last): File "/tmp/tmpvy6tycta/tmpgsjv46o8.py", line 17, in <module> n = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s033217189
p02574
u914802579
1598730839
Python
Python (3.8.2)
py
Runtime Error
629
132552
593
import math as mt n=int(input()) l=list(map(int,input().split())) gd=l[0] sv=[0]*(10**6+1) for i in range(2,int(len(sv)**0.5)+1): if not sv[i]: sv[i]=i for j in range(2*i,len(sv),i): sv[j]=i an="not coprime" for i in range(n): gd=mt.gcd(gd,l[i]) if gd!=1: print(an) else: an="setwise coprime" ...
Traceback (most recent call last): File "/tmp/tmpa10s6_84/tmp53fpbygd.py", line 2, in <module> n=int(input()) ^^^^^^^ EOFError: EOF when reading a line
s214404761
p02574
u779805689
1598730822
Python
PyPy3 (7.3.0)
py
Runtime Error
652
181752
880
#素因数分解 def Prime_Factorization(N): if N<0: R=[[-1,1]] else: R=[] N=abs(N) k=2 while k*k<=N: if N%k==0: C=0 while N%k==0: C+=1 N//=k R.append([k,C]) k+=1 if N!=1: R.append([N,1]) if n...
Traceback (most recent call last): File "/tmp/tmpp0ygpv16/tmp8vz819vo.py", line 27, in <module> N=int(input()) ^^^^^^^ EOFError: EOF when reading a line
s920310444
p02574
u892340697
1598730804
Python
Python (3.8.2)
py
Runtime Error
33
9172
12
import sympy
s557860160
p02574
u779805689
1598730763
Python
PyPy3 (7.3.0)
py
Runtime Error
719
197380
907
#素因数分解 def Prime_Factorization(N): if N<0: R=[[-1,1]] else: R=[] N=abs(N) k=2 while k*k<=N: if N%k==0: C=0 while N%k==0: C+=1 N//=k R.append([k,C]) k+=1 if N!=1: R.append([N,1]) if n...
Traceback (most recent call last): File "/tmp/tmp_9c6pkl0/tmpwec0n30k.py", line 27, in <module> N=int(input()) ^^^^^^^ EOFError: EOF when reading a line
s824028743
p02574
u892340697
1598730762
Python
Python (3.8.2)
py
Runtime Error
25
9164
519
import sympy n = int(input()) a = list(map(int, input().split())) d = {} flag = False for i in a: f = sympy.factorint(i) for k in f.keys(): try: if d[k] >= 1: d[k] += 1 flag = True except: d[k] = 1 if not flag: print("pairwise coprime"...
Traceback (most recent call last): File "/tmp/tmpimuy6ub4/tmpt821jpz8.py", line 2, in <module> n = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s698759073
p02574
u607075479
1598730754
Python
PyPy3 (7.3.0)
py
Runtime Error
2211
197688
1383
import sys import math from collections import deque from collections import defaultdict 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, n...
Traceback (most recent call last): File "/tmp/tmpz7p43nvt/tmpkbh2_wwr.py", line 70, in <module> main() File "/tmp/tmpz7p43nvt/tmpkbh2_wwr.py", line 40, in main N = NI() ^^^^ File "/tmp/tmpz7p43nvt/tmpkbh2_wwr.py", line 9, in <lambda> NI = lambda: int(input()) ^^^^^^^^^^^^ Valu...
s947916125
p02574
u730257868
1598730749
Python
PyPy3 (7.3.0)
py
Runtime Error
2224
570860
1052
import math def linked_merge_sort(l): #マージソート if len(l) == 1: return q, r = divmod(len(l), 2) left = [l.pop() for _ in range(q)] right = [l.pop() for _ in range(q + r)] linked_merge_sort(left) linked_merge_sort(right) left.reverse() right.reverse() while left and r...
Traceback (most recent call last): File "/tmp/tmpyxou98tg/tmp4oex1o53.py", line 26, in <module> n=int(input()) ^^^^^^^ EOFError: EOF when reading a line
s601316589
p02574
u732963817
1598730737
Python
Python (3.8.2)
py
Runtime Error
250
127560
300
_ = input() A = list(map(int, input().split())) for a, b in itertools.combinations(A, 2): if math.gcd(a, b) != 1: if functools.reduce(math.gcd, A) == 1: print('setwise coprime') else: print('not coprime') break else: print('pairwise coprime')
Traceback (most recent call last): File "/tmp/tmpyx4ewlk4/tmp7fld4yup.py", line 1, in <module> _ = input() ^^^^^^^ EOFError: EOF when reading a line
s770154557
p02574
u981269105
1598730737
Python
Python (3.8.2)
py
Runtime Error
29
9008
865
import java.io.*; import java.util.*; // i want to become the best class Main{ public static void main(String[] args) throws Exception{ BufferedReader reader = new BufferedReader(new InputStreamReader(System.in)); int n = Integer.parseInt(reader.readLine()); long[] list = Arrays.stream(reader.readLine().split(" ...
File "/tmp/tmppxuwmgvx/tmpjrjf46gv.py", line 1 import java.io.*; ^ SyntaxError: invalid syntax
s957418923
p02574
u693666240
1598730732
Python
PyPy3 (7.3.0)
py
Runtime Error
762
208756
1013
mod = 10**9 + 7 def gcd(a, b): return a if b == 0 else gcd(b, a % b) def solve(): n = int(input()) a = list(map(int, input().split())) primes = [] isprime = [True for i in range(1001)] for i in range(2, 1001): if isprime[i]: primes.append(i) for j in range(i * i, ...
Traceback (most recent call last): File "/tmp/tmplkhdboeh/tmpk7rt7de0.py", line 44, in <module> solve() File "/tmp/tmplkhdboeh/tmpk7rt7de0.py", line 5, in solve n = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s803966784
p02574
u207097826
1598730688
Python
PyPy3 (7.3.0)
py
Runtime Error
930
222172
1296
max_val = int(1e+6+1) def make_kago(x): kago = [0 for _ in range(x+1)] sosuu = [] for i in range(2,x+1): if kago[i] != 0: continue sosuu.append(i) for j in range(i, x+1, i): if kago[j] == 0: kago[j] = i return kago, sosuu kago, sosuu = ma...
Traceback (most recent call last): File "/tmp/tmpl4kjncok/tmp5vg54jwu.py", line 33, in <module> N = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s747176839
p02574
u618101737
1598730682
Python
PyPy2 (7.3.0)
py
Runtime Error
424
176024
1582
import sys import math if sys.subversion[0] == "PyPy": import io, atexit sys.stdout = io.BytesIO() atexit.register(lambda: sys.__stdout__.write(sys.stdout.getvalue())) sys.stdin = io.BytesIO(sys.stdin.read()) input = lambda: sys.stdin.readline().rstrip() RS = raw_input RA = lambda x=int: map(x, R...
Traceback (most recent call last): File "/tmp/tmp3q25qhml/tmp11tc2wz3.py", line 4, in <module> if sys.subversion[0] == "PyPy": ^^^^^^^^^^^^^^ AttributeError: module 'sys' has no attribute 'subversion'. Did you mean: 'hexversion'?
s272317811
p02574
u397080265
1598730668
Python
Python (3.8.2)
py
Runtime Error
562
126432
442
mod=10**9+7 n=int(input()) a=list(map(int,input().split())) a.sort() g=a[0] d=defaultdict(int) for i in a: g=math.gcd(g,i) d[i]+=1 if g>1: print("not coprime") p=[0]*(a[-1]+1) ch=0 for i in range (2,a[-1]+1): if p[i]==1: continue p[i]=1 ans=0 for j in range (i,a[-1]+1,i): ans...
Traceback (most recent call last): File "/tmp/tmptlqsbf5p/tmp0wn3iaa0.py", line 2, in <module> n=int(input()) ^^^^^^^ EOFError: EOF when reading a line
s120880932
p02574
u587370992
1598730647
Python
Python (3.8.2)
py
Runtime Error
2281
2314948
391
import math N = int(input()) A = list(map(int, input().split())) def gcd_n(xs): if len(xs) == 1: return xs[0] return math.gcd(xs[0], gcd_n(xs[1:])) if gcd_n(A) != 1: print("not coprime") exit() for i in range(N): for j in range(i + 1, N): if math.gcd(A[i], A[j]) != 1: ...
Traceback (most recent call last): File "/tmp/tmp7viiqru6/tmp9kdx9nkn.py", line 3, in <module> N = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s469971411
p02574
u870178975
1598730388
Python
PyPy3 (7.3.0)
py
Runtime Error
2212
218464
537
def resolve(): n=int(input()) a = list(map(int, input().split())) seki=1 import math from functools import reduce def gcd(*numbers): return reduce(math.gcd, numbers) for i in a: seki*=i c=seki ch=0 for i in range(n-1): seki=int(seki/a[i]) gc=gcd(...
Traceback (most recent call last): File "/tmp/tmpuz8l6_q7/tmptv7tqhjq.py", line 30, in <module> resolve() File "/tmp/tmpuz8l6_q7/tmptv7tqhjq.py", line 2, in resolve n=int(input()) ^^^^^^^ EOFError: EOF when reading a line
s511802657
p02574
u581707881
1598730349
Python
PyPy3 (7.3.0)
py
Runtime Error
2210
212224
1276
import fractions n=int(input()) a = list(map(int, input().split())) ans = a[0] for i in range(1, n): ans = fractions.gcd(ans, a[i]) if ans == 1: break if ans != 1: print("not coprime") exit() l = [2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97, 101, 103, 107, ...
Traceback (most recent call last): File "/tmp/tmp35ibjwm2/tmp1_x0lodc.py", line 2, in <module> n=int(input()) ^^^^^^^ EOFError: EOF when reading a line
s864103555
p02574
u000623733
1598730306
Python
PyPy3 (7.3.0)
py
Runtime Error
116
68700
855
N, M = map(int, input().split()) members = [-1] * N group_count = 0 groups = [0] * N for m in range(M): A, B = map(int, input().split()) A = A - 1 B = B - 1 if members[A]==-1 and members[B]==-1: members[A] = members[B] = group_count groups[group_count] = 2 group_count += 1 ...
Traceback (most recent call last): File "/tmp/tmp85sb04js/tmp777y0mbp.py", line 1, in <module> N, M = map(int, input().split()) ^^^^^^^ EOFError: EOF when reading a line
s419337284
p02574
u036104576
1598730295
Python
PyPy3 (7.3.0)
py
Runtime Error
2210
194040
1167
import sys import itertools # import numpy as np import time import math import heapq from collections import defaultdict sys.setrecursionlimit(10 ** 7) INF = 10 ** 10 + 7 read = sys.stdin.buffer.read readline = sys.stdin.buffer.readline readlines = sys.stdin.buffer.readlines # map(int, input().split()) N = int(inp...
Traceback (most recent call last): File "/tmp/tmp_4jixdm9/tmpaj3aywhm.py", line 17, in <module> N = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s741442729
p02574
u169350228
1598730208
Python
PyPy3 (7.3.0)
py
Runtime Error
321
186968
1896
''' 自宅用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/tmpwoyxvv_r/tmpk9rnr5l0.py", line 90, in <module> main() File "/tmp/tmpwoyxvv_r/tmpk9rnr5l0.py", line 39, in main n = int(ipt()) ^^^^^^^^^^ ValueError: invalid literal for int() with base 10: ''
s546178060
p02574
u242757684
1598730202
Python
PyPy3 (7.3.0)
py
Runtime Error
227
193356
1046
from math import gcd N = 1000001 sieve = [-1] * (N + 1) sieve[0] = sieve[1] = 0 for i in range(N + 1): if sieve[i] != -1: continue else: index = i * i while True: if index > N: break sieve[index] = i index += i isCounted = [0] * 100000...
Traceback (most recent call last): File "/tmp/tmpfa0jq_sq/tmpn9rqn5l5.py", line 18, in <module> M = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s563379564
p02574
u249218427
1598730138
Python
PyPy3 (7.3.0)
py
Runtime Error
2211
191696
537
N = int(input()) A = list(map(int, input().split())) def soinsu(a): result = [] tmp = 2 n = a while tmp <= a: if n%tmp == 0: result.append(tmp) while n%tmp == 0: n //= tmp tmp += 1 return result dict_prime = dict() for a in A: for p in soinsu(a): if p in dict_prime.keys(): ...
Traceback (most recent call last): File "/tmp/tmpoaczmso0/tmprrfuc733.py", line 1, in <module> N = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s565679207
p02574
u535803878
1598730073
Python
PyPy3 (7.3.0)
py
Runtime Error
871
241148
991
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())) def hurui(n): """n以下の素数のリストを返す """ l = list(range(2,n+1)) p = 2 i = 0 while True: l = [item ...
Traceback (most recent call last): File "/tmp/tmpskg7o5mh/tmpbu4vsytz.py", line 7, in <module> n = int(input()) ^^^^^^^^^^^^ ValueError: invalid literal for int() with base 10: ''
s117328110
p02574
u242757684
1598730063
Python
PyPy3 (7.3.0)
py
Runtime Error
240
169580
1046
from math import gcd N = 1000001 sieve = [-1] * (N + 1) sieve[0] = sieve[1] = 0 for i in range(N + 1): if sieve[i] != -1: continue else: index = i * i while True: if index > N: break sieve[index] = i index += i isCounted = [0] * 100000...
Traceback (most recent call last): File "/tmp/tmp8clx1qb0/tmp_6hq09yi.py", line 18, in <module> M = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s459355092
p02574
u304602561
1598730040
Python
PyPy3 (7.3.0)
py
Runtime Error
481
189168
9201
# =============================================================================================== # importing some useful libraries. from __future__ import division, print_function from fractions import Fraction import sys import os from io import BytesIO, IOBase from itertools import * import bisect from heapq import ...
Traceback (most recent call last): File "/tmp/tmpjgj_1txj/tmpi96rcv5_.py", line 298, in <module> n=int(inp()) ^^^^^^^^^^ ValueError: invalid literal for int() with base 10: ''
s921614489
p02574
u607075479
1598730005
Python
PyPy3 (7.3.0)
py
Runtime Error
2211
193900
1289
import sys import math from collections import deque from collections import defaultdict 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, n...
Traceback (most recent call last): File "/tmp/tmp7pzky2j2/tmpdhu59o7m.py", line 62, in <module> main() File "/tmp/tmp7pzky2j2/tmpdhu59o7m.py", line 37, in main N = NI() ^^^^ File "/tmp/tmp7pzky2j2/tmpdhu59o7m.py", line 9, in <lambda> NI = lambda: int(input()) ^^^^^^^^^^^^ Valu...
s454562231
p02574
u089142196
1598729995
Python
Python (3.8.2)
py
Runtime Error
2208
134456
885
#E from math import gcd N=int(input()) A=list(map(int,input().split())) pc = "pairwise coprime" sc = "setwise coprime" nc = "not coprime" def fac(n): arr = set() temp = n for i in range(2, int(-(-n**0.5//1))+1): if temp%i==0: cnt=0 while temp%i==0: cnt+=1 ...
Traceback (most recent call last): File "/tmp/tmpioi8p2z3/tmp81vk8q3i.py", line 3, in <module> N=int(input()) ^^^^^^^ EOFError: EOF when reading a line
s358596585
p02574
u242757684
1598729990
Python
PyPy3 (7.3.0)
py
Runtime Error
350
193688
1017
from math import gcd N = 1000001 sieve = [-1] * (N + 1) sieve[0] = sieve[1] = 0 for i in range(N + 1): if sieve[i] != -1: continue else: index = i * i while True: if index > N: break sieve[index] = i index += i isCounted = [0] * 100000...
Traceback (most recent call last): File "/tmp/tmpminckzaj/tmp_74h_109.py", line 18, in <module> M = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s927746875
p02574
u430726059
1598729974
Python
Python (3.8.2)
py
Runtime Error
678
127312
681
def make_divisors(n): lower_divisors , upper_divisors = [], [] i = 1 while i*i <= n: if n % i == 0: lower_divisors.append(i) if i != n // i: upper_divisors.append(n//i) i += 1 return lower_divisors + upper_divisors[::-1] n=int(input()) alist=list(...
Traceback (most recent call last): File "/tmp/tmpw3ji46qa/tmpgx0dvkl6.py", line 12, in <module> n=int(input()) ^^^^^^^ EOFError: EOF when reading a line
s996693442
p02574
u550294762
1598729899
Python
Python (3.8.2)
py
Runtime Error
24
9056
762
from sympy.ntheory import factorint n = int(input()) a = list(map(int, input().split())) is_pairwise = True is_setwise = False f_set = set() n_set = set() for item in a: if item in n_set: is_pairwise = False break else: n_set.add(item) for fc in factorint(item).keys(): if...
Traceback (most recent call last): File "/tmp/tmp8x9vqnfe/tmpdg6mipz9.py", line 3, in <module> n = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s802414281
p02574
u262597910
1598729897
Python
Python (3.8.2)
py
Runtime Error
26
9256
1532
class UnionFind(): def __init__(self, n): self.n = n self.parents = [-1] * n def find(self, x): if self.parents[x] < 0: return x else: self.parents[x] = self.find(self.parents[x]) return self.parents[x] def union(self, x, y): x = ...
Traceback (most recent call last): File "/tmp/tmp5hccuenj/tmptgyjqpyn.py", line 50, in <module> n,m = map(int, input().split()) ^^^ ValueError: not enough values to unpack (expected 2, got 0)
s783927354
p02574
u870178975
1598729886
Python
PyPy3 (7.3.0)
py
Runtime Error
2213
218244
519
def resolve(): n=int(input()) a = list(map(int, input().split())) seki=1 import math from functools import reduce def gcd(*numbers): return reduce(math.gcd, numbers) for i in a: seki*=i c=seki ch=0 for i in range(n): gc=gcd(a[i], int(seki / a[i])) ...
Traceback (most recent call last): File "/tmp/tmpn22imbqx/tmp7f4p6avm.py", line 29, in <module> resolve() File "/tmp/tmpn22imbqx/tmp7f4p6avm.py", line 2, in resolve n=int(input()) ^^^^^^^ EOFError: EOF when reading a line
s416165249
p02574
u316464887
1598729846
Python
PyPy3 (7.3.0)
py
Runtime Error
1759
197228
652
def main(): N = int(input()) A = list(map(int, input().split())) d = {} def prime_factorize(n): a = set() while n % 2 == 0: a.add(2) n //= 2 f = 3 while f * f <= n: if n % f == 0: a.add(f) n //= f ...
Traceback (most recent call last): File "/tmp/tmptcvi9ibl/tmpnokq3da5.py", line 29, in <module> print(main()) ^^^^^^ File "/tmp/tmptcvi9ibl/tmpnokq3da5.py", line 2, in main N = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s733263117
p02574
u476225888
1598729786
Python
PyPy3 (7.3.0)
py
Runtime Error
644
231780
2590
import sys, math import io, os #data = io.BytesIO(os.read(0,os.fstat(0).st_size)).readline from bisect import bisect_left as bl, bisect_right as br, insort from heapq import heapify, heappush, heappop from collections import defaultdict as dd, deque, Counter # from itertools import permutations,combinations def data():...
Traceback (most recent call last): File "/tmp/tmpst8w4_zu/tmpylsgr8wa.py", line 18, in <module> n=int(data()) ^^^^^^^^^^^ ValueError: invalid literal for int() with base 10: ''
s762549958
p02574
u594787118
1598729756
Python
Python (3.8.2)
py
Runtime Error
2207
133336
774
import math def find_lcm(num1, num2): if(num1>num2): num = num1 den = num2 else: num = num2 den = num1 rem = num % den while(rem != 0): num = den den = rem rem = num % den gcd = den lcm = int(int(num1 * num2)/int(gcd)) ret...
Traceback (most recent call last): File "/tmp/tmpp88kt__7/tmp1egxw7e0.py", line 17, in <module> n=(int)(input()); ^^^^^^^ EOFError: EOF when reading a line
s722164253
p02574
u285681431
1598729684
Python
PyPy3 (7.3.0)
py
Runtime Error
1864
197308
872
from collections import defaultdict N = int(input()) A = list(map(int, input().split())) # 素因数分解、リストで返す ############################################################# def prime_factorize(n): a = [] while n % 2 == 0: a.append(2) n //= 2 f = 3 while f * f <= n: if n % f == 0: ...
Traceback (most recent call last): File "/tmp/tmp02563jlc/tmpt2tj_jow.py", line 2, in <module> N = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s282002370
p02574
u304602561
1598729557
Python
PyPy3 (7.3.0)
py
Runtime Error
590
189124
9198
# =============================================================================================== # importing some useful libraries. from __future__ import division, print_function from fractions import Fraction import sys import os from io import BytesIO, IOBase from itertools import * import bisect from heapq import ...
Traceback (most recent call last): File "/tmp/tmpdvkeg5_l/tmpridevae6.py", line 298, in <module> n=int(inp()) ^^^^^^^^^^ ValueError: invalid literal for int() with base 10: ''
s580084859
p02574
u556589653
1598729475
Python
Python (3.8.2)
py
Runtime Error
592
132692
318
import math N = int(input()) A = list(map(int,input().split())) ls = [] now = A[0] for i in range(1,N): ls.append(math.gcd(now,A[i])) now = math.gcd(now,A[i]) if ls.count(1) == N-1: print("pairwise coprime") else: if ls[N-1] == 1: print("setwise coprime") else: print("not coprime")
Traceback (most recent call last): File "/tmp/tmpiuxi6qqk/tmpy358zhqz.py", line 2, in <module> N = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s522107758
p02574
u170201762
1598729453
Python
PyPy3 (7.3.0)
py
Runtime Error
997
224680
1175
def eratosthenes(n): prime = [] limit = n**0.5 numbers = [i for i in range(2,n+1)] while True: p = numbers[0] if limit <= p: return prime + numbers prime.append(p) numbers = [i for i in numbers if i%p != 0] return prime def eratosthenes(n): prime = []...
Traceback (most recent call last): File "/tmp/tmpduag4f02/tmpjjivloag.py", line 30, in <module> N = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s731577932
p02574
u397080265
1598729400
Python
Python (3.8.2)
py
Runtime Error
564
126488
676
mod=10**9+7 n=int(input()) a=list(map(int,input().split())) a.sort() g=a[0] for i in a: g=math.gcd(g,i) d=dict() for i in a: if i%2==0: if 2 in d: d[2]+=1 else: d[2]=1 while i%2==0: i//=2 for j in range (3, int(math.sqrt(i))+1 ): if i%j==0: ...
Traceback (most recent call last): File "/tmp/tmp102_5_i3/tmpuqm8k9nn.py", line 2, in <module> n=int(input()) ^^^^^^^ EOFError: EOF when reading a line
s853501416
p02574
u600673553
1598729388
Python
PyPy3 (7.3.0)
py
Runtime Error
150
68660
502
n = int(input()) a = list(map(int,input().split())) import math from functools import reduce def gcd(*numbers): return reduce(math.gcd, numbers) def gcd_list(numbers): return reduce(math.gcd, numbers) for i in range(n-1): for j in range(i+1:n): if gcd(a[i],a[j]) != 1: p = 1 break else:...
File "/tmp/tmprs91ii69/tmpfuugkw14.py", line 14 for j in range(i+1:n): ^ SyntaxError: invalid syntax
s401204938
p02574
u751724075
1598729278
Python
PyPy3 (7.3.0)
py
Runtime Error
2210
204776
798
import math def factorize(n): result = set() sqrt = math.floor(math.sqrt(n)) i = 2 while i <= sqrt: if n % i == 0: result.add(i) n //= i sqrt = math.floor(math.sqrt(n)) else: i += 1 if n > 1: result.add(n) return result N = int(input()) A_list = list(map(int, input().split())) m = max(A_list)...
Traceback (most recent call last): File "/tmp/tmpemr025h8/tmpglqp4xnm.py", line 18, in <module> N = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s180066084
p02574
u535803878
1598729272
Python
PyPy3 (7.3.0)
py
Runtime Error
2290
3249392
1157
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())) def hurui(n): """n以下の素数のリストを返す """ l = list(range(2,n+1)) p = 2 i = 0 while True: l = [item ...
Traceback (most recent call last): File "/tmp/tmp_w0rz2n2/tmpq5m2yl47.py", line 7, in <module> n = int(input()) ^^^^^^^^^^^^ ValueError: invalid literal for int() with base 10: ''
s832209654
p02574
u047816928
1598729104
Python
Python (3.8.2)
py
Runtime Error
2208
127400
480
def factorize(x): p = 2 f = {} while x*x>=p: if x%p==0: f[p]=0 while x%p==0: f[p]+=1 x//=p p+=1 if x>1: f[x]=1 return f N = int(input()) A = list(map(int, input().split())) F = {} for a in A: for f in set(factorize(a)): if f not in F: F[...
Traceback (most recent call last): File "/tmp/tmp3jx3ki_k/tmpqzs1_jqu.py", line 13, in <module> N = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s074867247
p02574
u918601425
1598729011
Python
Python (3.8.2)
py
Runtime Error
2207
127312
567
N=int(input()) ls=[int(s) for s in input().split()] M=max(ls) #素数のリスト作成 prime=[1 for i in range(M+1)] prime[0]=0 prime[1]=0 primels=[] primedic={} for i in range(2,M+1): if prime[i]==1: primels.append(i) primedic[i]=0 a=1 while a*i<=M: prime[a*i]=0 a+=1 for e in ls: for p in primels: ...
Traceback (most recent call last): File "/tmp/tmpxn_ksfid/tmpexllj0d_.py", line 1, in <module> N=int(input()) ^^^^^^^ EOFError: EOF when reading a line
s349881501
p02574
u467736898
1598728839
Python
Python (3.8.2)
py
Runtime Error
653
215136
959
from itertools import groupby def fast_prime_factorization_many(lst): # 素因数分解(ロー法、複数) from subprocess import Popen, PIPE res = Popen(["factor"] + list(map(str, lst)), stdout=PIPE).communicate()[0].split(b"\n")[:-1] return [list(map(int, r.split()[1:])) for r in res] def main(): N = int(input()) ...
Traceback (most recent call last): File "/tmp/tmp9kp1brid/tmpi40shpdg.py", line 32, in <module> main() File "/tmp/tmp9kp1brid/tmpi40shpdg.py", line 10, in main N = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s550278998
p02574
u327466606
1598728699
Python
PyPy3 (7.3.0)
py
Runtime Error
2209
183868
671
from math import gcd from functools import reduce from collections import Counter from itertools import chain # 素因数分解 def prime_factors(n): i = 2 while i * i <= n: if n % i: i += 1 else: n //= i yield i if n > 1: yield n def solve(A): d = r...
Traceback (most recent call last): File "/tmp/tmp6s6iv14c/tmpob5cqlme.py", line 33, in <module> N = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s317221646
p02574
u218843509
1598728580
Python
PyPy3 (7.3.0)
py
Runtime Error
415
197356
575
from sys import exit from math import gcd n = int(input()) a = list(map(int, input().split())) g = gcd(a[0], a[1]) for i in range(2, n): g = gcd(g, a[i]) if g > 1: print("not coprime") exit() MAX = 32 nxt = [i for i in range(MAX)] for i in range(2, MAX): if nxt[i] < i: continue for j in range(i, MAX, i): nxt[...
Traceback (most recent call last): File "/tmp/tmp70xyqsf3/tmpdcielfvt.py", line 3, in <module> n = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s624459980
p02574
u368780724
1598728533
Python
PyPy3 (7.3.0)
py
Runtime Error
908
193536
797
import sys readline = sys.stdin.readline #エラトステネスの篩と素因数分解 from collections import Counter def gcd(a,b): while b: a, b = b, a%b return a M = 10**6 + 8 prime = [0]*M for i in range(2, M): if prime[i]: continue for j in range(i, M, i): if not prime[j]: prime[j] = i d...
Traceback (most recent call last): File "/tmp/tmp_1bn266j/tmpiycxa1rp.py", line 29, in <module> N = int(readline()) ^^^^^^^^^^^^^^^ ValueError: invalid literal for int() with base 10: ''
s634554564
p02575
u173925978
1600393173
Python
Python (3.8.2)
py
Runtime Error
420
27964
413
H,W = list(map(int, input().split())) al = [] bl = [] for _ in range(H): A,B = list(map(int, input().split())) al.append(A-1) bl.append(B-1) x = [0] * (H+1) d = [-1] * (H+1) d[0] = 0 for i in range(H): if a[i] <= x[i] <= b[i]: if b[i] < W-1: d[i+1] = d[i] + b[i] - x[i] + 2 x[i+1] = b[i]+1 e...
Traceback (most recent call last): File "/tmp/tmpl4p6hj_u/tmptqbjetlj.py", line 1, in <module> H,W = list(map(int, input().split())) ^^^^^^^ EOFError: EOF when reading a line
s449466979
p02575
u648257619
1599809580
Python
PyPy3 (7.3.0)
py
Runtime Error
2336
3514308
443
h,w = map(int,input().split()) k = h*w d = [[0]*(w+1)]+[[k]*(w+1) for i in range(h)] for i in range(h): a,b = map(int,input().split()) f = 0 d[i+1][0] = k for j in range(1,a): d[i+1][j] = min(d[i+1][j],d[i][j]+1,d[i+1][j-1]+1) for j in range(a,b+1): d[i+1][j] = min(d[i+1][j],d[i+1][j-1]+1) for j in ...
Traceback (most recent call last): File "/tmp/tmpuxxf29st/tmpkifrqidh.py", line 1, in <module> h,w = map(int,input().split()) ^^^^^^^ EOFError: EOF when reading a line
s944456863
p02575
u340781749
1599614846
Python
Python (3.8.2)
py
Runtime Error
116
27908
333208
import os import sys import numpy as np def solve(inp): RBST_CHILDREN = [] RBST_VALUES = [] RBST_COUNTS = [] RBST_INDICES = [] RBST_ROOTS = [] def rbst_init(): lst = [0] lst.clear() RBST_CHILDREN.append([[0], [0]]) RBST_VALUES.append([0]) RBST_COUNTS.a...
WA
s784587098
p02575
u340781749
1599609605
Python
Python (3.8.2)
py
Runtime Error
25
9036
99
import time if sys.argv[-1] == 'ONLINE_JUDGE': time.sleep(60) exit() print('RE or WA or TLE')
Traceback (most recent call last): File "/tmp/tmp2el_2b7b/tmpt07viyb2.py", line 3, in <module> if sys.argv[-1] == 'ONLINE_JUDGE': ^^^ NameError: name 'sys' is not defined
s169972649
p02575
u340781749
1599609401
Python
Python (3.8.2)
py
Runtime Error
119
27192
8230
import os import sys import numpy as np def solve(inp): RBST_CHILDREN = [] RBST_VALUES = [] RBST_COUNTS = [] RBST_INDICES = [] RBST_ROOTS = [] def rbst_init(): lst = [0] lst.clear() RBST_CHILDREN.append([[0], [0]]) RBST_VALUES.append([0]) RBST_COUNTS.a...
Traceback (most recent call last): File "/tmp/tmprfwyoyl8/tmpdwat8pc9.py", line 291, in <module> from my_module import solve ModuleNotFoundError: No module named 'my_module'
s682087637
p02575
u642085002
1599488598
Python
Python (3.8.2)
py
Runtime Error
2207
67840
740
H, W = map(int, input().split()) A = [] B = [] for _ in range(H): a, b = map(int, input().split()) A.append(a) B.append(b) path = dict((i, i)for i in range(1, W+1)) diff = dict((i, 0)for i in range(1, W+1)) for k in range(H): updates = [] for s, t in path.items(): if A[k] <= t <= B[k]: ...
Traceback (most recent call last): File "/tmp/tmpeyyuswg_/tmpqmo8886r.py", line 1, in <module> H, W = map(int, input().split()) ^^^^^^^ EOFError: EOF when reading a line
s703532275
p02575
u231570044
1599402414
Python
Python (3.8.2)
py
Runtime Error
2207
53480
758
import numpy as np INF = 10**6 H, W = list(map(int, input().split())) A, B = [0]*(H+2), [0]*(H+2) for i in range(1, H+1): A[i], B[i] = list(map(int, input().split())) pos = np.array(range(1, W+1)) init = np.array(range(1, W+1)) for h in range(1, H+1): skp = B[h]+1 if B[h] == W: skp = INF lft = np.sear...
Traceback (most recent call last): File "/tmp/tmp3a1d43cf/tmpksjxkh_y.py", line 3, in <module> H, W = list(map(int, input().split())) ^^^^^^^ EOFError: EOF when reading a line
s785181701
p02575
u231570044
1599379241
Python
PyPy3 (7.3.0)
py
Runtime Error
2355
3516848
583
H, W = list(map(int, input().split())) A, B = [0]*(H+1), [0]*(H+1) for i in range(1, H+1): A[i], B[i] = list(map(int, input().split())) INF = 10**6 dp = [ [INF]*(W+2) for _ in range(H+2) ] dp[1][1] = 0 for h in range(1, H+1): for w in range(1, W+1): cur = dp[h][w] if cur == INF: continue ...
Traceback (most recent call last): File "/tmp/tmp5sb8675k/tmpak6ebvr_.py", line 1, in <module> H, W = list(map(int, input().split())) ^^^^^^^ EOFError: EOF when reading a line
s062899344
p02575
u071680334
1599304718
Python
PyPy3 (7.3.0)
py
Runtime Error
1072
122788
6011
from sys import stdin input = stdin.readline class SegTreeFlag(): def segFunc(self, x, y): return x+y def searchIndexFunc(self, val): return val > 0 def __init__(self, ide, init_val): n = len(init_val) self.ide_ele = ide self.num = 2**(n-1).bit_length() self....
Traceback (most recent call last): File "/tmp/tmpnbbr8_rm/tmpgy9ihqtl.py", line 187, in <module> main() File "/tmp/tmpnbbr8_rm/tmpgy9ihqtl.py", line 157, in main h, w = map(int, input().split()) ^^^^ ValueError: not enough values to unpack (expected 2, got 0)
s478990807
p02575
u071680334
1599303059
Python
PyPy3 (7.3.0)
py
Runtime Error
1045
121400
5960
from sys import stdin input = stdin.readline class SegTreeFlag(): def segFunc(self, x, y): return x+y def searchIndexFunc(self, val): return val > 0 def __init__(self, ide, init_val): n = len(init_val) self.ide_ele = ide self.num = 2**(n-1).bit_length() self....
Traceback (most recent call last): File "/tmp/tmp49258ztf/tmpennhrdgk.py", line 186, in <module> main() File "/tmp/tmp49258ztf/tmpennhrdgk.py", line 157, in main h, w = map(int, input().split()) ^^^^ ValueError: not enough values to unpack (expected 2, got 0)
s157601191
p02575
u071680334
1599302196
Python
PyPy3 (7.3.0)
py
Runtime Error
2209
132436
5845
class SegTreeFlag(): def segFunc(self, x, y): return x+y def searchIndexFunc(self, val): return val > 0 def __init__(self, ide, init_val): n = len(init_val) self.ide_ele = ide self.num = 2**(n-1).bit_length() self.seg = [self.ide_ele] * 2 * self.num fo...
Traceback (most recent call last): File "/tmp/tmp7l_vebg7/tmpzq7z1pva.py", line 178, in <module> main() File "/tmp/tmp7l_vebg7/tmpzq7z1pva.py", line 154, in main h, w = map(int, input().split()) ^^^^^^^ EOFError: EOF when reading a line
s913386968
p02575
u340781749
1599267341
Python
Python (3.8.2)
py
Runtime Error
115
27240
9133
import os import sys import numpy as np def rbst_merge(children, counts, left_root, right_root): li = left_root ri = right_root stack = [] while li != -1 and ri != -1: if np.random.randint(counts[li] + counts[ri]) < counts[li]: stack.append((li, 1)) li = children[li, 1...
Traceback (most recent call last): File "/tmp/tmpll9cj7_x/tmpznsd6fj1.py", line 272, in <module> from my_module import solve, rbst_merge, rbst_split, rbst_insert, rbst_delete, \ ModuleNotFoundError: No module named 'my_module'
s514646757
p02575
u340781749
1599267157
Python
Python (3.8.2)
py
Runtime Error
24
8932
81
if sys.argv[-1] == 'ONLINE_JUDGE': assert False exit() print('RE or WA')
Traceback (most recent call last): File "/tmp/tmp00ervrl4/tmpjtvuluww.py", line 1, in <module> if sys.argv[-1] == 'ONLINE_JUDGE': ^^^ NameError: name 'sys' is not defined
s887166248
p02575
u340781749
1599267053
Python
Python (3.8.2)
py
Runtime Error
117
26804
9133
import os import sys import numpy as np def rbst_merge(children, counts, left_root, right_root): li = left_root ri = right_root stack = [] while li != -1 and ri != -1: if np.random.randint(counts[li] + counts[ri]) < counts[li]: stack.append((li, 1)) li = children[li, 1...
Traceback (most recent call last): File "/tmp/tmp2d3v87no/tmpp9l1gao5.py", line 272, in <module> from my_module import solve, rbst_merge, rbst_split, rbst_insert, rbst_delete, \ ModuleNotFoundError: No module named 'my_module'
s992215944
p02575
u340781749
1599265718
Python
Python (3.8.2)
py
Runtime Error
115
27200
8937
import os import sys import numpy as np def solve(inp): def rbst_merge(children, counts, left_root, right_root): li = left_root ri = right_root stack = [] while li != -1 and ri != -1: if np.random.randint(counts[li] + counts[ri]) < counts[li]: stack.app...
Traceback (most recent call last): File "/tmp/tmp8jfw7rdf/tmpk1cwds9j.py", line 258, in <module> from my_module import solve ModuleNotFoundError: No module named 'my_module'
s255152984
p02575
u340781749
1599230829
Python
Python (3.8.2)
py
Runtime Error
112
27092
8955
import os import sys import numpy as np def solve(inp): def rbst_merge(children, counts, left_root, right_root): li = left_root ri = right_root stack = [] while li != -1 and ri != -1: if np.random.randint(counts[li] + counts[ri]) < counts[li]: stack.app...
Traceback (most recent call last): File "/tmp/tmpaiowqj19/tmpghj3j_zx.py", line 260, in <module> from my_module import solve ModuleNotFoundError: No module named 'my_module'
s237974705
p02575
u340781749
1599230489
Python
Python (3.8.2)
py
Runtime Error
117
27236
8952
import os import sys import numpy as np def solve(inp): def rbst_merge(children, counts, left_root, right_root): li = left_root ri = right_root stack = [] while li != -1 and ri != -1: if np.random.randint(counts[li] + counts[ri]) < counts[li]: stack.app...
Traceback (most recent call last): File "/tmp/tmp_opcc3vk/tmp55ei2ki4.py", line 260, in <module> from my_module import solve ModuleNotFoundError: No module named 'my_module'
s649803806
p02575
u340781749
1599230176
Python
Python (3.8.2)
py
Runtime Error
119
27056
8950
import os import sys import numpy as np def solve(inp): def rbst_merge(children, counts, left_root, right_root): li = left_root ri = right_root stack = [] while li != -1 and ri != -1: if np.random.randint(counts[li] + counts[ri]) < counts[li]: stack.app...
Traceback (most recent call last): File "/tmp/tmpqlzc8ftv/tmpw8stq1cs.py", line 260, in <module> from my_module import solve ModuleNotFoundError: No module named 'my_module'
s877180885
p02575
u340781749
1599229989
Python
Python (3.8.2)
py
Runtime Error
116
27064
8966
import os import sys import numpy as np def solve(inp): def rbst_merge(children, counts, left_root, right_root): li = left_root ri = right_root stack = [] while li != -1 and ri != -1: if np.random.randint(counts[li] + counts[ri]) < counts[li]: stack.app...
Traceback (most recent call last): File "/tmp/tmpuooo26q4/tmp4zitkha0.py", line 262, in <module> from my_module import solve ModuleNotFoundError: No module named 'my_module'
s649606931
p02575
u340781749
1599229230
Python
Python (3.8.2)
py
Runtime Error
118
27096
8951
import os import sys import numpy as np def solve(inp): def rbst_merge(children, counts, left_root, right_root): li = left_root ri = right_root stack = [] while li != -1 and ri != -1: if np.random.randint(counts[li] + counts[ri]) < counts[li]: stack.app...
Traceback (most recent call last): File "/tmp/tmpvumv2v5a/tmpg61i35gt.py", line 262, in <module> from my_module import solve ModuleNotFoundError: No module named 'my_module'
s028747860
p02575
u340781749
1599229167
Python
Python (3.8.2)
py
Runtime Error
146
27128
9008
import os import sys import numpy as np def solve(inp): def rbst_merge(children, counts, left_root, right_root): li = left_root ri = right_root stack = [] while li != -1 and ri != -1: if np.random.randint(counts[li] + counts[ri]) < counts[li]: stack.app...
Traceback (most recent call last): File "/tmp/tmp6tsmno98/tmpxart1t56.py", line 263, in <module> from my_module import solve ModuleNotFoundError: No module named 'my_module'
s442723877
p02575
u340781749
1599229014
Python
Python (3.8.2)
py
Runtime Error
113
27184
8953
import os import sys import numpy as np def solve(inp): def rbst_merge(children, counts, left_root, right_root): li = left_root ri = right_root stack = [] while li != -1 and ri != -1: if np.random.randint(counts[li] + counts[ri]) < counts[li]: stack.app...
Traceback (most recent call last): File "/tmp/tmprxa0xht9/tmp_hw4xqpc.py", line 261, in <module> from my_module import solve ModuleNotFoundError: No module named 'my_module'
s101593411
p02575
u340781749
1599228952
Python
Python (3.8.2)
py
Runtime Error
114
27220
8954
import os import sys import numpy as np def solve(inp): def rbst_merge(children, counts, left_root, right_root): li = left_root ri = right_root stack = [] while li != -1 and ri != -1: if np.random.randint(counts[li] + counts[ri]) < counts[li]: stack.app...
Traceback (most recent call last): File "/tmp/tmpnzz6r8v9/tmpas13xy1s.py", line 261, in <module> from my_module import solve ModuleNotFoundError: No module named 'my_module'
s838957500
p02575
u340781749
1599228813
Python
Python (3.8.2)
py
Runtime Error
114
27128
8950
import os import sys import numpy as np def solve(inp): def rbst_merge(children, counts, left_root, right_root): li = left_root ri = right_root stack = [] while li != -1 and ri != -1: if np.random.randint(counts[li] + counts[ri]) < counts[li]: stack.app...
Traceback (most recent call last): File "/tmp/tmp6yyxvay6/tmpgbt6z76w.py", line 261, in <module> from my_module import solve ModuleNotFoundError: No module named 'my_module'
s179265384
p02575
u340781749
1599228768
Python
Python (3.8.2)
py
Runtime Error
111
27240
8948
import os import sys import numpy as np def solve(inp): def rbst_merge(children, counts, left_root, right_root): li = left_root ri = right_root stack = [] while li != -1 and ri != -1: if np.random.randint(counts[li] + counts[ri]) < counts[li]: stack.app...
Traceback (most recent call last): File "/tmp/tmp485mac5a/tmpd2lh9cb9.py", line 261, in <module> from my_module import solve ModuleNotFoundError: No module named 'my_module'
s695485710
p02575
u340781749
1599227136
Python
Python (3.8.2)
py
Runtime Error
114
26884
8962
import os import sys import numpy as np def solve(inp): def rbst_merge(children, counts, left_root, right_root): li = left_root ri = right_root stack = [] while li != -1 and ri != -1: if np.random.randint(counts[li] + counts[ri]) < counts[li]: stack.app...
Traceback (most recent call last): File "/tmp/tmp4o93lxd2/tmpe9ofygkq.py", line 259, in <module> from my_module import solve ModuleNotFoundError: No module named 'my_module'
s085600293
p02575
u340781749
1599226851
Python
Python (3.8.2)
py
Runtime Error
114
27204
9020
import os import sys import numpy as np def solve(inp): def rbst_merge(children, counts, left_root, right_root): li = left_root ri = right_root stack = [] while li != -1 and ri != -1: if np.random.randint(counts[li] + counts[ri]) < counts[li]: stack.app...
Traceback (most recent call last): File "/tmp/tmpgmihrlc5/tmpkuof_us9.py", line 260, in <module> from my_module import solve ModuleNotFoundError: No module named 'my_module'
s311124357
p02575
u044220565
1599056045
Python
PyPy3 (7.3.0)
py
Runtime Error
619
105716
7726
# 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/tmph5kd0hqo/tmposof1zgv.py", line 271, in <module> run() File "/tmp/tmph5kd0hqo/tmposof1zgv.py", line 239, in run H,W = map(int, sysread().split()) ^^^ ValueError: not enough values to unpack (expected 2, got 0)
s629660307
p02575
u493130708
1599008032
Python
PyPy3 (7.3.0)
py
Runtime Error
753
173360
5063
# -*- coding: utf-8 -*- ############# # Libraries # ############# import sys input = sys.stdin.readline import math #from math import gcd import bisect import heapq from collections import defaultdict from collections import deque from collections import Counter from functools import lru_cache ############# # Const...
Traceback (most recent call last): File "/tmp/tmpuro1u7ql/tmpk101_gle.py", line 152, in <module> H,W = IL() ^^^ ValueError: not enough values to unpack (expected 2, got 0)
s631032885
p02575
u493130708
1599007745
Python
PyPy3 (7.3.0)
py
Runtime Error
490
172820
1854
import sys input = sys.stdin.readline from collections import defaultdict def DD(arg): return defaultdict(arg) def int_log(n, a): count = 0 while n>=a: n //= a count += 1 return count H,W = list(map(int,input().split())) data = [list(map(int, input().split())) for _ in range(H)] class BIT: def __in...
Traceback (most recent call last): File "/tmp/tmpd4pietav/tmp_qga69re.py", line 15, in <module> H,W = list(map(int,input().split())) ^^^ ValueError: not enough values to unpack (expected 2, got 0)
s528442823
p02575
u493130708
1599007722
Python
PyPy3 (7.3.0)
py
Runtime Error
498
172828
1854
import sys input = sys.stdin.readline from collections import defaultdict def DD(arg): return defaultdict(arg) def int_log(n, a): count = 0 while n>=a: n //= a count += 1 return count H,W = list(map(int,input().split())) data = [list(map(int, input().split())) for _ in range(H)] class BIT: def __in...
Traceback (most recent call last): File "/tmp/tmp_fultrsv/tmpk6h_yjsh.py", line 15, in <module> H,W = list(map(int,input().split())) ^^^ ValueError: not enough values to unpack (expected 2, got 0)