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
s387903052
p04049
u284854859
1550812204
Python
Python (3.4.3)
py
Runtime Error
1775
4664
781
import sys input = sys.stdin.readline n,k = map(int,input().split()) edge = [[] for i in range(n)] alledge = [] for i in range(n-1): a,b = map(int,input().split()) edge[a-1].append(b-1) edge[b-1].append(a-1) alledge.append([a-1,b-1]) if n==2: print(0) exit() def f(x,y,c): c += 1 for e ...
Traceback (most recent call last): File "/tmp/tmp_n821_ax/tmpn1qhlpix.py", line 3, in <module> n,k = map(int,input().split()) ^^^ ValueError: not enough values to unpack (expected 2, got 0)
s691044328
p04049
u284854859
1550811642
Python
Python (3.4.3)
py
Runtime Error
2104
4652
835
import sys input = sys.stdin.readline n,k = map(int,input().split()) edge = [[] for i in range(n)] alledge = [] for i in range(n-1): a,b = map(int,input().split()) edge[a-1].append(b-1) edge[b-1].append(a-1) alledge.append([a-1,b-1]) if n==2: print(0) exit() def f(x,y,c): c += 1 if len...
Traceback (most recent call last): File "/tmp/tmp92jpuct4/tmp_imidxf_.py", line 3, in <module> n,k = map(int,input().split()) ^^^ ValueError: not enough values to unpack (expected 2, got 0)
s299004138
p04049
u284854859
1550811039
Python
Python (3.4.3)
py
Runtime Error
1969
4664
832
import sys input = sys.stdin.readline n,k = map(int,input().split()) edge = [[] for i in range(n)] alledge = [] for i in range(n-1): a,b = map(int,input().split()) edge[a-1].append(b-1) edge[b-1].append(a-1) alledge.append([a-1,b-1]) if n==2: print(0) exit() def f(x,y,c): c += 1 if len...
Traceback (most recent call last): File "/tmp/tmpa2uduczz/tmp951r_c92.py", line 3, in <module> n,k = map(int,input().split()) ^^^ ValueError: not enough values to unpack (expected 2, got 0)
s584456806
p04049
u284854859
1550810901
Python
Python (3.4.3)
py
Runtime Error
1121
4668
775
import sys input = sys.stdin.readline n,k = map(int,input().split()) edge = [[] for i in range(n)] alledge = [] for i in range(n-1): a,b = map(int,input().split()) edge[a-1].append(b-1) edge[b-1].append(a-1) alledge.append([a-1,b-1]) if n==2: print(0) exit() def f(x,y,c): c += 1 for e ...
Traceback (most recent call last): File "/tmp/tmprihd0ryr/tmpecbgryil.py", line 3, in <module> n,k = map(int,input().split()) ^^^ ValueError: not enough values to unpack (expected 2, got 0)
s310044627
p04049
u284854859
1550810751
Python
Python (3.4.3)
py
Runtime Error
1951
4676
944
import sys input = sys.stdin.readline n,k = map(int,input().split()) edge = [[] for i in range(n)] alledge = [] for i in range(n-1): a,b = map(int,input().split()) edge[a-1].append(b-1) edge[b-1].append(a-1) alledge.append([a-1,b-1]) if n==2: print(0) exit() def f(x,y,c): c += 1 for e ...
Traceback (most recent call last): File "/tmp/tmp2ljfdlo5/tmp6l585kyg.py", line 3, in <module> n,k = map(int,input().split()) ^^^ ValueError: not enough values to unpack (expected 2, got 0)
s621226825
p04049
u284854859
1550810351
Python
Python (3.4.3)
py
Runtime Error
1438
4648
767
import sys input = sys.stdin.readline n,k = map(int,input().split()) edge = [[] for i in range(n)] alledge = [] for i in range(n-1): a,b = map(int,input().split()) edge[a-1].append(b-1) edge[b-1].append(a-1) alledge.append([a-1,b-1]) if n==2: print(0) exit() def f(x,y,c): c += 1 for e ...
Traceback (most recent call last): File "/tmp/tmpk8x9xzfr/tmp3y7mi0ca.py", line 3, in <module> n,k = map(int,input().split()) ^^^ ValueError: not enough values to unpack (expected 2, got 0)
s726216232
p04049
u284854859
1550809842
Python
Python (3.4.3)
py
Runtime Error
1514
4596
816
import sys input = sys.stdin.readline n,k = map(int,input().split()) edge = [[] for i in range(n)] alledge = [] for i in range(n-1): a,b = map(int,input().split()) edge[a-1].append(b-1) edge[b-1].append(a-1) alledge.append((a-1,b-1)) if n==2: print(0) exit() def f(x,y,c): c += 1 for e ...
Traceback (most recent call last): File "/tmp/tmpwz_ni14c/tmp61bzgzse.py", line 3, in <module> n,k = map(int,input().split()) ^^^ ValueError: not enough values to unpack (expected 2, got 0)
s811438918
p04049
u284854859
1550809375
Python
Python (3.4.3)
py
Runtime Error
1368
4588
791
import sys input = sys.stdin.readline n,k = map(int,input().split()) edge = [[] for i in range(n)] alledge = [] for i in range(n-1): a,b = map(int,input().split()) edge[a-1].append(b-1) edge[b-1].append(a-1) alledge.append((a-1,b-1)) if n==2: print(0) exit() def f(x,y,c): c += 1 for e ...
Traceback (most recent call last): File "/tmp/tmpwik77fxo/tmp2t298ws4.py", line 3, in <module> n,k = map(int,input().split()) ^^^ ValueError: not enough values to unpack (expected 2, got 0)
s626659322
p04049
u284854859
1550809114
Python
Python (3.4.3)
py
Runtime Error
1461
4588
768
#import sys #input = sys.stdin.readline n,k = map(int,input().split()) edge = [[] for i in range(n)] alledge = [] for i in range(n-1): a,b = map(int,input().split()) edge[a-1].append(b-1) edge[b-1].append(a-1) alledge.append((a-1,b-1)) if n==2: print(0) exit() def f(x,y,c): c += 1 for ...
Traceback (most recent call last): File "/tmp/tmpp9nzg0u8/tmp8ur8x9vl.py", line 3, in <module> n,k = map(int,input().split()) ^^^^^^^ EOFError: EOF when reading a line
s397303827
p04049
u284854859
1550808843
Python
Python (3.4.3)
py
Runtime Error
1473
4592
766
import sys input = sys.stdin.readline n,k = map(int,input().split()) edge = [[] for i in range(n)] alledge = [] for i in range(n-1): a,b = map(int,input().split()) edge[a-1].append(b-1) edge[b-1].append(a-1) alledge.append((a-1,b-1)) if n==2: print(0) exit() def f(x,y,c): c += 1 for e ...
Traceback (most recent call last): File "/tmp/tmpy4_yfmiq/tmpekp2v2c1.py", line 3, in <module> n,k = map(int,input().split()) ^^^ ValueError: not enough values to unpack (expected 2, got 0)
s098360855
p04049
u111421568
1537411803
Python
Python (3.4.3)
py
Runtime Error
1280
5208
873
n, k = map(int, input().split()) import sys sys.setrecursionlimit(2000) l = [[] for i in range(n)] for i in range(n-1): a, b = map(int, input().split()) l[a-1].append(b-1) l[b-1].append(a-1) def first_search(first, depth): record = 0 for i in l[first]: temp = search(first, i, depth-1) ...
Traceback (most recent call last): File "/tmp/tmpfsntac1q/tmpci0t8v5j.py", line 1, in <module> n, k = map(int, input().split()) ^^^^^^^ EOFError: EOF when reading a line
s651912799
p04049
u111421568
1537411224
Python
Python (3.4.3)
py
Runtime Error
1203
5204
724
n, k = map(int, input().split()) import sys sys.setrecursionlimit(2000) l = [[] for i in range(n)] for i in range(n-1): a, b = map(int, input().split()) l[a-1].append(b-1) l[b-1].append(a-1) def first_search(first, depth): record = 0 for i in l[first]: temp = search(first, i, depth-1) ...
Traceback (most recent call last): File "/tmp/tmpfdoq9yod/tmpqjgrh4tm.py", line 1, in <module> n, k = map(int, input().split()) ^^^^^^^ EOFError: EOF when reading a line
s070727505
p04049
u111421568
1537402449
Python
Python (3.4.3)
py
Runtime Error
1207
5200
763
n, k = map(int, input().split()) import sys sys.setrecursionlimit(2000) l = [[] for i in range(n)] for i in range(n-1): a, b = map(int, input().split()) l[a-1].append(b-1) l[b-1].append(a-1) def first_search(first, depth): record = 0 for i in l[first]: temp = search(first, i, depth-1) ...
Traceback (most recent call last): File "/tmp/tmpkz27rnnh/tmp2wq9tw8w.py", line 1, in <module> n, k = map(int, input().split()) ^^^^^^^ EOFError: EOF when reading a line
s799452240
p04049
u111421568
1537400641
Python
Python (3.4.3)
py
Runtime Error
1187
4300
749
n, k = map(int, input().split()) l = [[] for i in range(n)] for i in range(n-1): a, b = map(int, input().split()) l[a-1].append(b-1) l[b-1].append(a-1) l2 = [0 for i in range(n)] def first_search(first, depth): record = 0 for i in l[first]: temp = search(first, i, depth-1) if re...
Traceback (most recent call last): File "/tmp/tmpwnf8k9ub/tmp2c2j47t_.py", line 1, in <module> n, k = map(int, input().split()) ^^^^^^^ EOFError: EOF when reading a line
s284151588
p04049
u631277801
1536947230
Python
PyPy3 (2.4.0)
py
Runtime Error
419
48988
1780
import sys stdin = sys.stdin def li(): return map(int, stdin.readline().split()) def li_(): return map(lambda x: int(x)-1, stdin.readline().split()) def lf(): return map(float, stdin.readline().split()) def ls(): return stdin.readline().split() def ns(): return stdin.readline().rstrip() def lc(): return list(ns()) def...
Traceback (most recent call last): File "/tmp/tmp33i1styc/tmpwqb88yy0.py", line 40, in <module> n,k = li() ^^^ ValueError: not enough values to unpack (expected 2, got 0)
s304854364
p04049
u224119305
1533123762
Python
Python (3.4.3)
py
Runtime Error
170
73124
723
import numpy as np N, K = map(int, input().split()) E = np.zeros((N, N), dtype=int) # Elist = [] for e in range(N-1): i, o = map(int, input().split()) # Elist.append((i-1, o-1)) E[i-1][o-1] = 1 E[o-1][i-1] = 1 # print("N, K=", N, K) # for e in Elist: # print(e[0], e[1]) I = np.eye(N, dtype=int)...
Traceback (most recent call last): File "/tmp/tmpei8dztae/tmp_gjhlqvv.py", line 3, in <module> N, K = map(int, input().split()) ^^^^^^^ EOFError: EOF when reading a line
s669543599
p04049
u224119305
1533123464
Python
Python (3.4.3)
py
Runtime Error
343
73036
715
import numpy as np N, K = map(int, input().split()) E = np.zeros((N, N), dtype=int) Elist = [] for e in range(N-1): i, o = map(int, input().split()) Elist.append((i-1, o-1)) E[i-1][o-1] = 1 E[o-1][i-1] = 1 # print("N, K=", N, K) # for e in Elist: # print(e[0], e[1]) I = np.eye(N, dtype=int)...
Traceback (most recent call last): File "/tmp/tmpfuv4a8lb/tmptnaxt8vp.py", line 3, in <module> N, K = map(int, input().split()) ^^^^^^^ EOFError: EOF when reading a line
s624676471
p04049
u224119305
1533123191
Python
Python (3.4.3)
py
Runtime Error
173
73032
648
import numpy as np N, K = map(int, input().split()) E = np.zeros((N, N), dtype=int) Elist = [] for e in range(N-1): i, o = map(int, input().split()) Elist.append((i-1, o-1)) E[i-1][o-1] = 1 E[o-1][i-1] = 1 # print("N, K=", N, K) # for e in Elist: # print(e[0], e[1]) I = np.eye(N, dtype=int)...
Traceback (most recent call last): File "/tmp/tmprcokpcgs/tmpf7s6a1l7.py", line 3, in <module> N, K = map(int, input().split()) ^^^^^^^ EOFError: EOF when reading a line
s423454121
p04049
u075012704
1531432306
Python
PyPy3 (2.4.0)
py
Runtime Error
741
85208
1008
from collections import deque N, K = map(int, input().split()) T = [[] for i in range(N)] E = [] for i in range(N-1): a, b = map(int, input().split()) a, b = a-1, b-1 T[a].append(b) T[b].append(a) E.append((a, b)) def bfs(n): visited = [False] * N dist = [0] * N queue = deque([n]) ...
Traceback (most recent call last): File "/tmp/tmpd23w3bja/tmp4ti1doj5.py", line 3, in <module> N, K = map(int, input().split()) ^^^^^^^ EOFError: EOF when reading a line
s889802136
p04049
u075012704
1531431902
Python
PyPy3 (2.4.0)
py
Runtime Error
1359
85720
1030
from collections import deque N, K = map(int, input().split()) T = [[] for i in range(N)] E = [] for i in range(N-1): a, b = map(int, input().split()) a, b = a-1, b-1 T[a].append(b) T[b].append(a) E.append((a, b)) def bfs(n): visited = [False] * N dist = [0] * N queue = deque([n]) ...
Traceback (most recent call last): File "/tmp/tmpdq54fzjy/tmp0rrowpyp.py", line 3, in <module> N, K = map(int, input().split()) ^^^^^^^ EOFError: EOF when reading a line
s566373062
p04049
u132291455
1478317767
Python
PyPy2 (5.6.0)
py
Runtime Error
41
8944
423
o=lambda:map(int,raw_input().split());r=range(n);a=10**5 n,k=o() e=[[]for _ in [0]*n] for _ in [0]*(n-1):a,b=o();e[a-1]+=[b-1];e[b-1]+=[a-1] def U(x,f): l[f]=1;q=[(x,0)] while len(q): v,c=q.pop(0) if c>k/2:break l[v]=1 for w in e[v]: if not l[w]:q+=[(w,c+1)] return n-l.count(1) if k%2: for i in r: for ...
File "/tmp/tmpossw0g56/tmphy_jsttc.py", line 20 print a ^^^^^^^ SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
s671156005
p04049
u707500405
1468766326
Python
PyPy2 (5.6.0)
py
Runtime Error
1393
52892
780
def calc_dist(b,h,dist,E,D,ne): D[dist] += 1 for nxt in E[h]: if nxt == b or nxt == ne: continue calc_dist(h,nxt,dist+1,E,D,ne) def solve(): N,K = map(int,raw_input().split()) pairs = [] E = [[] for i in xrange(N)] for i in xrange(N-1): a,b = map(lambda x:int(x)-1,raw_input().split()) E[a].append(b) ...
File "/tmp/tmpae7g2lg8/tmpfqli93qt.py", line 36 print ans ^^^^^^^^^ SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
s960682356
p04050
u211706121
1576372801
Python
Python (3.4.3)
py
Runtime Error
17
3064
691
n,m = [int(i) for i in input().split()] a = [int(i) for i in input().split()] breakFlag = False for i in range(1,m-1): if a[i]%2==1: if a[0]%2==1: if a[len(a)-1]%2==1: print("Impossible") breakFlag = True break else: a[...
Traceback (most recent call last): File "/tmp/tmp81nu9q51/tmpqt6_03jy.py", line 1, in <module> n,m = [int(i) for i in input().split()] ^^^^^^^ EOFError: EOF when reading a line
s347349727
p04050
u102461423
1569523773
Python
Python (3.4.3)
py
Runtime Error
18
3064
658
import sys readline = sys.stdin.readline readlines = sys.stdin.readlines sys.setrecursionlimit(10 ** 7) N,M = map(int,readline().split()) A = [int(x) for x in readline().split()] OD = [x for x in A if x&1] EV = [x for x in A if not x&1] if len(OD) >= 3: print('Impossible') exit() if len(A) == 1: if N ==...
Traceback (most recent call last): File "/tmp/tmpbczrd2ku/tmpvcl6se8g.py", line 6, in <module> N,M = map(int,readline().split()) ^^^ ValueError: not enough values to unpack (expected 2, got 0)
s747140087
p04050
u816116805
1542177662
Python
Python (3.4.3)
py
Runtime Error
18
3064
689
#! /usr/bin/env python # -*- coding: utf-8 -*- # vim:fenc=utf-8 # """ agc001 D """ n, m = map(int, input().split()) ali = list(map(int, input().split())) if m == 1: print(ali[0]) print(2) print(ali[0]-1, 1) exit() flag = 0 c = [] for a in ali: if a % 2 == 1: if flag == 0: lm ...
Traceback (most recent call last): File "/tmp/tmpofyfn9pk/tmpcbntxgd6.py", line 10, in <module> n, m = map(int, input().split()) ^^^^^^^ EOFError: EOF when reading a line
s950372139
p04050
u816116805
1542177393
Python
Python (3.4.3)
py
Runtime Error
19
3064
684
#! /usr/bin/env python # -*- coding: utf-8 -*- # vim:fenc=utf-8 # """ agc001 D """ n, m = map(int, input().split()) ali = list(map(int, input().split())) if m == 1: print(ali[0]) print(1) print(ali[0]-1, 1) exit() flag = 0 c = [] for a in ali: if a & 1: if flag == 0: lm = a ...
Traceback (most recent call last): File "/tmp/tmpwwuupj8y/tmpccyr66u0.py", line 10, in <module> n, m = map(int, input().split()) ^^^^^^^ EOFError: EOF when reading a line
s482351851
p04051
u556571816
1593818777
Python
Python (3.8.2)
py
Runtime Error
2206
67468
382
import math n = int(input()) list = [] for i in range(n): list.append(input().split()) sum = 0 for j in range(n): for k in range(j+1,n): if j!=k: num = math.factorial(int(list[j][0])+int(list[j][1])+int(list[k][0])+int(list[k][1])) / (math.factorial(int(list[j][0])+int(list[k][0]))*math.factorial(int(list[j]...
Traceback (most recent call last): File "/tmp/tmpkt565ipb/tmp8g00fj_3.py", line 3, in <module> n = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s525778405
p04051
u426964396
1576632184
Python
Python (3.4.3)
py
Runtime Error
17
2940
695
#include<bits/stdc++.h> using namespace std; const int N=2e5+50,M=4040,mod=1e9+7,L=2000; int n,a[N],b[N],f[M][M],ans,J[N],I[N]; int C(int n,int m){return 1ll*J[n]*I[m]%mod*I[n-m]%mod;} int main(){ scanf("%d",&n);J[0]=I[0]=I[1]=1; for(int i=2;i<=4*L;i++)I[i]=mod-1ll*mod/i*I[mod%i]%mod; for(int i=1;i<=4*L;i++)J[i]=1ll...
File "/tmp/tmpmh9enxj0/tmp1y64nxyn.py", line 5 int C(int n,int m){return 1ll*J[n]*I[m]%mod*I[n-m]%mod;} ^ SyntaxError: invalid decimal literal
s389585547
p04051
u102461423
1574125830
Python
Python (3.4.3)
py
Runtime Error
451
40124
1223
import sys read = sys.stdin.buffer.read readline = sys.stdin.buffer.readline readlines = sys.stdin.buffer.readlines import numpy as np MOD = 10 ** 9 + 7 N = int(readline()) m = map(int,read().split()) AB = zip(m,m) D = 2000 def cumprod(arr,MOD): L = len(arr); Lsq = int(L**.5+1) arr = np.resize(arr,Lsq**2)....
Traceback (most recent call last): File "/tmp/tmpwka3g16u/tmpbynbqy84.py", line 10, in <module> N = int(readline()) ^^^^^^^^^^^^^^^ ValueError: invalid literal for int() with base 10: b''
s797478744
p04051
u102461423
1574125305
Python
Python (3.4.3)
py
Runtime Error
486
35124
1202
import sys read = sys.stdin.buffer.read readline = sys.stdin.buffer.readline readlines = sys.stdin.buffer.readlines import numpy as np MOD = 10 ** 9 + 7 N = int(readline()) m = map(int,read().split()) AB = zip(m,m) D = 2000 def cumprod(arr,MOD): L = len(arr); Lsq = int(L**.5+1) arr = np.resize(arr,Lsq**2)....
Traceback (most recent call last): File "/tmp/tmps9bm6z35/tmpujowh91e.py", line 10, in <module> N = int(readline()) ^^^^^^^^^^^^^^^ ValueError: invalid literal for int() with base 10: b''
s089948526
p04051
u902468164
1549757752
Python
Python (3.4.3)
py
Runtime Error
2104
20520
411
def co(a, b): a += b res = 1 for i in range(1,b+1): res *= ((a-i+1) / i) return int(res) n = int(input()) a = [0 for i in range(n)] b = [0 for i in range(n)] for ni in range(n): a[ni], b[ni] = (int(i) for i in input().split(" ")) a = tuple(a) b = tuple(b) res = 0 for i in range(n): ...
Traceback (most recent call last): File "/tmp/tmpoeurekzg/tmp6sqsu0wh.py", line 8, in <module> n = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s293146402
p04051
u902468164
1549757578
Python
Python (3.4.3)
py
Runtime Error
2104
18976
382
def co(a, b): a += b res = 1 for i in range(1,b+1): res *= ((a-i+1) / i) return int(res) n = int(input()) a = [0 for i in range(n)] b = [0 for i in range(n)] for ni in range(n): a[ni], b[ni] = (int(i) for i in input().split(" ")) res = 0 for i in range(n): for j in range(i+1,n): ...
Traceback (most recent call last): File "/tmp/tmpe0eju9sz/tmp3y9cngi7.py", line 8, in <module> n = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s140871420
p04051
u902468164
1549757471
Python
Python (3.4.3)
py
Runtime Error
2103
18984
378
def co(a, b): res = 1 for i in range(1,b+1): res *= ((a-i+1) / i) return int(res) n = int(input()) a = [0 for i in range(n)] b = [0 for i in range(n)] for ni in range(n): a[ni], b[ni] = (int(i) for i in input().split(" ")) res = 0 for i in range(n): for j in range(i+1,n): res += ...
Traceback (most recent call last): File "/tmp/tmpg_uqgf4g/tmppxxe7hj6.py", line 7, in <module> n = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s200518468
p04051
u638357064
1547945247
Python
Python (3.4.3)
py
Runtime Error
2109
37488
386
# your code goes here from itertools import combinations from scipy.misc import comb N = int(input()) A = [] B = [] for n in range(N): a, b = [int(x) for x in input().split()] A.append(a) B.append(b) S = 0 for n1, n2 in combinations(range(N),2): a1, b1 = A[n1], B[n1] a2, b2 = A[n2], B[n2] s = comb(a1+b1+a2+b2,...
Traceback (most recent call last): File "/tmp/tmpug9ipdcs/tmpnk3gx6k1.py", line 3, in <module> from scipy.misc import comb ImportError: cannot import name 'comb' from 'scipy.misc' (/root/miniconda3/envs/sandbox-runtime/lib/python3.11/site-packages/scipy/misc/__init__.py)
s350121004
p04051
u638357064
1547945047
Python
Python (3.4.3)
py
Runtime Error
329
23444
435
# your code goes here from itertools import combinations from scipy.special import comb # a = comb(n, r) # a = comb(n, r, exact=True) N = int(input()) A = [] B = [] for n in range(N): a, b = [int(x) for x in input().split()] A.append(a) B.append(b) S = 0 for n1, n2 in combinations(range(N),2): a1, b1 = A[n1], B[...
Traceback (most recent call last): File "/tmp/tmptwb7o3_a/tmproognzke.py", line 7, in <module> N = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s504475340
p04051
u789840108
1539891470
Python
Python (3.4.3)
py
Runtime Error
2106
51748
434
def fact(n): ret = 1 for i in range(2, n+1): ret *= i return ret def C(a,b,c): ret = 1 for i in range(b+1, a + 1): ret *= i return int(ret / fact(c)) n = int(input()) gu = [] for i in range(n): gu.append(list(map(int, input().split(' ')))) ret = 0 for i in range(n - 1): for j in range(i+1,...
Traceback (most recent call last): File "/tmp/tmpji1otvc8/tmpmjl514jf.py", line 13, in <module> n = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s917522426
p04051
u789840108
1539891400
Python
Python (3.4.3)
py
Runtime Error
2106
51748
462
def fact(n): ret = 1 for i in range(2, n+1): ret *= i return ret def C(a,b,c): ret = 1 for i in range(b+1, a + 1): ret *= i return int(ret / fact(c)) n = int(input()) gu = [] for i in range(n): gu.append(list(map(int, input().split(' ')))) ret = 0 for i in range(n - 1):...
Traceback (most recent call last): File "/tmp/tmp9xtt1676/tmpvtaebx4c.py", line 13, in <module> n = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s853958902
p04051
u789840108
1539891024
Python
Python (3.4.3)
py
Runtime Error
2106
51748
378
def fact(n): ret = 1 for i in range(2, n+1): ret *= i return ret n = int(input()) gu = [] for i in range(n): gu.append(list(map(int, input().split(' ')))) ret = 0 for i in range(n - 1): for j in range(i+1, n): ret += int(fact(gu[i][0] + gu[i][1] + gu[j][0] + gu[j][1]) / fact(gu[...
Traceback (most recent call last): File "/tmp/tmp0wacgaw1/tmpitpngk2j.py", line 7, in <module> n = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s608875432
p04051
u789840108
1539890915
Python
Python (3.4.3)
py
Runtime Error
2106
52692
379
def fact(n): if n == 1: return 1 else: return fact(n - 1) * n n = int(input()) gu = [] for i in range(n): gu.append(list(map(int, input().split(' ')))) ret = 0 for i in range(n - 1): for j in range(i+1, n): ret += int(fact(gu[i][0] + gu[i][1] + gu[j][0] + gu[j][1]) / fact(gu...
Traceback (most recent call last): File "/tmp/tmpt8e34d71/tmp3lqzar4t.py", line 7, in <module> n = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s997331653
p04051
u821262411
1468728349
Python
PyPy3 (2.4.0)
py
Runtime Error
387
43120
357
import scipy.misc as scm def combi(p,q): return scm.comb(p,q,1) ans=0 n=int(input()) k=[] for i in range(n): a,b=map(int,input().split()) k.append([a,b]) for i in range(n-1): for j in range(i+1,n): p=k[i][0]+k[i][1]+k[j][0]+k[j][1] q=k[i][0]+k[j][0] ans += combi(p,q) % (10**9+7...
Traceback (most recent call last): File "/tmp/tmpf4tq5iqw/tmpasz3flx8.py", line 6, in <module> n=int(input()) ^^^^^^^ EOFError: EOF when reading a line
s741244779
p04051
u821262411
1468723721
Python
PyPy3 (2.4.0)
py
Runtime Error
382
43376
344
import scipy.misc as scm def combi(p,q): return scm.comb(p,q,1) ans=0 n=int(input()) k=[] for i in range(n): a,b=map(int,input().split()) k.append([a,b]) for i in range(n-1): for j in range(1,n): p=k[i][0]+k[i][1]+k[j][0]+k[j][1] q=k[i][0]+k[j][0] ans += combi(p,q) % (10**9+7) ...
Traceback (most recent call last): File "/tmp/tmplvqy0kcm/tmp7_5tv79b.py", line 6, in <module> n=int(input()) ^^^^^^^ EOFError: EOF when reading a line
s510438237
p04051
u493520238
1468720629
Python
Python (3.4.3)
py
Runtime Error
1741
97888
607
def calc(ab1,ab2): meat = ab1[0] + ab2[0] vege = ab1[1] + ab2[1] pattern = fact_list[meat+vege] / (fact_list[meat] * fact_list[vege]) return pattern if __name__ == '__main__': N = int(input()) AB = [list(map(int, input().split())) for i in range(N)] fact_list = {} fact_list[0] = 1 ...
Traceback (most recent call last): File "/tmp/tmpdqu_nt27/tmpwl23qgv7.py", line 10, in <module> N = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s959683316
p04051
u493520238
1468719899
Python
Python (3.4.3)
py
Runtime Error
1772
97888
626
def calc(ab1,ab2,fact_list): meat = ab1[0] + ab2[0] vege = ab1[1] + ab2[1] pattern = fact_list[meat+vege] / (fact_list[meat] * fact_list[vege]) return pattern if __name__ == '__main__': N = int(input()) AB = [list(map(int, input().split())) for i in range(N)] fact_list = {} fact_list...
Traceback (most recent call last): File "/tmp/tmp327uewio/tmpvoaybz2i.py", line 10, in <module> N = int(input()) ^^^^^^^ EOFError: EOF when reading a line