s_id
stringlengths
10
10
p_id
stringlengths
6
6
u_id
stringlengths
10
10
date
stringlengths
10
10
language
stringclasses
1 value
original_language
stringclasses
11 values
filename_ext
stringclasses
1 value
status
stringclasses
1 value
cpu_time
stringlengths
1
5
memory
stringlengths
1
7
code_size
stringlengths
1
6
code
stringlengths
1
539k
s858019438
p03601
u520158330
1525840001
Python
Python (3.4.3)
py
Runtime Error
18
3188
1355
A,B,C,D,E,F = map(int,input().split()) water_sugar = [] sugar_best = [] max_sugar = 0 for a in range(0,31): water = A*a sugar = E*water if water==0: pass elif (water*100)>F: break elif (water*100)+sugar>F: s = F-(water*100) water_sugar.append([water*100,s]) elif...
s374609745
p03601
u559823804
1519712882
Python
Python (3.4.3)
py
Runtime Error
165
3188
565
A, B, C, D, E, F = map(int, input().split()) A, B = 100 * A, 100 * B W = set() S = set() for i in range(F // A+1): for j in range(F // B+1): w = A * i + B * j if w <= F: W.add(w) for i in range(F // C+1): for j in range(F // D+1): s = C * i + D * j if s <= F: ...
s912847947
p03601
u777923818
1514500970
Python
Python (3.4.3)
py
Runtime Error
18
3064
663
# -*- coding: utf-8 -*- from itertools import combinations def inpl(): return tuple(map(int, input().split())) N = int(input()) res = 0 exist = True A = [] for _ in range(N): A.append(inpl()) for i, j in combinations(range(N), 2): vervose = False for k in range(N): if A[i][j] > A[i][k] + A[k][j...
s328982317
p03601
u235539935
1509647073
Python
Python (2.7.6)
py
Runtime Error
14
2916
1144
# coding:utf-8 input=raw_input() list=input.split(" ") for i in range(len(list)): list[i]=int(list[i]) f=list[5] # xが取り得る値 listx=[] a=list[0] b=list[1] i=0 while True: if i*a*100>f: break j=0 while True: x=i*a*100+j*b*100 if x > f: break; if x not in listx: ...
s194955182
p03601
u299843956
1506827936
Python
Python (3.4.3)
py
Runtime Error
1927
25132
840
import numpy as np def ceil(a): return int(np.ceil(a)) def sol2(): A,B,C,D,E,F = map(int, input().split(' ')) na, nb, nc, nd = ceil(F/A/100),ceil(F/B/100),ceil(E*F/C/100),ceil(E*F/D/100) sug = np.arange(0,nc).reshape(1,1,nc,1)*C+np.arange(0,nd).reshape(1,1,1,nd)*D wat = np.arange(0,na).reshape(na...
s988207858
p03601
u299843956
1506823893
Python
Python (3.4.3)
py
Runtime Error
800
28548
626
import numpy as np def sol(): A,B,C,D,E,F = map(int, input().split(' ')) na, nb, nc, nd = int(F/A/100),int(F/A/100),int(E*F/E/100),int(E*F/D/100) sug = np.arange(0,nc).reshape(1,1,nc,1)*C+np.arange(0,nd).reshape(1,1,1,nd)*D wat = np.arange(0,na).reshape(na,1,1,1)*A*100+np.arange(0,nb).reshape(1,nb,1,1...
s345476816
p03601
u817328209
1506584843
Python
PyPy3 (2.4.0)
py
Runtime Error
163
38256
410
n = int(input()) A = [list(map(int, input().split())) for _ in range(n)] ans = 0 for i in range(n) : for j in range(i+1, n) : for k in range(n) : if i == k or j == k: continue d = A[i][k] + A[k][j] if d == A[i][j] : ans += d ...
s149236389
p03601
u817328209
1506584180
Python
PyPy3 (2.4.0)
py
Runtime Error
170
38640
590
def main() : n = int(input()) A = [] for _ in range(n) : A.append(list(map(int, input().split()))) ans = sum([sum(_A) for _A in A]) for k in range(n) : for i in range(n) : for j in range(n) : if i == k : break elif j ==...
s985487006
p03601
u817328209
1506579805
Python
Python (3.4.3)
py
Runtime Error
107
12524
397
a,b,c,d,e,f = map(int, input().split()) w = [i+j for i in range(0,f+1,100*a) for j in range(0,f+1,100*b) if i+j <= f] s = [i+j for i in range(0,f+1,c) for j in range(0,f+1,d) if i+j <= f] W = w[0] S = 0 for ww in w : for ss in s : if ww+ss > f or ww == 0: continue elif ss/(ss+ww) > S/(...
s067981797
p03601
u817328209
1506579618
Python
Python (3.4.3)
py
Runtime Error
1686
12524
403
a,b,c,d,e,f = map(int, input().split()) w = [i+j for i in range(0,f+1,100*a) for j in range(0,f+1,100*b) if i+j <= f] s = [i+j for i in range(0,f+1,c) for j in range(0,f+1,d) if i+j <= f] W = f//(100*b) S = 0 for ww in w : for ss in s : if ww+ss > f or ww == 0: continue elif ss/(ss+ww)...
s332282215
p03601
u617888512
1506011719
Python
Python (3.4.3)
py
Runtime Error
16
2940
9
test: aaa
s965832232
p03601
u796424048
1505660292
Python
Python (3.4.3)
py
Runtime Error
1824
3192
930
A,B,C,D,E,F = list(map(int,input().split())) A = 100*A B = 100*B a = int(F/A) b = int(F/B) hoge = 0 dp = [[0 for i in range(a+1)]for i in range(b+1)] Na = [[0 for i in range(a+1)]for i in range(b+1)] noudo = [[0 for i in range(a+1)]for i in range(b+1)] for i in range(a+1): for j in range(b+1): if A*i+B...
s146320661
p03601
u985443069
1505642735
Python
Python (3.4.3)
py
Runtime Error
31
3700
1307
import sys import socket if socket.gethostname() == 'N551J': sys.stdin = open('a1.in') def read_int_list(): return list(map(int, input().split())) def read_int(): return int(input()) def read_str_list(): return input().split() def read_str(): return input() def solve(): a, b, c, d, e,...
s404547102
p03601
u448407332
1505613972
Python
Python (2.7.6)
py
Runtime Error
466
2696
958
A, B, C, D, E, F = map(int, raw_input().split()) def weight(suger, water): return suger + water*100 max_c = F/(100+E)*E / C max_d = F/(100+E)*E / D max_a = F/100 / A max_b = F/100 / B suger_list = [] for i in range(max_c+1): for j in range(max_d+1): if i*C+j*D not in suger_list: suger_list....
s664419323
p03601
u777923818
1505612836
Python
Python (3.4.3)
py
Runtime Error
17
3064
606
waters = set([a+b for b in range(0, F+1, B) for a in range(0, F+1, A) if a+b <= F]) res_water = 0 res_sugar = 0 max_ratio = 0 for w in sorted(waters): sugars = [c+d for c in range(0, int(w/100)*E+1, C) for d in range(0, int(w/100)*E+1, D) if (c+d+w <= F) and ...
s291986288
p03601
u226155577
1505612407
Python
PyPy3 (2.4.0)
py
Runtime Error
175
38640
638
n = int(input()) A = [list(map(int, input().split())) for i in range(n)] B = [e[:] for e in A] for k in range(n): for i in range(n): for j in range(n): B[i][j] = min(B[i][k] + B[k][j], B[i][j]) ok = 1 for i in range(n): for j in range(n): if A[i][j] != B[i][j]: ok = 0 if...
s358023220
p03601
u327466606
1505611745
Python
Python (3.4.3)
py
Runtime Error
157
3316
538
a,b,c,d,e,f = map(int,input().split()) from itertools import product water = set() for i,j in product(range(f//(a*100)+2),range(f//(100*b)+2)): n = a*i+b*j if n <= f: water.add(n) water = sorted(water) salt = set() for i,j in product(range(f//c+2),range(f//d+2)): n = c*i+d*j if n <= f: salt.add(n)...
s062782667
p03601
u327466606
1505611648
Python
Python (3.4.3)
py
Runtime Error
165
3316
538
a,b,c,d,e,f = map(int,input().split()) from itertools import product water = set() for i,j in product(range(f//(a*100)+1),range(f//(100*b)+1)): n = a*i+b*j if n <= f: water.add(n) water = sorted(water) salt = set() for i,j in product(range(f//c+1),range(f//d+1)): n = c*i+d*j if n <= f: salt.add(n)...
s282674213
p03602
u844789719
1568161454
Python
PyPy3 (2.4.0)
py
Runtime Error
222
41692
545
import itertools N = int(input()) A = [[int(_) for _ in input().split()] for _ in range(N)] ans = sum(sum(a) for a in A) seen = set() for k, i, j in itertools.product(range(N), repeat=3): if (i, j) in seen or k == i or i == j or j == k: continue elif A[i][j] > A[i][k] + A[j][k]: print(-1) ...
s810328136
p03602
u844789719
1568159976
Python
PyPy3 (2.4.0)
py
Runtime Error
227
41436
1106
import collections N = int(input()) A = [[int(_) for _ in input().split()] for _ in range(N)] B = [_.copy() for _ in A] d_ij = collections.defaultdict(set) for i in range(N - 1): for j in range(i + 1, N): d_ij[A[i][j]].add((i, j)) connected = collections.defaultdict(set) ans = 0 for k in sorted(d_ij.keys())...
s609311293
p03602
u332906195
1565505414
Python
PyPy3 (2.4.0)
py
Runtime Error
912
56412
559
def warshall_floyd(G): import copy ret = copy.deepcopy(G) for k in range(N): for i in range(N): for j in range(N): ret[i][j] = min(ret[i][j], ret[i][k] + ret[k][j]) return ret N = int(input()) A = [list(map(int, input().split())) for _ in range(N)] if A == warshall...
s452032729
p03602
u332906195
1565505381
Python
Python (3.4.3)
py
Runtime Error
2104
10548
559
def warshall_floyd(G): import copy ret = copy.deepcopy(G) for k in range(N): for i in range(N): for j in range(N): ret[i][j] = min(ret[i][j], ret[i][k] + ret[k][j]) return ret N = int(input()) A = [list(map(int, input().split())) for _ in range(N)] if A == warshall...
s629580135
p03602
u593005350
1538663912
Python
Python (3.4.3)
py
Runtime Error
39
6644
558
import sys N=int(input()) len = [list(map(int,input().split())) for t in range (N)] a=0 n=0 while n < N: m=n+1 while m < N: while i < N: if i!=n and i!=m: if len[n][i]+len[i][m]==len[n][m]: a+=len[n][m] break elif len[n...
s773956261
p03602
u062147869
1530483510
Python
PyPy3 (2.4.0)
py
Runtime Error
783
57436
725
import sys import copy N = int(input()) table = [] for i in range(N): A = [int(j) for j in input().split()] table.append(A) tas = copy.deepcopy(table) for k in range(N): for i in range(N): for j in range(N): tas[j][i] = min(tas[j][i], tas[j][k] + tas[k][i]) for y in range(N): for x...
s112954797
p03602
u062147869
1530483403
Python
PyPy3 (2.4.0)
py
Runtime Error
777
55772
708
import sys import copy N=int(input()) table=[] for i in range(N): A=[int(j) for j in input().split() ] table.append(A) tas=copy.deepcopy(table) for k in range(N): for i in range(N): for j in range(N): tas[j][i]=min(tas[j][i],tas[j][k]+tas[k][i]) for y in range(N): for x ...
s023892211
p03602
u340781749
1513871510
Python
Python (3.4.3)
py
Runtime Error
1878
8692
448
def solve(n, tbl): ans = 0 for i, row_i in enumerate(tbl): for j in range(i + 1, n): row_j = tbl[j] ij = row_i[j] mind = min(ik + kj for ik, kj in zip(row_i, row_j) if ik and kj) if ij > mind: return -1 if ij < mind: ...
s880592152
p03602
u663230781
1508354565
Python
Python (3.4.3)
py
Runtime Error
18
3064
862
def shortcutable(v, n, x, y): a = v[x][y] can_prunning = False for z in range(n): if not z in (x,y): b = v[(x,z)] c = v[(z,y)] #print(x,y,z,a,b,c) if (b + c) < a: return -1 if (b + c) == a: can_prunning = Tru...
s745145267
p03602
u663230781
1508353140
Python
Python (3.4.3)
py
Runtime Error
43
6772
827
def shortcutable(v, n, x, y): a = v[x][y] can_prunning = False for z in range(n): if not z in (x,y): b = v[x][z] c = v[z][y] #print(x,y,z,a,b,c) if (b + c) < a: return -1 if (b + c) == a: can_prunning = True ...
s855771814
p03602
u817328209
1506583986
Python
Python (3.4.3)
py
Runtime Error
17
2940
588
def main() n = int(input()) A = [] for _ in range(n) : A.append(list(map(int, input().split()))) ans = sum([sum(_A) for _A in A]) for k in range(n) : for i in range(n) : for j in range(n) : if i == k : break elif j == k...
s506583067
p03602
u327466606
1505618120
Python
Python (3.4.3)
py
Runtime Error
2109
19420
1004
N = int(input()) import numpy as np G = np.array([list(map(int,input().split())) for i in range(N)]) import scipy.sparse.csgraph as csg G2 = csg.floyd_warshall(G,directed=False) if np.any(G != G2): print(-1) else: G = G2 T = csg.minimum_spanning_tree(G) total = np.sum(T) T = csg.floyd_warshall(T,directe...
s389582719
p03602
u327466606
1505615956
Python
Python (3.4.3)
py
Runtime Error
1158
18920
976
N = int(input()) import numpy as np G = np.array([list(map(int,input().split())) for i in range(N)]) import scipy.sparse.csgraph as csg G2 = csg.floyd_warshall(G,directed=False) if np.any(G != G2): print(-1) else: G = G2 T = csg.minimum_spanning_tree(G) total = np.sum(T) T = csg.floyd_warshall(T,dir...
s963209079
p03602
u243492642
1505615788
Python
PyPy3 (2.4.0)
py
Runtime Error
702
48732
1596
# coding: utf-8 import itertools import heapq def II(): return int(input()) def ILI(): return list(map(int, input().split())) def read(): N = II() matrix = [ILI() for __ in range(N)] return N, matrix def check_first(matrix): t_matrix = list(map(list, zip(*matrix))) for i, (row, t_row) in enume...
s385761226
p03602
u327466606
1505615286
Python
Python (3.4.3)
py
Runtime Error
2109
18916
966
N = int(input()) import numpy as np G = np.array([list(map(int,input().split())) for i in range(N)]) import scipy.sparse.csgraph as csg G2 = csg.floyd_warshall(G,directed=False) if np.any(G != G2): print(-1) else: G = G2 T = csg.minimum_spanning_tree(G) total = np.sum(T) T = csg.floyd_warshall(T,directe...
s702435931
p03602
u243492642
1505613931
Python
Python (3.4.3)
py
Runtime Error
2104
8276
1629
# coding: utf-8 import itertools import array import collections import heapq def II(): return int(input()) def ILI(): return list(map(int, input().split())) def read(): N = II() matrix = [ILI() for __ in range(N)] return N, matrix def check_first(matrix): t_matrix = list(map(list, zip(*matrix))) ...
s645411528
p03603
u923172145
1597288097
Python
Python (3.8.2)
py
Runtime Error
674
14964
671
import sys sys.setrecursionlimit(10**6) N = int(input()) I = [[] for _ in range(N)] i = 1 for a in list(map(int, input().split())): I[a-1].append(i) i += 1 X = list(map(int, input().split())) def dfs(v,I,X): INF = 10**20 DP = [INF for _ in range(X[v]+1)] DP[0] = 0 for i in I[v]: x = X[i] y = dfs(i...
s166161865
p03603
u923172145
1597287872
Python
Python (3.8.2)
py
Runtime Error
672
14984
651
import sys N = int(input()) M = 5000 I = [[] for _ in range(N)] i = 1 for a in list(map(int, input().split())): I[a-1].append(i) i += 1 X = list(map(int, input().split())) def dfs(v,I,X): INF = 10**20 DP = [INF for _ in range(X[v]+1)] DP[0] = 0 for i in I[v]: x = X[i] y = dfs(i,I,X) if x < y: ...
s668563391
p03603
u095021077
1596389206
Python
PyPy3 (7.3.0)
py
Runtime Error
93
76672
699
N=int(input()) P=list(map(int, input().split())) X=[0]+list(map(int, input().split())) ko=[[] for _ in range(N+1)] for i, p in enumerate(P, 2): ko[p].append(i) def f(p): n=len(ko[p]) if n==0: return X[p], 0 dp=[[float('inf')]*(X[p]+1) for _ in range(n+1)] dp[0][0]=0 for i, c in enumerate(ko[p], 1)...
s550436173
p03603
u488401358
1591498081
Python
PyPy3 (2.4.0)
py
Runtime Error
470
88028
1781
import sys sys.setrecursionlimit(10**6) N=int(input()) P=list(map(int,input().split())) child=[[] for i in range(N)] for i in range(N-1): child[P[i]-1].append(i+1) X=list(map(int,input().split())) dpb=[float("inf") for i in range(N)] dpw=[float("inf") for i in range(N)] def dfs(v): for nv in child[v]: ...
s837211722
p03603
u754022296
1591497961
Python
PyPy3 (2.4.0)
py
Runtime Error
176
39792
692
import sys input = sys.stdin.readline sys.setrecursionlimit(10**7) INF = 2**30 n = int(input()) P = list(map(int, input().split())) T = [[] for _ in range(n)] for i, p in enumerate(P, 1): T[p-1].append(i) X = list(map(int, input().split())) D = [-1]*n def dfs(v): if D[v] != -1: return D[v] l = len(T[v]) x ...
s878801291
p03603
u754022296
1591497815
Python
PyPy3 (2.4.0)
py
Runtime Error
178
39920
706
import sys input = sys.stdin.readline sys.setrecursionlimit(10**7) INF = 2**30 n = int(input()) P = list(map(int, input().split())) T = [[] for _ in range(n)] for i, p in enumerate(P, 1): T[p-1].append(i) X = list(map(int, input().split())) D = [-1]*n def dfs(v): if D[v] != -1: return D[v] l = len(T[v]) x ...
s422041201
p03603
u488401358
1591496696
Python
PyPy3 (2.4.0)
py
Runtime Error
469
87900
1773
import sys sys.setrecursionlimit(10**6) N=int(input()) P=list(map(int,input().split())) child=[[] for i in range(N)] for i in range(N-1): child[P[i]-1].append(i+1) X=list(map(int,input().split())) dpb=[float("inf") for i in range(N)] dpw=[float("inf") for i in range(N)] def dfs(v): for nv in child[v]: ...
s120675252
p03603
u164727245
1587328007
Python
Python (3.4.3)
py
Runtime Error
171
14556
1220
# coding: utf-8 from collections import defaultdict, deque import numpy as np def solve(*args: str) -> str: n = int(args[0]) P = list(map(int, args[1].split())) X = list(map(int, args[2].split())) T = defaultdict(set) for i, p in enumerate(P): T[p-1].add(i+1) stack = [] Q = dequ...
s326346653
p03603
u102461423
1562815290
Python
Python (3.4.3)
py
Runtime Error
173
12536
900
import sys input = sys.stdin.readline import numpy as np sys.setrecursionlimit(10**6) N = int(input()) graph = [[] for _ in range(N+1)] # parent to child for i,p in enumerate(input().split(),2): graph[int(p)].append(i) X = [None] + [int(x) for x in input().split()] def dfs(v): # None または 白、黒の2つ組を返す child ...
s180847960
p03603
u102461423
1562815197
Python
Python (3.4.3)
py
Runtime Error
159
12500
895
import sys input = sys.stdin.readline import numpy as np sys.setrecursionlimit(10**6) N = int(input()) graph = [[] for _ in range(N+1)] # parent to child for i,p in enumerate(input().split(),2): graph[int(p)].append(i) X = [None] + [int(x) for x in input().split()] def dfs(v): # None または 白、黒の2つ組を返す child ...
s244901674
p03603
u102461423
1562815154
Python
Python (3.4.3)
py
Runtime Error
157
12500
866
import sys input = sys.stdin.readline import numpy as np N = int(input()) graph = [[] for _ in range(N+1)] # parent to child for i,p in enumerate(input().split(),2): graph[int(p)].append(i) X = [None] + [int(x) for x in input().split()] def dfs(v): # None または 白、黒の2つ組を返す child = [] for w in graph[v]: ...
s403430992
p03603
u957084285
1547589766
Python
Python (3.4.3)
py
Runtime Error
19
2940
1352
#include <iostream> #include <vector> #include <algorithm> using namespace std; typedef vector<int> vi; typedef pair<int, int> ii; #define REP(i,n) for (int i = 0; i < n; ++i) #define REPR(i,n) for (int i = n-1; i >= 0; --i) #define FOR(i,m,n) for (int i = m; i < n; ++i) #define FORE(x,xs) for (auto& x : xs) #define M...
s015679163
p03603
u104282757
1505617314
Python
Python (3.4.3)
py
Runtime Error
21
3188
1489
# E N = int(input()) P_list = list(map(int, input().split())) X_list = list(map(int, input().split())) # graph child_list = [[] for _ in range(N+1)] for i in range(2, N+1): child_list[P_list[i-2]].append(i) # from root # minimize local total weight color1 = [0]+X_list color2 = [0]*(N+1) # solve knapsack def sol...
s748294273
p03603
u637175065
1505615662
Python
PyPy3 (2.4.0)
py
Runtime Error
183
38384
1359
mport math,string,itertools,fractions,heapq,collections,re,array,bisect,sys,random,time,copy,functools sys.setrecursionlimit(10**7) inf = 10**20 eps = 1.0 / 10**10 mod = 10**9+7 def LI(): return [int(x) for x in sys.stdin.readline().split()] def LI_(): return [int(x)-1 for x in sys.stdin.readline().split()] def LF():...
s313367601
p03603
u637175065
1505615640
Python
Python (3.4.3)
py
Runtime Error
18
2940
1359
mport math,string,itertools,fractions,heapq,collections,re,array,bisect,sys,random,time,copy,functools sys.setrecursionlimit(10**7) inf = 10**20 eps = 1.0 / 10**10 mod = 10**9+7 def LI(): return [int(x) for x in sys.stdin.readline().split()] def LI_(): return [int(x)-1 for x in sys.stdin.readline().split()] def LF():...
s155323003
p03603
u637175065
1505615520
Python
Python (3.4.3)
py
Runtime Error
17
2940
1356
mport math,string,itertools,fractions,heapq,collections,re,array,bisect,sys,random,time,copy,functools sys.setrecursionlimit(10**7) inf = 10**20 eps = 1.0 / 10**10 mod = 10**9+7 def LI(): return [int(x) for x in sys.stdin.readline().split()] def LI_(): return [int(x)-1 for x in sys.stdin.readline().split()] def LF():...
s073864918
p03604
u102461423
1568183218
Python
PyPy3 (2.4.0)
py
Runtime Error
175
38396
2457
import sys input = sys.stdin.readline from scipy.sparse import csr_matrix from scipy.sparse.csgraph import connected_components import time start = time.time() MOD = 10**9 + 7 N = int(input()) ball = (tuple(int(x) for x in row.split()) for row in sys.stdin.readlines()) # x座標を1,2,...,N # y座標をN+1,N+2,...,N+N graph ...
s322716362
p03604
u102461423
1568173623
Python
Python (3.4.3)
py
Runtime Error
2114
209820
3424
import sys input = sys.stdin.readline MOD = 10**9 + 7 N = int(input()) ball = [tuple(int(x) for x in input().split()) for _ in range(N+N)] U = N+N+10 fact = [1] * (U+1); fact_inv = [1] * (U+1) for n in range(1,U+1): fact[n] = fact[n-1] * n % MOD fact_inv[U] = pow(fact[U],MOD-2,MOD) for n in range(U,0,-1): fa...
s143526814
p03604
u102461423
1568173563
Python
PyPy3 (2.4.0)
py
Runtime Error
2113
192064
3401
import sys input = sys.stdin.readline MOD = 10**9 + 7 N = int(input()) ball = [tuple(int(x) for x in input().split()) for _ in range(N+N)] U = N+N+10 fact = [1] * (U+1); fact_inv = [1] * (U+1) for n in range(1,U+1): fact[n] = fact[n-1] * n % MOD fact_inv[U] = pow(fact[U],MOD-2,MOD) for n in range(U,0,-1): fa...
s733088551
p03604
u102461423
1568173532
Python
Python (3.4.3)
py
Runtime Error
2115
209804
3401
import sys input = sys.stdin.readline MOD = 10**9 + 7 N = int(input()) ball = [tuple(int(x) for x in input().split()) for _ in range(N+N)] U = N+N+10 fact = [1] * (U+1); fact_inv = [1] * (U+1) for n in range(1,U+1): fact[n] = fact[n-1] * n % MOD fact_inv[U] = pow(fact[U],MOD-2,MOD) for n in range(U,0,-1): fa...
s653231187
p03605
u556477263
1600896103
Python
Python (3.8.2)
py
Runtime Error
23
9076
84
n = int(input()) if n[0] != 9 and n[1] != 9: print('No') else: print('Yes')
s230145428
p03605
u721652634
1600651044
Python
Python (3.8.2)
py
Runtime Error
26
9020
61
n = input() if 9 in n: print("Yes") else: print("No")
s527057210
p03605
u847033024
1599900235
Python
Python (3.8.2)
py
Runtime Error
23
9072
57
a = input() if 9 in a: print('Yes') else: print('No')
s517527783
p03605
u556589653
1599602807
Python
PyPy3 (7.3.0)
py
Runtime Error
88
74720
639
from itertools import permutations N,M,R = map(int,input().split()) r = list(map(int,input().split())) for i in range(R): r[i] -= 1 g = [[10 ** 8] * N for i in range(N)] for i in range(M): A,B,C = map(int,input().split()) A -= 1 B -= 1 g[A][B] = C g[B][A] = C def warchall_floyd(n): for i in range(n): ...
s459421293
p03605
u077671688
1599495124
Python
Python (3.8.2)
py
Runtime Error
22
8884
77
if "9" == N[0] or "9" == N[1]: print( "YES" ) else: print( "NO" )
s263855573
p03605
u425762225
1599428903
Python
Python (3.8.2)
py
Runtime Error
30
9148
109
N = int(input()) ans = 0 for _ in range(N): l,r = map(int,input().split()) ans += r - l + 1 print(ans)
s473576941
p03605
u244836567
1598235726
Python
Python (3.8.2)
py
Runtime Error
20
9028
115
a=int(input()) b=a%10 if int(a/10)==9: print("Yes") else: if b==9: print("Yes") else: print("No")
s251696468
p03605
u921632705
1597265854
Python
Python (3.8.2)
py
Runtime Error
24
8740
57
N = input() if N in "9": print("Yes") else print("No")
s509189231
p03605
u921632705
1597265828
Python
Python (3.8.2)
py
Runtime Error
21
8816
55
N = input() if N in 9: print("Yes") else print("No")
s447771966
p03605
u243159381
1596425554
Python
Python (3.8.2)
py
Runtime Error
27
9116
66
n=input() if n.count(9)>=1: print('Yes') else: print('No')
s205869805
p03605
u243159381
1596425481
Python
Python (3.8.2)
py
Runtime Error
26
8956
69
n=input() if n%10==9 or n>=90: print('Yes') else: print('No')
s562050726
p03605
u243159381
1596425442
Python
Python (3.8.2)
py
Runtime Error
27
8968
70
n=input() if n//10==9 or n>=90: print('Yes') else: print('No')
s988197622
p03605
u786020649
1596054112
Python
Python (3.8.2)
py
Runtime Error
25
8968
60
N=int(input()) print(['No','Yes'][9 in [N%10, (N-N%10)//10]]
s621580310
p03605
u075303794
1595736899
Python
Python (3.8.2)
py
Runtime Error
30
8944
68
N=[for x in input()] if '9' in N: print('Yes') else: print('No')
s479917227
p03605
u763249708
1593862904
Python
Python (3.8.2)
py
Runtime Error
28
8872
60
s = input() if s in '9': print('Yes') else: print('No')
s084176809
p03605
u103208639
1593529630
Python
Python (3.8.2)
py
Runtime Error
19
8836
60
s=input() if "9" in s: print("Yes") else: print("No"
s915450436
p03605
u941277791
1592362117
Python
Python (3.4.3)
py
Runtime Error
17
2940
120
num=str(input()) char=list(num) if char[0]=="9": print("Yes") elif char[1]=="9": print("Yes")) else: print("No")
s904388978
p03605
u701077471
1592277233
Python
Python (3.4.3)
py
Runtime Error
17
2940
166
n = int(input()) apple = [] for _ in range(n): a = str(input()) if a not in apple: apple.append(a) else: apple.remove(a) print(len(apple))
s665236469
p03605
u701077471
1592277146
Python
Python (3.4.3)
py
Runtime Error
17
2940
166
n = int(input()) apple = [] for _ in range(n): a = int(input()) if a not in apple: apple.append(a) else: apple.remove(a) print(len(apple))
s497792338
p03605
u701077471
1592276418
Python
Python (3.4.3)
py
Runtime Error
17
2940
166
n = int(input()) apple = [] for _ in range(n): a = int(input()) if a not in apple: apple.append(a) else: apple.remove(a) print(len(apple))
s808172109
p03605
u014333473
1592078466
Python
Python (3.4.3)
py
Runtime Error
17
2940
39
print(['No','Yes'][input().count('9')])
s911901847
p03605
u562015767
1592015746
Python
PyPy3 (2.4.0)
py
Runtime Error
168
38256
375
n = int(input()) l = [] for _ in range(n): a = int(input()) l.append(a) l.sort() print(l) ans = 0 cnt = 1 tmp = l[0] for i in range(1,len(l)): if tmp == l[i]: cnt += 1 tmp = l[i] else: if cnt%2 != 0: ans += 1 cnt = 1 tmp = l[i] else:...
s985097654
p03605
u562015767
1591976108
Python
PyPy3 (2.4.0)
py
Runtime Error
169
38384
149
n = int(input()) l = [] for _ in range(n): a = int(input()) if a not in l: l.append(a) else: l.remove(a) print(len(l))
s230879524
p03605
u594803920
1591674609
Python
Python (3.4.3)
py
Runtime Error
17
2940
66
s = list(input()) if '9' in li: print('Yes') else: print('No')
s952535086
p03605
u391442102
1591325258
Python
Python (3.4.3)
py
Runtime Error
17
2940
79
N = input() N = list[N[0],N[1]] if '9' in N: print('Yes') else: print('No')
s350433174
p03605
u575802441
1591123228
Python
Python (3.4.3)
py
Runtime Error
21
3316
172
from collections import * N=int(input()) A=[] for i in range(0,N): A.append(int(input())) M=Counter(A) ans=0 for i in M: if(M[i]%2): ans+=1 print(str(ans))
s012278265
p03605
u674588203
1591114437
Python
Python (3.4.3)
py
Runtime Error
17
3064
551
N=int(input()) sisterN=[] SISTERn=[] SIStern=[] for n in range(N): _=int(input()) if _<40000: _s= _ if sisterN.count(_s)==1: sisterN.remove(_s) else: sisterN.append(_s) elif 40001<_<99990: _m= _ if SISterN.count(_m)==1: SISterN.remo...
s126238652
p03605
u674588203
1591113951
Python
Python (3.4.3)
py
Runtime Error
17
3064
551
N=int(input()) sisterN=[] SISTERn=[] SIStern=[] for n in range(N): _=int(input()) if _<40000: _s= _ if sisterN.count(_s)==1: sisterN.remove(_s) else: sisterN.append(_s) elif 40001<_<99000: _m= _ if SISterN.count(_m)==1: SISterN.remo...
s173416535
p03605
u842028864
1590719933
Python
Python (3.4.3)
py
Runtime Error
17
2940
49
a = int(input()) print("Yes" if 9 in a else "No")
s101606317
p03605
u611090896
1590231279
Python
Python (3.4.3)
py
Runtime Error
17
2940
62
N = int(input()) if N in 9: print("Yes") else: print("No")
s663680556
p03605
u551109821
1589926663
Python
Python (3.4.3)
py
Runtime Error
17
2940
70
N = list(input()) if N in '9': print('Yes') else: print('No')
s480080941
p03605
u730710086
1589862039
Python
Python (3.4.3)
py
Runtime Error
20
2940
97
# -*- coding: <encoding name> -*- n = int(input()) if '9' in n: print('Yes') else: print('No')
s454398762
p03605
u730710086
1589861940
Python
Python (3.4.3)
py
Runtime Error
17
2940
95
# -*- coding: <encoding name> -*- n = int(input()) if 9 in n: print('Yes') else: print('No')
s203758516
p03605
u716660050
1589732833
Python
PyPy3 (2.4.0)
py
Runtime Error
166
38512
141
import math def lcm(n,m): return n*m//math.gcd(n,m) A,B,C,D=map(int,input().split()) print(((B-A)-(((B-A)//C)+((B-A)//D)))+((B-A)//lcm(C,D)))
s332201007
p03605
u493130708
1589357508
Python
PyPy3 (2.4.0)
py
Runtime Error
178
38256
90
s = list(input()) if input[0]=="9" or input[1]=="9": print("Yes") else: print("No")
s967401418
p03605
u493130708
1589357244
Python
PyPy3 (2.4.0)
py
Runtime Error
193
39536
83
s = input() if input[0]=="9" or input[1]=="9": print("Yes") else: print("No")
s482723168
p03605
u165268875
1588726814
Python
Python (3.4.3)
py
Runtime Error
17
2940
69
N = int(input()) if 9 in N : print("Yes") else : print("No")
s056946131
p03605
u600261652
1588524046
Python
Python (3.4.3)
py
Runtime Error
17
2940
64
N = int(input()) if "9" in N: print("Yes") else: print("No")
s021671615
p03605
u709799578
1588386591
Python
Python (3.4.3)
py
Runtime Error
17
2940
49
print('Yes' if '9' in 9list(input(())) else 'No')
s004729052
p03605
u497952650
1588134686
Python
PyPy3 (2.4.0)
py
Runtime Error
169
38256
1167
##from scipy.sparse.csgraph import csgraph_from_dense,floyd_warshall import numpy as np from itertools import permutations N,M,R = map(int,input().split()) r = list(map(int,input().split())) """ https://juppy.hatenablog.com/entry/2018/11/01/%E8%9F%BB%E6%9C%AC_python_%E5%85%A8%E7%82%B9%E5%AF%BE%E6%9C%80%E7%9F%AD%E7%B5%...
s070927380
p03605
u235066013
1587693839
Python
Python (3.4.3)
py
Runtime Error
17
2940
76
N=int(input()) if N[0]=='9' or N[1]=='9': print('Yes') else: print('NO')
s974401586
p03605
u235066013
1587693818
Python
Python (3.4.3)
py
Runtime Error
17
2940
76
N=int(input()) if N[0]=='9' or N[1]=='9': print('Yes') else: print('NO')
s971753276
p03605
u507116804
1587420853
Python
Python (3.4.3)
py
Runtime Error
17
2940
93
n = int(input()) a = n//10 b = n-a*10 if a==9 or b==9: print("Yes") else: pront("No")
s198995217
p03605
u787449825
1587249963
Python
Python (3.4.3)
py
Runtime Error
17
2940
76
n = int(input()) if n%10==9 or n//10==9: print('Yes') else; print('No')
s036189305
p03605
u787449825
1587249935
Python
Python (3.4.3)
py
Runtime Error
17
2940
73
n = int(input()) if n%10==9 or n//10==9: print('Yes') else; print('No')
s667513643
p03605
u550535134
1587245598
Python
Python (3.4.3)
py
Runtime Error
21
3316
62
N = int(input()) if 9 in N: print("Yes") else: print("No")