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
s063856056
p03645
u142415823
1501382402
Python
Python (3.4.3)
py
Runtime Error
17
3064
412
import sys l = raw_input().split() N = int(l[0]) M = int(l[1]) nlist = [] list1 = [] for i in range(0, M): tmp = raw_input().split() a = int(tmp[0]) b = int(tmp[1]) if a == 1: list1.append(b) continue if b == N: nlist.append(a) continue matched_list = list(set(list1) ...
s489673856
p03645
u997023236
1501382322
Python
Python (3.4.3)
py
Runtime Error
417
18212
600
N,M = map(int, input().split(" ")) N2 = str(N) d = [] n = 0 d2 =[] d3 =[] for i in range(M): a = str(input()) d.append(a) a = 0 for i in range(M): if d[n][0] == '1': d2.append(d[n]) if d[n][2] == 'N2': d3.append(d[n]) n += 1 if d2 == 0 or d3 == 0: print('IMPOSSIBLE') ...
s019302486
p03645
u997023236
1501382267
Python
Python (3.4.3)
py
Runtime Error
413
18224
600
N,M = map(int, input().split(" ")) N2 = str(N) d = [] n = 0 d2 =[] d3 =[] for i in range(M): a = str(input()) d.append(a) a = 0 for i in range(M): if d[n][0] == '1': d2.append(d[n]) if d[n][2] == 'N2': d3.append(d[n]) n += 1 if d2 == 0 or d3 == 0: print('IMPOSSIBLE') ...
s037654955
p03645
u364386647
1501382242
Python
Python (3.4.3)
py
Runtime Error
567
18804
355
N, M = map(int, input().split()) a = [0] * M b = [0] * M for i in range(M): a[i], b[i] = map(int, input().split()) index = [] for i in range(M): if b[i] == N: index = i for j in range(M): if b[j] == a[index]: if a[j] == 1: print("POSSIBLE") break else: ...
s097038324
p03645
u364386647
1501382181
Python
Python (3.4.3)
py
Runtime Error
571
18804
374
N, M = map(int, input().split()) a = [0] * M b = [0] * M for i in range(M): a[i], b[i] = map(int, input().split()) index = [] for i in range(M): if b[i] == N: index = i for j in range(M): if b[j] == a[index]: print(a[j]) if a[j] == 1: print("POSSIBLE") bre...
s705304249
p03645
u997023236
1501382142
Python
Python (3.4.3)
py
Runtime Error
405
18208
561
N,M = map(int, input().split(" ")) N2 = str(N) d = [] n = 0 d2 =[] d3 =[] for i in range(M): a = str(input()) d.append(a) a = 0 for i in range(M): if d[n][0] == '1': d2.append(d[n]) if d[n][2] == 'N2': d3.append(d[n]) n += 1 if d2 == 0 or d3 == 0: print('IMPOSSIBLE') ...
s908337759
p03645
u142415823
1501382107
Python
Python (2.7.6)
py
Runtime Error
11
2568
472
import sys l = raw_input().split() N = int(l[0]) M = int(l[1]) nlist = [] list1 = [] flag = True for i in range(0, M): tmp = raw_input().split() a = int(tmp[0]) b = int(tmp[1]) if a == 1: list1.append(b) continue if b == N: nlist.append(a) continue matched_list = [] ...
s417905881
p03645
u142415823
1501382015
Python
Python (2.7.6)
py
Runtime Error
10
2568
425
import sys l = raw_input().split() N = int(l[0]) M = int(l[1]) nlist = [] list1 = [] flag = True for i in range(0, M): tmp = raw_input().split() a = int(tmp[0]) b = int(tmp[1]) if a == 1: list1.append(b) continue if b == N: nlist.append(a) continue matched_list = lis...
s032994937
p03645
u997023236
1501381880
Python
Python (3.4.3)
py
Runtime Error
420
18204
504
N,M = map(int, input().split(" ")) N2 = str(N) d = [] n = 0 d2 =[] d3 =[] for i in range(M): a = str(input()) d.append(a) a = 0 for i in range(M): if d[n][0] == '1': d2.append(d[n]) if d[n][2] == 'N2': d3.append(d[n]) n += 1 l = 0 m = 0 a_j = 0 for i in range(len(d2) - ...
s788389122
p03645
u626881915
1501381764
Python
Python (3.4.3)
py
Runtime Error
2105
27772
521
n, m = map(int, input().split()) ship = [] for i in range(m): a, b = map(int, input().split()) if a == 1 or b == n: ship.append((a, b)) if len(ship) == 0: print("IMPOSSIBLE") exit() ship.sort() i = 0 while ship[i][0] == 1: i += 1 if i == len(ship): print("IMPOSSIBLE") for j in range(...
s508828415
p03645
u997023236
1501381730
Python
Python (3.4.3)
py
Runtime Error
426
18208
542
N,M = map(int, input().split(" ")) N2 = str(N) d = [] n = 0 d2 =[] d3 =[] for i in range(M): a = str(input()) d.append(a) a = 0 for i in range(M): if d[n][0] == '1': d2.append(d[n]) n += 1 n = 0 for i in range(M): if d[n][2] == 'N2': d3.append(d[n]) n += 1 l = 0 m =...
s508791553
p03645
u626881915
1501381725
Python
Python (3.4.3)
py
Runtime Error
17
3064
524
n, m = map(int, input().split()) ship = [] for i in range(m): a, b = map(int, input().split()) if a == 1 or b == n: ship.append((a, b)) if len(ship) == 0: print("IMPOSSIBLE") exit() ship.sort() i = 0 while ship[i][0] == 1: i += 1 if i == len(ship): print("IMPOSSIBLE") for j in ra...
s478002292
p03645
u502314533
1501381669
Python
Python (3.4.3)
py
Runtime Error
17
3060
186
use = int(input()) if use < 4: print(1) elif use < 8: print(4) elif use < 16: print(8) elif use < 32: print(16) elif use < 64: print(32) elif use > 63: print(64)
s784030138
p03645
u626881915
1501381604
Python
Python (3.4.3)
py
Runtime Error
17
3064
480
n, m = map(int, input().split()) ship = [] for i in range(m): a, b = map(int, input().split()) if a == 1 or b == n: ship.append((a, b)) if len(ship) == 0: print("IMPOSSIBLE") exit() ship.sort() i = 0 while ship[i][0] == 1: i += 1 for j in range(i): for k in range(i, len(ship)): ...
s467222659
p03645
u997023236
1501381493
Python
Python (3.4.3)
py
Runtime Error
415
18208
542
N,M = map(int, input().split(" ")) N2 = str(N) d = [] n = 0 d2 =[] d3 =[] for i in range(M): a = str(input()) d.append(a) a = 0 for i in range(M): if d[n][0] == '1': d2.append(d[n]) n += 1 n = 0 for i in range(M): if d[n][2] == 'N2': d3.append(d[n]) n += 1 l = 0 m =...
s205847370
p03645
u502314533
1501381492
Python
Python (3.4.3)
py
Runtime Error
17
2940
186
use = int(input()) if use < 4: print(1) elif use < 8: print(4) elif use < 16: print(8) elif use < 32: print(16) elif use < 64: print(32) else: print(64)
s919051049
p03645
u626881915
1501381323
Python
Python (3.4.3)
py
Runtime Error
2105
27760
367
n, m = map(int, input().split()) ship = [] for i in range(m): a, b = map(int, input().split()) if a == 1 or b == n: ship.append((a, b)) ship.sort() i = 0 while ship[i][0] == 1: i += 1 for j in range(i): for k in range(i, len(ship)): if ship[j][1] == ship[k][0]: print("POSS...
s940872448
p03645
u997023236
1501381315
Python
Python (3.4.3)
py
Runtime Error
441
20256
542
N,M = map(int, input().split(" ")) N2 = str(N) d = [] n = 0 d2 =[] d3 =[] for i in range(M): a = str(input()) d.append(a) a = 0 for i in range(M): if d[n][0] == '1': d2.append(d[n]) n += 1 n = 0 for i in range(M): if d[n][2] == 'N2': d3.append(d[n]) n += 1 l = 0 m =...
s435020261
p03645
u626881915
1501381210
Python
Python (3.4.3)
py
Runtime Error
2105
36896
379
n, m = map(int, input().split()) ship = [] for i in range(m): a, b = map(int, input().split()) if a == 1 or b == n: ship.append((a, b)) ship.sort() print(ship) i = 0 while ship[i][0] == 1: i += 1 for j in range(i): for k in range(i, len(ship)): if ship[j][1] == ship[k][0]: ...
s693921387
p03645
u997023236
1501381169
Python
Python (3.4.3)
py
Runtime Error
422
18208
537
N,M = map(int, input().split(" ")) N2 = str(N) d = [] n = 0 d2 =[] d3 =[] for i in range(M): a = str(input()) d.append(a) a = 0 for i in range(M): if d[n][0] == '1': d2.append(d[n]) n += 1 n = 0 for i in range(M): if d[n][2] == 'N2': d3.append(d[n]) n += 1 l = 0 m =...
s887138540
p03645
u579754454
1501380919
Python
PyPy3 (2.4.0)
py
Runtime Error
166
38640
309
N,M=map(int,input().split()) a=[],b=[],c=[] flag=0 for i in range(M): x,y=map(int,input().split()) x.append(a) y.append(b) if x==1: c.append(y) for i in range(M): if b[i]==N: if a[i] in c: flag+=1 if flag==0: print("IMPOSSIBLE") else: print("POSSIBLE")
s028993478
p03645
u626881915
1501380895
Python
Python (3.4.3)
py
Runtime Error
2105
27772
359
n, m = map(int, input().split()) ship = [] for i in range(m): a, b = map(int, input().split()) if a == 1 or b == n: ship.append((a, b)) ship.sort() i = 0 while ship[i][0] == 1: i += 1 for j in range(i): for k in range(i, m): if ship[j][1] == ship[k][0]: print("POSSIBLE") ...
s553253056
p03645
u626881915
1501380791
Python
Python (3.4.3)
py
Runtime Error
2105
29040
361
n, m = map(int, input().split()) ship = [] for i in range(m): a, b = map(int, input().split()) if a == 1 or b == n: ship.append((a, b)) ship.sort() i = 0 while ship[i][0] == 1: i += 1 for j in range(i): for k in range(i+1, m): if ship[j][1] == ship[k][0]: print("POSSIBLE")...
s527320983
p03645
u626881915
1501380508
Python
Python (3.4.3)
py
Runtime Error
2105
30780
392
n, m = map(int, input().split()) ship = [] for i in range(m): ship.append(tuple(map(int, input().split()))) ship.sort() for s in ship: if s[0] != 1 and s[1] != n: ship.remove(s) i = 0 while ship[i][0] == 1: i += 1 for j in range(i): for k in range(i+1, m): if ship[j][1] == ship[k][0]...
s129877482
p03645
u626881915
1501380404
Python
Python (3.4.3)
py
Runtime Error
2105
30792
387
n, m = map(int, input().split()) ship = [] for i in range(m): ship.append(tuple(map(int, input().split()))) ship.sort() for s in ship: if s[0] != 1 and s[1] != n: ship.remove(s) i = 0 while ship[i][0]: i += 1 for j in range(i): for k in range(i+1, m): if ship[j][1] == ship[k][0]: ...
s494889477
p03645
u075012704
1501380385
Python
Python (3.4.3)
py
Runtime Error
788
52708
644
import sys N , M = map(int , input().split()) voyages = [] for i in range(M): voyages.append(list(map(int , input().split()))) def search(goal, path): n = path[len(path) - 1] if n == goal - 1: if len(path) < 4: print("POSSIBLE") else: print("IMPOSSIBLE") sys...
s844057620
p03645
u087512063
1501379830
Python
Python (2.7.6)
py
Runtime Error
2108
101160
776
d = {} graph = {} def bfs(graph, start): visited, queue = set(), [start] while queue: vertex = queue.pop(0) if vertex not in visited: visited.add(vertex) minn = 1e+9 for i in graph[vertex]: minn = min (d[i], minn) d[vertex] = min(m...
s075620120
p03645
u166636976
1501379773
Python
Python (3.4.3)
py
Runtime Error
17
3060
313
N, M = int(input().split()) f = [] s = [] for i in range(M): a = list(map(int, input().split())) if a[0] == 1: f.append(s) elif a[1] == N: s.append(s) a=1 for i in f: for j in s: if i[1] == j[0]: print("POSSIBLE") a=0 if a: print("IMPOSSIBLE")
s300545446
p03645
u075012704
1501379765
Python
Python (3.4.3)
py
Runtime Error
786
52704
736
import sys N , M = map(int , input().split()) voyages = [] for i in range(M): voyages.append(list(map(int , input().split()))) def search(goal, path): n = path[len(path) - 1] if n == goal - 1: if len(path) < 4: print("POSSIBLE") else: print("IMPOSSIBLE") sys...
s942031464
p03645
u729300713
1501379714
Python
Python (3.4.3)
py
Runtime Error
17
3064
417
N, M = map(int, raw_input().split()) a = [] b = [] ikeru = [0]*(N+1) for i in range(M): a_tmp, b_tmp = map(int, raw_input().split()) a.append(a_tmp) b.append(b_tmp) for i in range(M): if a[i] == 1: ikeru[b[i]] = 1 ikeru_2 = [0]*(N+1) for i in range(M): if ikeru[a[i]] == 1: ikeru_2[b...
s649853162
p03645
u166636976
1501379681
Python
Python (3.4.3)
py
Runtime Error
2104
5028
318
N, M = map(int, input().split()) f = [] s = [] for i in range(M): a = list(map(int, input().split())) if a[0] == 1: f.append(s) elif a[1] == N: s.append(s) a=0 for i in f: for j in s: if i[1] == j[0]: print("POSSIBLE") a=1 if a: print("IMPOSSIBLE")
s973604286
p03645
u729300713
1501379670
Python
Python (3.4.3)
py
Runtime Error
17
3064
418
N, M = map(int, raw_input().split()) a = [] b = [] ikeru = [0]*(N+1) for i in range(M): a_tmp, b_tmp = map(int, raw_input().split()) a.append(a_tmp) b.append(b_tmp) for i in range(M): if a[i] == 1: ikeru[b[i]] = 1 ikeru_2 = [0]*(N+1) for i in range(M): if ikeru[a[i]] == 1: ikeru_2[b...
s830426550
p03645
u729300713
1501379643
Python
Python (3.4.3)
py
Runtime Error
18
3064
429
import sys N, M = map(int, raw_input().split()) a = [] b = [] ikeru = [0]*(N+1) for i in range(M): a_tmp, b_tmp = map(int, raw_input().split()) a.append(a_tmp) b.append(b_tmp) for i in range(M): if a[i] == 1: ikeru[b[i]] = 1 ikeru_2 = [0]*(N+1) for i in range(M): if ikeru[a[i]] == 1: ...
s225609670
p03645
u166636976
1501379601
Python
Python (3.4.3)
py
Runtime Error
17
3060
313
N, M = int(input().split()) f = [] s = [] for i in range(M): a = list(map(int, input().split())) if a[0] == 1: f.append(s) elif a[1] == N: s.append(s) a=0 for i in f: for j in s: if i[1] == j[0]: print("POSSIBLE") a=1 if a: print("IMPOSSIBLE")
s413623220
p03645
u729300713
1501379530
Python
Python (3.4.3)
py
Runtime Error
17
3064
467
import sys N, M = map(int, raw_input().split()) a = [] b = [] ikeru = [0]*(N+1) for i in range(M): a_tmp, b_tmp = map(int, raw_input().split()) a.append(a_tmp) b.append(b_tmp) for i in range(M): if a[i] == 1: ikeru[b[i]] = 1 if ikeru[N] == 1: print("POSSIBLE") sys.exit() ikeru_2 = [0]*(...
s399048701
p03645
u075012704
1501379522
Python
Python (3.4.3)
py
Runtime Error
816
52704
604
import sys N , M = map(int , input().split()) voyages = [] for i in range(M): voyages.append(list(map(int , input().split()))) def search(goal, path): n = path[len(path) - 1] if n == goal - 1: if len(path) < 4: print("POSSIBLE") else: print("IMPOSSIBLE") sys...
s082389133
p03645
u125205981
1501379481
Python
Python (3.4.3)
py
Runtime Error
644
30240
378
def main(): N, M = map(int, input().split()) A = tuple(tuple(map(int, input().split())) for _ in range(M)) if M == 1: print('IMPOSSIBLE') return for a, b in A: if a == 1: relay1 = b elif b == N: relay2 = a if relay1 == relay2: print(...
s381409125
p03645
u166636976
1501379389
Python
Python (3.4.3)
py
Runtime Error
18
2940
316
N, M = int(input().split()) f = [] s = [] for i in range(M): a = list(map(int, input().split() if a[0] == 1: f.append(s) elif a[1] == N: s.append(s) a = 0 for i in f: for j in s: if i[1] == j[0]: print("POSSIBLE") a = 1 if a : print("IMPOSSIBLE")
s640515451
p03645
u166636976
1501379356
Python
Python (3.4.3)
py
Runtime Error
17
2940
311
N, M = int(input().split()) f = [] s for i in range(M): a = list(map(int, input().split() if a[0] == 1: f.append(s) elif a[1] == N: s.append(s) a = 0 for i in f: for j in s: if i[1] == j[0]: print("POSSIBLE") a = 1 if a : print("IMPOSSIBLE")
s925560711
p03645
u893209854
1501378039
Python
Python (3.4.3)
py
Runtime Error
17
2940
396
import sys N, M = map(int, input().split()) routes = [] for i in range(M): a, b = map(int, input().split()) routes.append([a, b]) m = [] for r in routes: if r[0] == 1: m.append(r[1]) for r in routes: if r[0] in m: if r[1] == N: ...
s933407185
p03645
u626881915
1501377431
Python
Python (3.4.3)
py
Runtime Error
18
3064
596
n, m = map(int, input().split()) ship = [] for i in range(m): ship[i] = tuple(map(int, input().split())) for i in range(m): if ship[i][0] == 1: for j in range(i+1, m): if ship[i][1] == ship[j][0] and ship[j][1] == n or ship[i][1] == ship[j][1] and ship[j][0] == n: print("POS...
s791775860
p03646
u477320129
1600929563
Python
Python (3.8.2)
py
Runtime Error
29
9040
56
K = int(input()) print(K) print(*range(1, K+1), sep=" ")
s710197973
p03646
u730769327
1598713783
Python
PyPy3 (7.3.0)
py
Runtime Error
80
74648
185
k=int(input()) n=min(k,50) a=list(range(n)) for i in range(n): a[i]+=(k+n-1)//n for i in range(k%n): a[i]+=n for j in range(n): if i==j:continue a[j]-=1 print(n) print(*a)
s348834787
p03646
u730769327
1598713709
Python
PyPy3 (7.3.0)
py
Runtime Error
78
74396
185
k=int(input()) n=min(k,50) a=list(range(n)) for i in range(n): a[i]+=(k+n-1)//n for i in range(k%n): a[i]+=n for j in range(n): if i==j:continue a[i]-=1 print(n) print(*a)
s104203493
p03646
u827202523
1598232649
Python
PyPy3 (7.3.0)
py
Runtime Error
98
74616
3393
import sys import math import copy from heapq import heappush, heappop, heapify from functools import cmp_to_key from bisect import bisect_left, bisect_right from collections import defaultdict, deque, Counter # sys.setrecursionlimit(1000000) # input aliases input = sys.stdin.readline getS = lambda: input().strip() ge...
s915227977
p03646
u827202523
1598232581
Python
PyPy3 (7.3.0)
py
Runtime Error
85
74688
3326
import sys import math import copy from heapq import heappush, heappop, heapify from functools import cmp_to_key from bisect import bisect_left, bisect_right from collections import defaultdict, deque, Counter # sys.setrecursionlimit(1000000) # input aliases input = sys.stdin.readline getS = lambda: input().strip() ge...
s008533165
p03646
u023229441
1597257870
Python
Python (3.8.2)
py
Runtime Error
32
9976
962
import sys import math import heapq mod=10**9+7 inf=float("inf") from math import sqrt from collections import deque from collections import Counter from collections import defaultdict #すべてのkeyが用意されてる defaultdict(int)で初期化 from collections import OrderedDict #順序を保ったdict from math import ceil input=lambda: sys.stdin.read...
s974610360
p03646
u366541443
1591504434
Python
PyPy3 (2.4.0)
py
Runtime Error
174
38384
255
#52- n = int(input()) if(n<50): print(50) print(' '.join(['50']*n+['0']*(50-n))) exit() ans = ['' for i in range(50)] q = n//50 r = n%50 for i in rl(ans): ans[i] = str(49+q - i + (1 if i<r else 0)) print(len(ans)) print(*ans)
s567454370
p03646
u145950990
1588769096
Python
Python (3.4.3)
py
Runtime Error
17
2940
176
k = int(input()) tasu = k // 2 lst = list(range(tasu, tasu+2)) amari = k % 2 for i in range(amari): idx = 2 - i lst[idx] += 1 print(2) print(' '.join(map(str, lst)))
s153696072
p03646
u186838327
1588767199
Python
PyPy3 (2.4.0)
py
Runtime Error
169
39888
72
k = int(input()) n = k+1 A = [0]*n A[0] = (n-1)+n*k print(n) print(*A)
s405636936
p03646
u057109575
1588436573
Python
PyPy3 (2.4.0)
py
Runtime Error
175
38384
187
N = 5 x = list(range(5)) for i in range(min(N - 1, K)): for j in range(N): if j == i: x[j] += N else: x[j] -= 1 print(N) print(*x)
s178600569
p03646
u503228842
1586865381
Python
PyPy3 (2.4.0)
py
Runtime Error
174
38640
220
K = int(input()) N = 50 num = [i for i in range(N)] for i in range(N): num[i] += N//K r = N%K for i in range(r): num[i] += N for j in range(N): if j != i: num[j] -= 1 print(N) print(*num)
s632489972
p03646
u503228842
1586864852
Python
PyPy3 (2.4.0)
py
Runtime Error
170
38512
228
K = int(input()) N = 50 num = [i for i in range(N)] for i in range(N): num[i] += N//K r = N%K for _ in range(r): head = num.pop(0) for i in range(N-1): num[i] += 1 num.append(head+N) print(N) print(*num)
s946216095
p03646
u843135954
1586553253
Python
Python (3.4.3)
py
Runtime Error
17
3064
307
import sys stdin = sys.stdin ni = lambda: int(ns()) na = lambda: list(map(int, stdin.readline().split())) nn = lambda: list(stdin.readline().split()) ns = lambda: stdin.readline().rstrip() k = ni() n = 50 a = k//n b = k&n c = n-1+x ans = [str(c+n-b+1)]*b + [str(c-b)]*(n-b) print(n) print(''.join(ans))
s732129597
p03646
u550061714
1586184417
Python
Python (3.4.3)
py
Runtime Error
17
3060
142
K = int(input()) N = 50 while not K % N: N -= 1 ans = [K // N + N] * (K % N) + [K // N + N - K % N - 1] * (N - K % N) print(N) print(*ans)
s665542912
p03646
u545368057
1584964842
Python
PyPy3 (2.4.0)
py
Runtime Error
171
38640
40
K = int(input()) print(2) print(N+K-2,2)
s554250169
p03646
u690536347
1583186204
Python
Python (3.4.3)
py
Runtime Error
17
3060
76
k = int(input()) n = k+1 x = k*(n+1) print(n) l = [x] + [0]*(n-1) print(*l)
s799065384
p03646
u936985471
1581480159
Python
Python (3.4.3)
py
Runtime Error
2131
1838708
65
K=int(input()) N=int(K**0.5)+2 print(N) print(*([N*K]+[0]*(N-1)))
s412945377
p03646
u936985471
1581479556
Python
Python (3.4.3)
py
Runtime Error
17
3060
64
K=int(input()) N=K+1 print(N) print(str(N*K)+" "+"0 "*(N-2)+"0")
s872179616
p03646
u936985471
1581479454
Python
Python (3.4.3)
py
Runtime Error
18
3060
55
K=int(input()) N=K+1 print(N) print(*([N*K]+[0]*(N-1)))
s856593863
p03646
u644907318
1579455916
Python
PyPy3 (2.4.0)
py
Runtime Error
173
38384
694
import numpy as np K = int(input()) N = 50 A = np.array([np.zeros(N) for _ in range(N)]).astype(int) for i in range(N): for j in range(N): A[i,j] = 1 if j==i+1 else 0 A[N-1,0] = 1 B = [0 for _ in range(N)] B[0] = np.identity(N).astype(int) for i in range(1,N): B[i] = np.dot(B[i-1],A).astype(int) C = [0 ...
s059621721
p03646
u556799364
1578942575
Python
PyPy3 (2.4.0)
py
Runtime Error
171
38384
197
# -*- coding: utf-8 -*- K = int(input()) N = 10 import numpy as np A = np.asarray(list(range(N))) k = K // 10 A += k k = K % 10 for i in range(k): A[i] += N + 1 A -= 1 print(N) print(*A)
s071291461
p03646
u113971909
1578673891
Python
Python (3.4.3)
py
Runtime Error
75
3956
489
K = int(input()) N = 0 M = 0 A = 50 for n in range(2,51): m,a=K//n,K%n if m<=10**16 and m+1>=n: if a<A: N,M,A = n,m,a if a==0: break def solv(n,m,a): if a == 0: return [m+1]*n else: if n == a+1: ret = solv(n,m+1,0) else: ret = solv(n,m,a+1) print(ret) MX =...
s702538781
p03646
u113971909
1578673087
Python
Python (3.4.3)
py
Runtime Error
76
3968
459
K = int(input()) N = 0 M = 0 A = 50 for n in range(2,51): m,a=K//n,K%n if m<=10**16: if a<A: N,M,A = n,m,a if a==0: break def solv(n,m,a): if a == 0: return [m+1]*n else: if n == a+1: ret = solv(n,m+1,a) else: ret = solv(n,m,a+1) MX = max(ret) MXI = index(...
s907674157
p03646
u113971909
1578673030
Python
Python (3.4.3)
py
Runtime Error
76
3972
461
K = int(input()) N = 0 M = 0 A = 50 for n in range(2,51): m,a=K//n,K%n if m<=10**16: if a<A: N,M,A = n,m,a if a==0: break def solv(n,m,a): if a == 0: return [m+1]*n else: if n == a+1: ret = solv(n,m+1,a) else: ret = solv(n,m,a+1) MX = max(ret) MXI = index(...
s393457529
p03646
u279493135
1578440197
Python
Python (3.4.3)
py
Runtime Error
158
13628
801
import sys, re from collections import deque, defaultdict, Counter from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians, atan, degrees from itertools import permutations, combinations, product, accumulate from operator import itemgetter, mul from copy import deepcopy from string import ascii_lowercase, ...
s454618370
p03646
u780962115
1578282152
Python
PyPy3 (2.4.0)
py
Runtime Error
169
38640
216
k=int(input()) lists=[49 for i in range(50)] T=k//50 for j in range(50): lists[j]+=T print(50) sums=0 for i in range(50): sums+=math.floor((lists[i]+k)/(51)) dis=k-sums lists[0]=lists[0]-51*dis print(*lists)
s040422902
p03646
u037430802
1577412289
Python
Python (3.4.3)
py
Runtime Error
18
3060
369
K = int(input()) N = 50 # 最後の状態からさかのぼる A = [49] * 50 # K を均等に割り振る(どれか一つを集中して選択しない) for i in range(N): A[i] += K // 50 # 割り振った残りを、さらになるべく均等に割り振る for i in range(K // N): A[i] += 51 for j in range(N): A[j] -= 1 print(N) print(*A)
s168391184
p03646
u864197622
1575794765
Python
Python (3.4.3)
py
Runtime Error
17
2940
117
K = int(input()) N = 50 s = N * (N-1) // 2 A = [a + i + (1 if i >= N-b else 0) for i in range(N)] print(N) print(*A)
s200203292
p03646
u923659712
1574140145
Python
Python (3.4.3)
py
Runtime Error
17
3060
59
n=int(input()) s=[n]*n print(n) print(" ".join(map(str,s)))
s178206358
p03646
u466331465
1573148427
Python
PyPy3 (2.4.0)
py
Runtime Error
176
38384
246
N = int(input()) if N<3*10**16: a =1 b=1 print(2) if N%2==0: print(a-N+N//2*3,a-N+N//2*3) else: print(a-N+N//2*3,a-N+(N//2+1)*3) else: a=1000 c=(N%10**16)%51 print((N%10**16)%51) ans = [a-k+k//c*(c+1)]*c print(*ans)
s518227304
p03646
u141610915
1572402264
Python
PyPy3 (2.4.0)
py
Runtime Error
170
38256
181
import sys input = sys.stdin.readline N = int(input()) if N > 1: print(N) res = [N] * N print(*res) elif N == 0: print(2) print(1, 1) elif N == 1: print(2) print(2, 0)
s327186276
p03646
u190406011
1572034597
Python
PyPy3 (2.4.0)
py
Runtime Error
171
38384
120
k = int(input()) n = k+1 res = [n-k-1] * (n-1) res.append((k+1) * n - 1) print(n) print(" ".join([str(i) for i in res]))
s175590254
p03646
u807772568
1567810856
Python
Python (3.4.3)
py
Runtime Error
24
4340
1087
import sys,bisect as bs sys.setrecursionlimit(100000) mod = 10**9+7 Max = sys.maxsize def l(): #intのlist return list(map(int,input().split())) def m(): #複数文字 return map(int,input().split()) def onem(): #Nとかの取得 return int(input()) def s(x): #圧縮 a = [] aa = x[0] su = 1 for i in range(len(x)-1)...
s440712133
p03646
u807772568
1567809884
Python
Python (3.4.3)
py
Runtime Error
18
3064
1035
import sys,bisect as bs sys.setrecursionlimit(100000) mod = 10**9+7 Max = sys.maxsize def l(): #intのlist return list(map(int,input().split())) def m(): #複数文字 return map(int,input().split()) def onem(): #Nとかの取得 return int(input()) def s(x): #圧縮 a = [] aa = x[0] su = 1 for i in range(len(x)-1)...
s051327798
p03646
u807772568
1567809829
Python
Python (3.4.3)
py
Runtime Error
17
3064
1031
import sys,bisect as bs sys.setrecursionlimit(100000) mod = 10**9+7 Max = sys.maxsize def l(): #intのlist return list(map(int,input().split())) def m(): #複数文字 return map(int,input().split()) def onem(): #Nとかの取得 return int(input()) def s(x): #圧縮 a = [] aa = x[0] su = 1 for i in range(len(x)-1)...
s094728334
p03646
u807772568
1567809800
Python
Python (3.4.3)
py
Runtime Error
17
3064
1027
import sys,bisect as bs sys.setrecursionlimit(100000) mod = 10**9+7 Max = sys.maxsize def l(): #intのlist return list(map(int,input().split())) def m(): #複数文字 return map(int,input().split()) def onem(): #Nとかの取得 return int(input()) def s(x): #圧縮 a = [] aa = x[0] su = 1 for i in range(len(x)-1)...
s561725147
p03646
u518987899
1567490242
Python
Python (3.4.3)
py
Runtime Error
17
3060
133
K = int(input().strip()) if K == 0: print(2) print(1,1) elif K == 1: print(2) print(3,0) else: print(K) print(*[K]*K)
s890007492
p03646
u518987899
1567490098
Python
Python (3.4.3)
py
Runtime Error
17
3060
95
K = int(input().strip()) if K == 0: print(2) print(1,1) else: print(K) print(*[K]*K)
s014807113
p03646
u423585790
1566794209
Python
PyPy3 (2.4.0)
py
Runtime Error
178
38768
1888
#!usr/bin/env python3 from collections import defaultdict from collections import deque from heapq import heappush, heappop import sys import math import bisect import random import itertools sys.setrecursionlimit(10**5) stdin = sys.stdin def LI(): return list(map(int, stdin.readline().split())) def LF(): return list(m...
s608559303
p03646
u102960641
1566749016
Python
Python (3.4.3)
py
Runtime Error
17
3064
72
N=50;k,s=divmod(int(input()),N);d=n-s;print(N);print(*[N+k]*s+[d+k-1]*d)
s129103713
p03646
u174404613
1561831093
Python
Python (3.4.3)
py
Runtime Error
17
2940
129
k=int(input()) m=k//2 if (k%2==0): print(2) print"{} {}".format(m,m+1) else: print(2) print"{} {}".format(m,m+2)
s141738716
p03646
u879309973
1561402164
Python
Python (3.4.3)
py
Runtime Error
17
2940
260
def f(k): if k == 0: return [0,0] elif k == 1: return [2,0] elif k == 2: return [2,1] else: return [k//2, k-k//2] def solve(k): a = f(k) print(len(a)) print(" ".join(map(str, a)) solve(k=int(input()))
s914070698
p03646
u879309973
1561399370
Python
Python (3.4.3)
py
Runtime Error
17
2940
68
def solve(k): print(2) print(f"0 {k}") solve(k=int(input()))
s326215807
p03646
u394721319
1561074367
Python
PyPy3 (2.4.0)
py
Runtime Error
177
38384
74
N = int(input()) ans = [0]*(N+1) ans[0] = N*(N+1)+1 print(N+1) print(ans)
s542863582
p03646
u603745966
1556075832
Python
Python (3.4.3)
py
Runtime Error
25
3700
1768
from functools import reduce import math def main(): # 文字列の2進数を数値にする # '101' → '5' # 文字列の頭に'0b'をつけてint()にわたす # binary = int('0b'+'101',0) # 2進数で立っているbitを数える # 101(0x5) → 2 # cnt_bit = bin(5).count('1') # N! を求める # f = math.factorial(N) # N の逆元 # N_inv = pow(N,MOD-2,MO...
s449040163
p03646
u827202523
1551916399
Python
Python (3.4.3)
py
Runtime Error
18
3060
178
k = int(input()) import math offset = math.ceil(k/50) nums = [i+offset for i in range(50)] for i in range(k%50): nums[-i] -= 50 print(50) print(" ".join(list(map(int,nums))))
s777684234
p03646
u827202523
1551916121
Python
Python (3.4.3)
py
Runtime Error
18
3060
163
k = int(input()) import math offset = math.ceil(k/50) nums = [i+offset for i in range(50)] for i in range(k%50): nums[-i] -= 50 print(50) print(" ".join(nums))
s299047397
p03646
u827202523
1551916018
Python
Python (3.4.3)
py
Runtime Error
20
2940
148
k = int(input()) offset = ceil(k/50) nums = [i+offset for i in range(50)] for i in range(k%50): nums[-i] -= 50 print(50) print(" ".join(nums))
s229603501
p03646
u201234972
1548988047
Python
Python (3.4.3)
py
Runtime Error
19
3060
225
K = int(input()) print(50) s, t = K//50, K%50 ANS = [ s + i for i in range(50)] for j in range(t): for i in range(50): if j == i: ANS[i] += 50 else: ANS[i] -= 1 print(" ".join(ANS))
s757276563
p03646
u611509859
1537449725
Python
Python (3.4.3)
py
Runtime Error
17
3064
74
n=int(input())+1 a=["0"]*n a[0]=str(n*(n-1)+1) print(n) print(" ".join(a))
s396209730
p03646
u611509859
1537448778
Python
Python (3.4.3)
py
Runtime Error
17
3060
70
n=int(input())+1 a=["0"]*n a[0]=str(n**2-1) print(n) print("".join(a))
s815259541
p03646
u224983328
1532460900
Python
Python (3.4.3)
py
Runtime Error
17
3064
135
K = int(input()) result = "" for i in range(K): if i == K - 1: result += K else: result += K print(K) print(result)
s387328216
p03646
u075012704
1524606938
Python
PyPy3 (2.4.0)
py
Runtime Error
174
38384
351
from math import ceil import numpy K = int(input()) N = 50 M = ceil(K / N) + 49 Y = 50 - K % 50 ans = numpy.array([M] * 50) ans[:Y] -= (K % 50 + 1) ans = list(map(str, ans)) print(N) print(" ".join(ans)) # cnt = 0 # while not (all(map(lambda x: x <= 49, ans))): # cnt += 1 # ans.sort() # ans[-1] -= 50 # ...
s727422968
p03646
u562016607
1520369704
Python
Python (3.4.3)
py
Runtime Error
17
3060
253
K = int(input()) N = 10 a = [i for i in range(N)] for k in range(K//N): a[k]+=K//N for i in range(K%N): for j in range(N): if i==j: a[j]+=N else: a[j]-=1 print(N) print(str(a)[1:][:-1].replace(", ", " "))
s190867075
p03646
u562016607
1520369648
Python
Python (3.4.3)
py
Runtime Error
17
3060
253
K = int(input()) N = 10 a = [i for i in range(N)] for k in range(K//N): a[i]+=K//N for i in range(K%N): for j in range(N): if i==j: a[j]+=N else: a[j]-=1 print(N) print(str(a)[1:][:-1].replace(", ", " "))
s767488630
p03646
u898651494
1518353529
Python
Python (3.4.3)
py
Runtime Error
17
2940
1561
#include <iostream> #include <fstream> #include <string> #include <cmath> #include <cstdlib> #include <ctime> #include <vector> #include <algorithm> #include <numeric> #include <map> #include <set> #include <stack> #include <queue> #include <deque> #include <functional> using namespace std; using ll = long long; #...
s298776206
p03646
u579754454
1502381250
Python
Python (3.4.3)
py
Runtime Error
17
3064
302
K=int(input()) a=[] N=0 if K<=50: N=K a=[i for i in range(1,K+1)] a=map(str,a) else: N=50 index=0 a=[i for i in range(1,51)] for i in range(K-50): index=a.index(min(a)) a[index]+=N+1 a=map(lambda x:x-1,a) a=map(str,a) print(N) print(" ".join(a))
s124048210
p03646
u579754454
1502381132
Python
Python (3.4.3)
py
Runtime Error
17
3064
302
K=int(input()) a=[] N=0 if K<=50: N=K a=[i for i in range(1,K+1)] a=map(str,a) else: N=50 index=0 a=[i for i in range(0,50)] for i in range(K-50): index=a.index(min(a)) a[index]+=N+1 a=map(lambda x:x-1,a) a=map(str,a) print(N) print(" ".join(a))
s653044998
p03646
u579754454
1502347161
Python
Python (3.4.3)
py
Runtime Error
18
3064
299
K=int(input()) a=[] N=0 if K<=50: N=K a=[i for i in range(1,K+1)] a=map(str,a) else: N=50 index=0 a=[i for i in range(0,50)] for i in range(K): index=a.index(min(a)) a[index]+=N+1 a=map(lambda x:x-1,a) a=map(str,a) print(N) print(" ".join(a))