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
s309155614
p02536
u598684283
1601169127
Python
Python (3.8.2)
py
Runtime Error
2206
9824
182
n,m = map(int,input().split()) a = [] b = [] douro = [1]*n for i in range(m): a_,b_ = map(int,input().split()) for j in range(a_,b_+1): douro[j] = 0 print(sum(douro))
Traceback (most recent call last): File "/tmp/tmp_ozr014r/tmpeptnt6yr.py", line 1, in <module> n,m = map(int,input().split()) ^^^^^^^ EOFError: EOF when reading a line
s617975561
p02536
u983853152
1601169126
Python
Python (3.8.2)
py
Runtime Error
201
10664
1377
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/tmpco5mwbl2/tmp3p7liwnn.py", line 49, in <module> N,M = map(int, input().split()) ^^^^^^^ EOFError: EOF when reading a line
s103206549
p02536
u244416763
1601169118
Python
Python (3.8.2)
py
Runtime Error
400
28024
656
from collections import deque n, m = map(int, input().split()) a = [0 for _ in range(n)] b = [0 for _ in range(n)] Edge = [[] for _ in range(n)] for i in range(m): a[i], b[i] = map(int, input().split()) a[i] -= 1 b[i] -= 1 Edge[a[i]].append(b[i]) Edge[b[i]].append(a[i]) looked = [1 for i in range(n)...
Traceback (most recent call last): File "/tmp/tmp72zulu57/tmp_lpe7o7h.py", line 2, in <module> n, m = map(int, input().split()) ^^^^^^^ EOFError: EOF when reading a line
s738471515
p02536
u693666240
1601169110
Python
PyPy3 (7.3.0)
py
Runtime Error
383
111040
561
mod = 10**9 + 7 def go(v): used[v] = True for i in range(len(g[v])): if used[g[v][i]] == False: go(g[v][i]) def solve(): n, m = map(int, input().split()) ans = 0 global g, used g = [[] for i in range(n + 1)] used = [False for i in range(n + 1)] for i in range(m): ...
Traceback (most recent call last): File "/tmp/tmphhigtrjw/tmp3m737woh.py", line 24, in <module> solve() File "/tmp/tmphhigtrjw/tmp3m737woh.py", line 8, in solve n, m = map(int, input().split()) ^^^^^^^ EOFError: EOF when reading a line
s845303112
p02536
u004312392
1601169108
Python
PyPy3 (7.3.0)
py
Runtime Error
281
76032
1364
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/tmp25wp8wj1/tmp2em2jj3y.py", line 48, in <module> N,M = map(int,input().split()) ^^^^^^^ EOFError: EOF when reading a line
s061394778
p02536
u758815106
1601169100
Python
Python (3.8.2)
py
Runtime Error
29
9048
351
#!/usr/bin/env python3 from atcoder.dsu import DSU #import import math #import numpy as np #= int(input()) #= input() N, M = map(int, input().split()) #= list(map(int, input().split())) #= [input(), input()] AB = [list(map(int, input().split())) for _ in range(M)] g = DSU(N) for a, b in AB: g.merge(a, b) grp = ...
Traceback (most recent call last): File "/tmp/tmpafnwvuh6/tmpf5dqdyy_.py", line 3, in <module> from atcoder.dsu import DSU ModuleNotFoundError: No module named 'atcoder'
s455597322
p02536
u243535639
1601169066
Python
PyPy3 (7.3.0)
py
Runtime Error
230
89308
2138
import types _atcoder_code = """ # Python port of AtCoder Library. __version__ = '0.0.1' """ atcoder = types.ModuleType('atcoder') exec(_atcoder_code, atcoder.__dict__) _atcoder_dsu_code = """ import typing class DSU: ''' Implement (union by size) + (path compression) Reference: Zvi Galil and Gius...
Traceback (most recent call last): File "/tmp/tmpnpck9lkb/tmpkdq6szrw.py", line 94, in <module> main() File "/tmp/tmpnpck9lkb/tmpkdq6szrw.py", line 86, in main N, M = map(int, input().split()) ^^^^ ValueError: not enough values to unpack (expected 2, got 0)
s281036742
p02536
u020842472
1601169049
Python
Python (3.8.2)
py
Runtime Error
852
494252
404
import sys sys.setrecursionlimit(int(2e6)) def dfs(u, p = 0): vis[u] = True for v in g[u]: if v != p: dfs(v, u) n, m = map(int, input().split()) g = [list() for i in range(n + 1)] for i in range(m): u, v = map(int, input().split()) g[u].append(v) g[v].append(u) c = 0 vis = [False] * (n + 1) for i ...
Traceback (most recent call last): File "/tmp/tmpipyoy9ff/tmpwiu97_eq.py", line 10, in <module> n, m = map(int, input().split()) ^^^^^^^ EOFError: EOF when reading a line
s671374772
p02536
u244416763
1601169035
Python
Python (3.8.2)
py
Runtime Error
381
28024
656
from collections import deque n, m = map(int, input().split()) a = [0 for _ in range(n)] b = [0 for _ in range(n)] Edge = [[] for _ in range(n)] for i in range(m): a[i], b[i] = map(int, input().split()) a[i] -= 1 b[i] -= 1 Edge[a[i]].append(b[i]) Edge[b[i]].append(b[i]) looked = [1 for i in range(n)...
Traceback (most recent call last): File "/tmp/tmp31bq2duo/tmp0sdw_57s.py", line 2, in <module> n, m = map(int, input().split()) ^^^^^^^ EOFError: EOF when reading a line
s836121846
p02536
u203197031
1601168989
Python
PyPy3 (7.3.0)
py
Runtime Error
243
92760
2198
class dsu(): n=1 parent_or_size=[-1 for i in range(n)] def __init__(self,N): self.n=N self.parent_or_size=[-1 for i in range(N)] def merge(self,a,b): assert 0<=a<self.n, "0<=a<n,a={0},n={1}".format(a,self.n) assert 0<=b<self.n, "0<=b<n,b={0},n={1}".format(b,self.n) ...
Traceback (most recent call last): File "/tmp/tmpm0lu7na7/tmpxp581xzs.py", line 103, in <module> main() File "/tmp/tmpm0lu7na7/tmpxp581xzs.py", line 54, in main n,m = ina() ^^^ ValueError: not enough values to unpack (expected 2, got 0)
s816404015
p02536
u496407619
1601168975
Python
PyPy2 (7.3.0)
py
Runtime Error
271
111336
602
import sys input = lambda : sys.stdin.readline().rstrip() n, m = map(int, input().split(" ")) graph = {} for node in range(1, n+1): graph[node] = [] for i in range(m): a, b = map(int, input().split(" ")) graph[a].append(b) graph[b].append(a) uses = [False] * (n+1) def check(node): uses[node] = ...
Traceback (most recent call last): File "/tmp/tmpc3g8x4__/tmpyee8hqon.py", line 4, in <module> n, m = map(int, input().split(" ")) ^^^^ ValueError: invalid literal for int() with base 10: ''
s490186863
p02536
u285265363
1601168972
Python
Python (3.8.2)
py
Runtime Error
395
10720
842
class UnionFind(): def __init__(self, N): self.N = N self.parents = [-1] * N def root(self, x): if self.parents[x] < 0: return x else: self.parents[x] = self.root(self.parents[x]) return self.parents[x] def unite(self, x, y): x = ...
Traceback (most recent call last): File "/tmp/tmpl_2wwnsi/tmpit2ts36_.py", line 27, in <module> n, m = map(int, input().split()) ^^^^^^^ EOFError: EOF when reading a line
s258328498
p02536
u650939551
1601168971
Python
PyPy3 (7.3.0)
py
Runtime Error
406
83584
1703
# Python program to print DFS traversal for complete graph from collections import defaultdict # This class represents a directed graph using adjacency # list representation masterviz = [] class Graph: # Constructor def __init__(self): # default dictionary to store graph self.graph = defau...
Traceback (most recent call last): File "/tmp/tmpv9q01v7k/tmpg91a5cds.py", line 70, in <module> n, m = map(int,input().split()) ^^^^^^^ EOFError: EOF when reading a line
s664842288
p02536
u020842472
1601168943
Python
Python (3.8.2)
py
Runtime Error
771
488208
384
import sys sys.setrecursionlimit(int(2e6)) def dfs(u, p = 0): for v in g[u]: if v != p: dfs(v, u) g[u] = None n, m = map(int, input().split()) g = [list() for i in range(n + 1)] for i in range(m): u, v = map(int, input().split()) g[u].append(v) g[v].append(u) c = 0 for i in range(1, n + 1): if g...
Traceback (most recent call last): File "/tmp/tmptr_e2_gb/tmp2ezyittt.py", line 10, in <module> n, m = map(int, input().split()) ^^^^^^^ EOFError: EOF when reading a line
s508794015
p02536
u693666240
1601168931
Python
PyPy3 (7.3.0)
py
Runtime Error
339
108788
551
mod = 10**9 + 7 def go(v): used[v] = True for i in range(len(g[v])): if not used[g[v][i]]: go(g[v][i]) def solve(): n, m = map(int, input().split()) ans = 0 global g, used g = [[] for i in range(n + 1)] used = [False for i in range(n + 1)] for i in range(m): x...
Traceback (most recent call last): File "/tmp/tmplfq9fqq9/tmp7mf_hllv.py", line 24, in <module> solve() File "/tmp/tmplfq9fqq9/tmp7mf_hllv.py", line 8, in solve n, m = map(int, input().split()) ^^^^^^^ EOFError: EOF when reading a line
s203185490
p02536
u087295942
1601168923
Python
PyPy3 (7.3.0)
py
Runtime Error
378
90668
1320
# coding:UTF-8 import sys from math import factorial MOD = 10 ** 9 + 7 INF = float('inf') # ユニオンファインド木 class UnionFind: def __init__(self, n): self.n = n self.parents = [-1] * n self.rank = [0] * n def find(self, x): if self.parents[x] < 0: return x else: ...
Traceback (most recent call last): File "/tmp/tmpy3pje0wj/tmpd7fpfijk.py", line 43, in <module> N, M = list(map(int, input().split())) # スペース区切り連続数字 ^^^^^^^ EOFError: EOF when reading a line
s963860224
p02536
u922487073
1601168910
Python
Python (3.8.2)
py
Runtime Error
213
12924
1299
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/tmpchh72yb7/tmppf6fs_gw.py", line 48, in <module> N,M =map(int, input().split()) ^^^^^^^ EOFError: EOF when reading a line
s931660957
p02536
u785989355
1601168890
Python
Python (3.8.2)
py
Runtime Error
36
9664
8327
header_code = """ #include "/opt/atcoder-stl/atcoder/internal_bit.hpp" #include "/opt/atcoder-stl/atcoder/lazysegtree.hpp" #include "/opt/atcoder-stl/atcoder/modint.hpp" #include <vector> #include <algorithm> #include <cassert> namespace aclython { template <class S, S (*op)(S, S), S (*e)()> struct segtree { public...
Traceback (most recent call last): File "/tmp/tmptaelmhlt/tmp59379txt.py", line 296, in <module> from atcoder import Dsu,ReadInt ModuleNotFoundError: No module named 'atcoder'
s867912291
p02536
u391819434
1601168867
Python
Python (3.8.2)
py
Runtime Error
315
28016
1304
N,M=map(int,input().split()) ab=[list(map(int,input().split()))for _ in range(M)] 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.pare...
Traceback (most recent call last): File "/tmp/tmp5ryxq61u/tmpazwwq07n.py", line 1, in <module> N,M=map(int,input().split()) ^^^^^^^ EOFError: EOF when reading a line
s593505681
p02536
u945761460
1601168863
Python
Python (3.8.2)
py
Runtime Error
204
12772
1289
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/tmp1dzl4cw8/tmpgmtjvrbz.py", line 48, in <module> n,m=map(int,input().split()) ^^^^^^^ EOFError: EOF when reading a line
s502347346
p02536
u615285493
1601168860
Python
PyPy3 (7.3.0)
py
Runtime Error
850
661416
2431
import os import sys from io import BytesIO, IOBase def main(): sys.setrecursionlimit(10**6) n, m = getints() g = [-1] * n def find(u): if g[u] < 0: return u else: g[u] = find(u) return g[u] def merge(u, v): u = find(u) v = find(...
Traceback (most recent call last): File "/tmp/tmpm19wocz9/tmptla3swms.py", line 96, in <module> main() File "/tmp/tmpm19wocz9/tmptla3swms.py", line 9, in main n, m = getints() ^^^^ ValueError: not enough values to unpack (expected 2, got 0)
s937462234
p02536
u457460736
1601168841
Python
Python (3.8.2)
py
Runtime Error
221
15920
1556
import math import collections import itertools import copy def YesNo(Bool): if(Bool): print("YES") else: print("NO") return class UnionFind(): def __init__(self, n): self.n = n self.parents = [-1] * n def find(self, x): if self.parents[x] < 0: ...
Traceback (most recent call last): File "/tmp/tmptl_qo7ti/tmpr0jgk4c1.py", line 75, in <module> resolve() File "/tmp/tmptl_qo7ti/tmpr0jgk4c1.py", line 62, in resolve N,M=map(int,input().split()) ^^^^^^^ EOFError: EOF when reading a line
s489873157
p02536
u020842472
1601168804
Python
Python (3.8.2)
py
Runtime Error
790
488520
385
import sys sys.setrecursionlimit(int(1e6)) def dfs(u, p = 0): for v in g[u]: if v != p: dfs(v, u) g[u] = None n, m = map(int, input().split()) g = [list() for i in range(n + 1)] for i in range(m): u, v = map(int, input().split()) g[u].append(v) g[v].append(u) c = 0 for i in range(1, n + 1): if ...
Traceback (most recent call last): File "/tmp/tmpf3p6yxlz/tmpm4witjf6.py", line 11, in <module> n, m = map(int, input().split()) ^^^^^^^ EOFError: EOF when reading a line
s449197204
p02536
u470560351
1601168792
Python
Python (3.8.2)
py
Runtime Error
198
13080
1306
N, M = map(int, input().split()) 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] d...
Traceback (most recent call last): File "/tmp/tmpic92h3vq/tmpvd_s2qyj.py", line 1, in <module> N, M = map(int, input().split()) ^^^^^^^ EOFError: EOF when reading a line
s674552024
p02536
u627530854
1601168786
Python
Python (3.8.2)
py
Runtime Error
295
26784
475
def visit(graph, node, used): used[node] = True for next in graph[node]: if not used[next]: visit(graph, next, used) nodes, edges = map(int, input().split()) graph = [[] for _ in range(nodes)] for _ in range(edges): a, b = map(int, input().split()) graph[a - 1].append(b - 1) graph[b - 1].append(a...
Traceback (most recent call last): File "/tmp/tmpv9ewvxoq/tmpzhhz21ua.py", line 8, in <module> nodes, edges = map(int, input().split()) ^^^^^^^ EOFError: EOF when reading a line
s119467841
p02536
u407160848
1601168786
Python
PyPy3 (7.3.0)
py
Runtime Error
272
102012
1849
import math from functools import reduce from collections import deque import sys sys.setrecursionlimit(10**7) def input(): return sys.stdin.readline().strip() # スペース区切りの入力を読み込んで数値リストにして返します。 def get_nums_l(): return [ int(s) for s in input().split(" ")] # 改行またはスペース区切りの入力をすべて読み込んでイテレータを返します。 def get_all_int(...
Traceback (most recent call last): File "/tmp/tmpuvpjc68_/tmpfze4tp89.py", line 74, in <module> main() File "/tmp/tmpuvpjc68_/tmpfze4tp89.py", line 62, in main n,m = get_nums_l() ^^^^^^^^^^^^ File "/tmp/tmpuvpjc68_/tmpfze4tp89.py", line 12, in get_nums_l return [ int(s) for s in input().spli...
s108456635
p02536
u615285493
1601168779
Python
PyPy3 (7.3.0)
py
Runtime Error
188
74652
2398
import os import sys from io import BytesIO, IOBase def main(): n, m = getints() g = [-1] * n def find(u): if g[u] < 0: return u else: g[u] = find(u) return g[u] def merge(u, v): u = find(u) v = find(v) if u != v: ...
Traceback (most recent call last): File "/tmp/tmpf4wk8lxi/tmph__qm33t.py", line 95, in <module> main() File "/tmp/tmpf4wk8lxi/tmph__qm33t.py", line 8, in main n, m = getints() ^^^^ ValueError: not enough values to unpack (expected 2, got 0)
s914857390
p02536
u325282913
1601168763
Python
PyPy3 (7.3.0)
py
Runtime Error
181
71944
1381
# https://note.nkmk.me/python-union-find/ 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]...
Traceback (most recent call last): File "/tmp/tmpe1biwdim/tmpzozd4_mx.py", line 38, in <module> N, M = map(int, input().split()) ^^^^^^^ EOFError: EOF when reading a line
s736586883
p02536
u152417130
1601168756
Python
PyPy3 (7.3.0)
py
Runtime Error
203
71184
605
import sys input = sys.stdin.readline class UnionFind: def __init__(self, n): self.parent = list(range(n)) def find(self, a): acopy = a while a != self.parent[a]: a = self.parent[a] while acopy != a: self.parent[acopy], acopy = a, self.parent[acopy] ...
Traceback (most recent call last): File "/tmp/tmpm66vghg0/tmpyo0c40_u.py", line 19, in <module> n, m = map(int, input().split()) ^^^^ ValueError: not enough values to unpack (expected 2, got 0)
s202189566
p02536
u509739538
1601168752
Python
Python (3.8.2)
py
Runtime Error
227
13380
1372
from collections import defaultdict from collections import deque from collections import Counter import math import itertools def readInt(): return int(input()) def readInts(): return list(map(int, input().split())) def readChar(): return input() def readChars(): return input().split() class UnionFind(): def __...
Traceback (most recent call last): File "/tmp/tmpcicjmae_/tmpbkb2g60i.py", line 63, in <module> n,m = readInts() ^^^^^^^^^^ File "/tmp/tmpcicjmae_/tmpbkb2g60i.py", line 10, in readInts return list(map(int, input().split())) ^^^^^^^ EOFError: EOF when reading a line
s529096877
p02536
u941047297
1601168744
Python
Python (3.8.2)
py
Runtime Error
202
12860
945
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/tmpwfr485cj/tmp227_iso0.py", line 40, in <module> main() File "/tmp/tmpwfr485cj/tmp227_iso0.py", line 32, in main n, m = map(int, input().split()) ^^^^^^^ EOFError: EOF when reading a line
s195882856
p02536
u627530854
1601168734
Python
Python (3.8.2)
py
Runtime Error
25
9004
474
def visit(graph, node, used): used[node] = True for next in graph[node]: if !used[next]: visit(graph, next, used) nodes, edges = map(int, input().split()) graph = [[] for _ in range(nodes)] for _ in range(edges): a, b = map(int, input().split()) graph[a - 1].append(b - 1) graph[b - 1].append(a - ...
File "/tmp/tmpr8bhvfd7/tmpm_d_2h18.py", line 4 if !used[next]: ^ SyntaxError: invalid syntax
s117690585
p02536
u644516473
1601168728
Python
Python (3.8.2)
py
Runtime Error
212
10488
851
N, M = map(int, input().split()) class UnionFind(): def __init__(self, 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...
Traceback (most recent call last): File "/tmp/tmp8b_n8zat/tmp5atl7fzf.py", line 1, in <module> N, M = map(int, input().split()) ^^^^^^^ EOFError: EOF when reading a line
s973026199
p02536
u060793972
1601168723
Python
Python (3.8.2)
py
Runtime Error
29
9156
48
n,m=map(int,input().split()) print(max(n-m-1),0)
Traceback (most recent call last): File "/tmp/tmp0stfav8v/tmpiaoz5f9s.py", line 1, in <module> n,m=map(int,input().split()) ^^^^^^^ EOFError: EOF when reading a line
s156995449
p02536
u073852194
1601168686
Python
PyPy3 (7.3.0)
py
Runtime Error
221
86940
1504
N, M = map(int, input().split()) class DisjointSetUnion(): def __init__(self, n): self.n = n self.par_size = [-1] * n def merge(self, a, b): #assert 0 <= a < self.n #assert 0 <= b < self.n x = self.leader(a) y = self.leader(b) if x == y: return x ...
Traceback (most recent call last): File "/tmp/tmpvcq20_yj/tmpx2r9sfix.py", line 1, in <module> N, M = map(int, input().split()) ^^^^^^^ EOFError: EOF when reading a line
s810186482
p02536
u413165887
1601168680
Python
Python (3.8.2)
py
Runtime Error
290
28080
1317
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/tmpdd214oe1/tmphxr_hdjt.py", line 48, in <module> n, m = map(int, input().split()) ^^^^^^^ EOFError: EOF when reading a line
s658230816
p02536
u678167152
1601168680
Python
PyPy3 (7.3.0)
py
Runtime Error
299
74804
1162
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 = self.find(x) y = self.find(y) if x ==...
Traceback (most recent call last): File "/tmp/tmpzkle26gj/tmpqd2gwnj2.py", line 45, in <module> N, M = map(int, input().split()) ^^^^^^^ EOFError: EOF when reading a line
s685780879
p02536
u367701763
1601168680
Python
PyPy3 (7.3.0)
py
Runtime Error
181
71876
2448
class UnionFind(): def __init__(self, n): self.n = n self.parents = [-1] * n def find(self, x): """ 根を見つける関数を定義(同時にxを直接根にくっつける操作も行う)""" tmp = [] parents = self.parents while parents[x] >= 0: tmp.append(x) x = parents[x] for y in tm...
Traceback (most recent call last): File "/tmp/tmpflplzwi_/tmp_mjo093p.py", line 69, in <module> N, M = map(int, input().split()) ^^^^ ValueError: not enough values to unpack (expected 2, got 0)
s780498615
p02536
u874320250
1601168669
Python
PyPy3 (7.3.0)
py
Runtime Error
229
86560
1356
import sys 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): ...
Traceback (most recent call last): File "/tmp/tmp5cr8e15q/tmp8ek703gi.py", line 51, in <module> N, M = map(int, input().split()) ^^^^ ValueError: not enough values to unpack (expected 2, got 0)
s990749664
p02536
u189023301
1601168663
Python
PyPy3 (7.3.0)
py
Runtime Error
288
74448
762
class UnionFind(): def __init__(self, n): self.n = n self.par = [-1] * n def find(self, x): if self.par[x] < 0: return x else: self.par[x] = self.find(self.par[x]) return self.par[x] def unite(self, x, y): x = self.find(x) ...
Traceback (most recent call last): File "/tmp/tmps88lbmbh/tmpn0mnfhb1.py", line 29, in <module> n, k = map(int, input().split()) ^^^^^^^ EOFError: EOF when reading a line
s115771872
p02536
u540877546
1601168624
Python
PyPy3 (7.3.0)
py
Runtime Error
281
75296
1306
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/tmp94fquv82/tmpcy1vqeem.py", line 49, in <module> n, m = list(map(int, input().split())) ^^^^^^^ EOFError: EOF when reading a line
s011263772
p02537
u437351386
1601574049
Python
PyPy3 (7.3.0)
py
Runtime Error
727
123336
1402
n,k=list(map(int,input().split())) a=[int(input()) for i in range(n)] import sys sys.setrecursionlimit(10**7) #ide_ele:単位元を設定 ide_ele=-float("INF") #segfunc:演算を定義 def segfunc(x,y): return max(x,y) #num:n以上の最小の2のべき乗 #seg:セグメンテーション木 num =2**(n-1).bit_length() seg=[ide_ele]*2*num #init:引数を初期化する def init(init_val): for...
Traceback (most recent call last): File "/tmp/tmp2xuv70q9/tmpexzxcblp.py", line 1, in <module> n,k=list(map(int,input().split())) ^^^^^^^ EOFError: EOF when reading a line
s766921617
p02537
u437351386
1601573971
Python
PyPy3 (7.3.0)
py
Runtime Error
732
123524
1400
n,k=list(map(int,input().split())) a=[int(input()) for i in range(n)] import sys sys.setrecursionlimit(10**7) #ide_ele:単位元を設定 ide_ele=-float("INF") #segfunc:演算を定義 def segfunc(x,y): return max(x,y) #num:n以上の最小の2のべき乗 #seg:セグメンテーション木 num =2**(n-1).bit_length() seg=[ide_ele]*2*num #init:引数を初期化する def init(init_val): for...
Traceback (most recent call last): File "/tmp/tmpi21jtjgh/tmph5126rtz.py", line 1, in <module> n,k=list(map(int,input().split())) ^^^^^^^ EOFError: EOF when reading a line
s155583469
p02537
u437351386
1601573924
Python
PyPy3 (7.3.0)
py
Runtime Error
88
68696
1401
n,k=list(map(int,input().split())) a=[int(input()) for i in range(n)] import sys sys.setrecursionlimit(10**7) #ide_ele:単位元を設定 ide_ele=-float("INF") #segfunc:演算を定義 def segfunc(x,y): return max(x,y) #num:n以上の最小の2のべき乗 #seg:セグメンテーション木 num =2**(n-1).bit_length() seg=[ide_ele]*2*num #init:引数を初期化する def init(init_val): fo...
File "/tmp/tmpgbzki02o/tmps91f_apd.py", line 3 import sys IndentationError: unexpected indent
s384375184
p02537
u437351386
1601573321
Python
PyPy3 (7.3.0)
py
Runtime Error
742
123528
1363
n,k=list(map(int,input().split())) a=[int(input()) for i in range(n)] #ide_ele:単位元を設定 ide_ele=-float("INF") #segfunc:演算を定義 def segfunc(x,y): return max(x,y) #num:n以上の最小の2のべき乗 #seg:セグメンテーション木 num =2**(n-1).bit_length() seg=[ide_ele]*2*num #init:引数を初期化する def init(init_val): for i in range(n): seg[i+num-1]=init_v...
Traceback (most recent call last): File "/tmp/tmppbk0ghs1/tmp7z951bok.py", line 1, in <module> n,k=list(map(int,input().split())) ^^^^^^^ EOFError: EOF when reading a line
s822680005
p02537
u437351386
1601572690
Python
PyPy3 (7.3.0)
py
Runtime Error
2208
110664
1357
n,k=list(map(int,input().split())) a=[int(input()) for i in range(n)] #ide_ele:単位元を設定 ide_ele=-float("INF") #segfunc:演算を定義 def segfunc(x,y): return max(x,y) #num:n以上の最小の2のべき乗 #seg:セグメンテーション木 num =2**(n-1).bit_length() seg=[ide_ele]*2*num #init:引数を初期化する def init(init_val): for i in range(n): seg[i+num-1]=init_v...
Traceback (most recent call last): File "/tmp/tmp3qi1zn0k/tmpqxe6a473.py", line 1, in <module> n,k=list(map(int,input().split())) ^^^^^^^ EOFError: EOF when reading a line
s606649707
p02537
u437351386
1601572025
Python
PyPy3 (7.3.0)
py
Runtime Error
578
112936
1182
n,k=list(map(int,input().split())) a=[int(input()) for i in range(n)] #ide_ele:単位元を設定 ide_ele=-float("INF") #segfunc:演算を定義 def segfunc(x,y): return max(x,y) #num:n以上の最小の2のべき乗 #seg:セグメンテーション木 num =2**(n-1).bit_length() seg=[ide_ele]*2*num #init:引数を初期化する def init(init_val): for i in range(n): seg[i+num-1]=init_v...
Traceback (most recent call last): File "/tmp/tmpgyglb109/tmp_89dn08u.py", line 1, in <module> n,k=list(map(int,input().split())) ^^^^^^^ EOFError: EOF when reading a line
s473700834
p02537
u974792613
1601557022
Python
PyPy3 (7.3.0)
py
Runtime Error
344
92636
2540
# 0-index segment tree class SegmentTree: """ init(init_val, ide_ele): 配列init_valで初期化 O(N) update(k, x): k番目の値をxに更新 O(logN) query(l, r): 区間[l, r)をsegfuncしたものを返す O(logN) """ def __init__(self, init_val, segfunc, ide_ele): """ init_val: 配列の初期値 segfunc: ...
Traceback (most recent call last): File "/tmp/tmp5574tv_j/tmpbyyfhox5.py", line 77, in <module> n, k = map(int, input().split()) ^^^^^^^ EOFError: EOF when reading a line
s117952823
p02537
u413165887
1601532095
Python
PyPy3 (7.3.0)
py
Runtime Error
2212
176700
197
n, k = map(int, input().split()) a = [int(input()) for _i in range(n)] dp = [0]*300000 dp_nex = [0]*300000 for i in range(n): dp[a[i]] = max(dp[max(0,i-k):min(300000, i+k)])+1 print(max(dp))
Traceback (most recent call last): File "/tmp/tmpcn8b_063/tmp5wa24bsq.py", line 1, in <module> n, k = map(int, input().split()) ^^^^^^^ EOFError: EOF when reading a line
s177315188
p02537
u096128910
1601524701
Python
PyPy3 (7.3.0)
py
Runtime Error
521
121652
1682
from sys import stdin read = stdin.read readline = stdin.readline def i_input(): return int(readline().rstrip()) def i_map(): return map(int, readline().rstrip().split()) def i_list(): return list(i_map()) MAX_A = 300000 class SegmentTree: def __init__(self, n:int, p:list, ide_ele, func): self.num = 1 << ...
Traceback (most recent call last): File "/tmp/tmpdqxnw9tb/tmp_h_kr7j8.py", line 60, in <module> main() File "/tmp/tmpdqxnw9tb/tmp_h_kr7j8.py", line 48, in main N, K = i_map() ^^^^ ValueError: not enough values to unpack (expected 2, got 0)
s067149078
p02537
u096128910
1601524663
Python
PyPy3 (7.3.0)
py
Runtime Error
465
121604
1571
from sys import stdin read = stdin.read readline = stdin.readline def i_input(): return int(readline().rstrip()) def i_map(): return map(int, readline().rstrip().split()) def i_list(): return list(i_map()) MAX_A = 300000 class SegTree: def __init__(self, init_val, segfunc, ide_ele): n = len(init_val) ...
Traceback (most recent call last): File "/tmp/tmpma2fq6q0/tmp1b3ape1i.py", line 57, in <module> main() File "/tmp/tmpma2fq6q0/tmp1b3ape1i.py", line 45, in main N, K = i_map() ^^^^ ValueError: not enough values to unpack (expected 2, got 0)
s436177025
p02537
u207850265
1601522449
Python
Python (3.8.2)
py
Runtime Error
2206
33928
1974
def ceil_log2(n): i = 0 while (1 << i) < n: i += 1 return i class SegmentTree: def __init__(self, values, e, op): if type(values) == int: values = [e] * values self._n = len(values) self._ceil_log2_n = ceil_log2(self._n) self._size = 1 << self._ceil...
Traceback (most recent call last): File "/tmp/tmpv2hz61eb/tmprh9rpm2p.py", line 80, in <module> main() File "/tmp/tmpv2hz61eb/tmprh9rpm2p.py", line 66, in main n, k = map(int, input().split()) ^^^^^^^ EOFError: EOF when reading a line
s622933828
p02537
u207850265
1601522075
Python
Python (3.8.2)
py
Runtime Error
495
30004
1971
def ceil_log2(n): i = 0 while (1 << i) < n: i += 1 return i class SegmentTree: def __init__(self, values, e, op): if type(values) == int: values = [e] * values self._n = len(values) self._ceil_log2_n = ceil_log2(self._n) self._size = 1 << self._ceil...
Traceback (most recent call last): File "/tmp/tmp8nc7b8g6/tmp731j7t0m.py", line 80, in <module> main() File "/tmp/tmp8nc7b8g6/tmp731j7t0m.py", line 66, in main n, k = map(int, input().split()) ^^^^^^^ EOFError: EOF when reading a line
s745363178
p02537
u988402778
1601519939
Python
PyPy3 (7.3.0)
py
Runtime Error
540
132944
24342
def main(sample_file = ''): """ convenient functions # for i, a in enumerate(iterable) # q, mod = divmod(a, b) # divmod(x, y) returns the tuple (x//y, x%y) # Higher-order function: reduce(operator.mul, xyz_count, 1) # manage median(s) using two heapq https://atcoder.jp/contests/abc127/tasks/abc...
Traceback (most recent call last): File "/tmp/tmpx0p560q1/tmpeh8hqdj3.py", line 665, in <module> main() File "/tmp/tmpx0p560q1/tmpeh8hqdj3.py", line 157, in main from fractions import gcd ImportError: cannot import name 'gcd' from 'fractions' (/root/miniconda3/envs/sandbox-runtime/lib/python3.11/fractions.p...
s573288258
p02537
u988402778
1601519830
Python
PyPy3 (7.3.0)
py
Runtime Error
551
133152
24342
def main(sample_file = ''): """ convenient functions # for i, a in enumerate(iterable) # q, mod = divmod(a, b) # divmod(x, y) returns the tuple (x//y, x%y) # Higher-order function: reduce(operator.mul, xyz_count, 1) # manage median(s) using two heapq https://atcoder.jp/contests/abc127/tasks/abc...
Traceback (most recent call last): File "/tmp/tmplkljxkeq/tmpov01d2zm.py", line 666, in <module> main() File "/tmp/tmplkljxkeq/tmpov01d2zm.py", line 157, in main from fractions import gcd ImportError: cannot import name 'gcd' from 'fractions' (/root/miniconda3/envs/sandbox-runtime/lib/python3.11/fractions.p...
s631311730
p02537
u726872801
1601479903
Python
PyPy3 (7.3.0)
py
Runtime Error
91
68768
1547
import sys import heapq, math from itertools import zip_longest, permutations, combinations, combinations_with_replacement from itertools import accumulate, dropwhile, takewhile, groupby from functools import lru_cache from copy import deepcopy import numpy as np class SegmentTree: def __init__(self, n, fn=lambda...
Traceback (most recent call last): File "/tmp/tmpo4u3mi4p/tmpfjv4amro.py", line 46, in <module> N, K = map(int, input().split()) ^^^^^^^ EOFError: EOF when reading a line
s609794856
p02537
u350093546
1601477503
Python
PyPy3 (7.3.0)
py
Runtime Error
560
136192
1191
import sys input=sys.stdin.readline n,k=map(int,input().split()) a=[int(input()) for i in range(n)] def segfunc(x, y): return max(x,y) def init(init_val): # set_val for i in range(n): seg[i+num-1] = init_val[i] # built for i in range(num-2, -1, -1): seg[i] = segfunc(seg[2*i+1], s...
Traceback (most recent call last): File "/tmp/tmpjyumazjm/tmp2ysj_yl4.py", line 4, in <module> n,k=map(int,input().split()) ^^^ ValueError: not enough values to unpack (expected 2, got 0)
s095333868
p02537
u350093546
1601477443
Python
PyPy3 (7.3.0)
py
Runtime Error
501
123448
1169
import sys input=sys.stdin.readline n,k=map(int,input().split()) a=[int(input()) for i in range(n)] def segfunc(x, y): return max(x,y) def init(init_val): # set_val for i in range(n): seg[i+num-1] = init_val[i] # built for i in range(num-2, -1, -1): seg[i] = segfunc(seg[2*i+1], s...
Traceback (most recent call last): File "/tmp/tmpoq4yynkt/tmp36pcp29z.py", line 4, in <module> n,k=map(int,input().split()) ^^^ ValueError: not enough values to unpack (expected 2, got 0)
s619941594
p02537
u729972685
1601463251
Python
PyPy3 (7.3.0)
py
Runtime Error
1046
171268
2409
from sys import stdin input = stdin.readline class LazySegmentTree(): def __init__(self, n, init, merge_func=min, ide_ele=10 ** 18): self.n = (n - 1).bit_length() self.merge_func = merge_func self.ide_ele = ide_ele self.data = [0 for i in range(1 << (self.n + 1))] self.lazy =...
Traceback (most recent call last): File "/tmp/tmpi15favox/tmp26n_txt5.py", line 80, in <module> solve() File "/tmp/tmpi15favox/tmp26n_txt5.py", line 65, in solve n,k = map(int,input().split()) ^^^ ValueError: not enough values to unpack (expected 2, got 0)
s818904085
p02537
u653041271
1601443790
Python
PyPy3 (7.3.0)
py
Runtime Error
96
69116
2895
import sys, bisect, math, itertools, string, queue, copy import numpy as np import scipy from collections import Counter,defaultdict,deque from itertools import permutations, combinations from heapq import heappop, heappush # input = sys.stdin.readline sys.setrecursionlimit(10**8) mod = 10**9+7 def inp(): return int(in...
Traceback (most recent call last): File "/tmp/tmp73qevxun/tmpd60o57uy.py", line 89, in <module> n,k = inpm() ^^^^^^ File "/tmp/tmp73qevxun/tmpd60o57uy.py", line 11, in inpm def inpm(): return map(int,input().split()) ^^^^^^^ EOFError: EOF when reading a line
s458468681
p02537
u653041271
1601443536
Python
Python (3.8.2)
py
Runtime Error
2207
53672
2890
import sys, bisect, math, itertools, string, queue, copy import numpy as np import scipy from collections import Counter,defaultdict,deque from itertools import permutations, combinations from heapq import heappop, heappush # input = sys.stdin.readline sys.setrecursionlimit(10**8) mod = 10**9+7 def inp(): return int(in...
Traceback (most recent call last): File "/tmp/tmpiu7xifef/tmpnls9zf8m.py", line 89, in <module> n,k = inpm() ^^^^^^ File "/tmp/tmpiu7xifef/tmpnls9zf8m.py", line 11, in inpm def inpm(): return map(int,input().split()) ^^^^^^^ EOFError: EOF when reading a line
s274069505
p02537
u375616706
1601437897
Python
PyPy3 (7.3.0)
py
Runtime Error
355
93100
3348
class SegmentTree(): ''' 非再帰 segment tree ''' def __init__(self, n, func, init=float('inf')): ''' n->配列の長さ func:func(a,b)->val, func=minだとRMQになる 木の高さhとすると, n:h-1までのノード数。h段目のノードにアクセスするために使う。 data:ノード。data[0]:root<-leaf:data[-1] parent:k->child ...
Traceback (most recent call last): File "/tmp/tmpg7pjohg5/tmpttptd3y9.py", line 98, in <module> N,K = map(int,input().split()) ^^^^^^^ EOFError: EOF when reading a line
s937385196
p02537
u326609687
1601437202
Python
Python (3.8.2)
py
Runtime Error
571
116800
2044
import sys if sys.argv[-1] == 'ONLINE_JUDGE': import os import re with open(__file__) as f: source = f.read().split('###''nbacl') for s in source[1:]: s = re.sub("'''.*", '', s) sp = s.split(maxsplit=1) if os.path.dirname(sp[0]): os.makedirs(os.path.dirname(sp...
Traceback (most recent call last): File "/tmp/tmpq9vrjpg9/tmpgfuhl5gy.py", line 18, in <module> import nbacl.segtree as seg ModuleNotFoundError: No module named 'nbacl'
s812411063
p02537
u364693468
1601422323
Python
PyPy3 (7.3.0)
py
Runtime Error
542
87888
2537
import bisect, collections, copy, heapq, itertools, math, string import sys def I(): return int(sys.stdin.readline().rstrip()) def MI(): return map(int, sys.stdin.readline().rstrip().split()) def LI(): return list(map(int, sys.stdin.readline().rstrip().split())) def S(): return sys.stdin.readline().rstrip() def LS(): r...
Traceback (most recent call last): File "/tmp/tmplwmq9bkj/tmpspaptb_7.py", line 84, in <module> main() File "/tmp/tmplwmq9bkj/tmpspaptb_7.py", line 75, in main N, K = MI() ^^^^ ValueError: not enough values to unpack (expected 2, got 0)
s345000374
p02537
u311379832
1601362767
Python
PyPy3 (7.3.0)
py
Runtime Error
771
119672
1456
def segfunc(x, y): return max(x, y) class SegmentTree: def __init__(self, arr): size = len(arr) n = 2 ** (size - 1).bit_length() self.n = n self.node = [0] * (2*n) for i in range(size): self.node[i+n-1] = arr[i] for i in reversed(range(n-2)): ...
Traceback (most recent call last): File "/tmp/tmpiqh3z1hp/tmpmevfqyur.py", line 47, in <module> N, K = map(int, input().split()) ^^^^^^^ EOFError: EOF when reading a line
s773158648
p02537
u311379832
1601362739
Python
PyPy3 (7.3.0)
py
Runtime Error
802
120136
1461
def segfunc(x, y): return max(x, y) class SegmentTree: def __init__(self, arr): size = len(arr) n = 2 ** (size - 1).bit_length() self.n = n self.node = [0] * (2*n) for i in range(size): self.node[i+n-1] = arr[i] for i in reversed(range(n-2)): ...
Traceback (most recent call last): File "/tmp/tmpszpadizc/tmpy4px5w_f.py", line 47, in <module> N, K = map(int, input().split()) ^^^^^^^ EOFError: EOF when reading a line
s388630820
p02537
u311379832
1601362699
Python
PyPy3 (7.3.0)
py
Runtime Error
806
119668
1466
def segfunc(x, y): return max(x, y) class SegmentTree: def __init__(self, arr): size = len(arr) n = 2 ** (size - 1).bit_length() self.n = n self.node = [0] * (2*n) for i in range(size): self.node[i+n-1] = arr[i] for i in reversed(range(n-2)): ...
Traceback (most recent call last): File "/tmp/tmpv7pky5n4/tmp1c0fd1qw.py", line 47, in <module> N, K = map(int, input().split()) ^^^^^^^ EOFError: EOF when reading a line
s233551563
p02537
u311379832
1601362201
Python
PyPy3 (7.3.0)
py
Runtime Error
90
71504
1470
def segfunc(x, y): return min(x, y) class SegmentTree: def __init__(self, arr): size = len(arr) n = 2 ** (size - 1).bit_length() self.n = n self.node = [INF] * (2*n) for i in range(size): self.node[i+n-1] = arr[i] for i in reversed(range(n-2)): ...
Traceback (most recent call last): File "/tmp/tmp8o1gz50e/tmp172fdfmo.py", line 47, in <module> N, K = map(int, input().split()) ^^^^^^^ EOFError: EOF when reading a line
s070231766
p02537
u311379832
1601360377
Python
PyPy3 (7.3.0)
py
Runtime Error
93
69220
1002
def segfunc(x, y): return max(x, y) def init(arr): global node size = len(arr) n = 2 ** (size - 1).bit_length() node = [0] * 2 * n for i in range(size): node[i + n - 1] = arr[i] for i in reversed(range(n - 2)): node[i] = segfunc(node[i*2+1], node[i*2+2]) def update(i, x): i...
Traceback (most recent call last): File "/tmp/tmpc8a1nuk0/tmpwambk3nq.py", line 35, in <module> N, K = map(int, input().split()) ^^^^^^^ EOFError: EOF when reading a line
s093147043
p02537
u311379832
1601359838
Python
PyPy3 (7.3.0)
py
Runtime Error
674
103760
846
def segfunc(x, y): return max(x, y) def init(tmpn): global noden n = 1 while tmpn > n: n *= 2 noden = n def update(i, x): i += noden-1 node[i] = x while i: i = (i-1)//2 node[i] = segfunc(node[i*2+1], node[i*2+2]) def query(l, r): L = l + noden R = r + noden...
Traceback (most recent call last): File "/tmp/tmp5y92qba7/tmpddbtjndb.py", line 32, in <module> N, K = map(int, input().split()) ^^^^^^^ EOFError: EOF when reading a line
s932270384
p02537
u311379832
1601359694
Python
PyPy3 (7.3.0)
py
Runtime Error
346
93484
775
def segfunc(x, y): return max(x, y) def update(i, x): i += MAX_N - 1 node[i] = x while i: i = (i-1)//2 node[i] = segfunc(node[i*2], node[i*2+1]) def query(l, r): L = l + MAX_N R = r + MAX_N s = INF while L < R: if R & 1: R -= 1 s = segfunc(s,...
Traceback (most recent call last): File "/tmp/tmpgq9c23yg/tmpyewmdwp6.py", line 25, in <module> N, K = map(int, input().split()) ^^^^^^^ EOFError: EOF when reading a line
s633734911
p02537
u311379832
1601359620
Python
PyPy3 (7.3.0)
py
Runtime Error
349
93748
777
def segfunc(x, y): return max(x, y) def update(i, x): i += MAX_N - 1 node[i] = x while i: i = (i-1)//2 node[i] = segfunc(node[i*2+1], node[i*2+2]) def query(l, r): L = l + MAX_N R = r + MAX_N s = INF while L < R: if R & 1: R -= 1 s = segfunc(...
Traceback (most recent call last): File "/tmp/tmp_x9w204d/tmp2ogwg9ni.py", line 25, in <module> N, K = map(int, input().split()) ^^^^^^^ EOFError: EOF when reading a line
s191638845
p02537
u311379832
1601359534
Python
PyPy3 (7.3.0)
py
Runtime Error
359
93520
737
def segfunc(x, y): return max(x, y) def update(i, x): i += MAX_N - 1 node[i] = x while i: i = (i-1)//2 node[i] = segfunc(node[i*2+1], node[i*2+2]) def query(l, r): L = l + MAX_N R = r + MAX_N s = INF while L < R: if R & 1: R -= 1 s = segfunc(...
Traceback (most recent call last): File "/tmp/tmpytrd7uf9/tmplaph0jbe.py", line 25, in <module> N, K = map(int, input().split()) ^^^^^^^ EOFError: EOF when reading a line
s623220652
p02537
u311379832
1601359191
Python
PyPy3 (7.3.0)
py
Runtime Error
757
140136
737
def segfunc(x, y): return max(x, y) def update(i, x): i += MAX_N - 1 node[i] = x while i: i = (i-1)//2 node[i] = segfunc(node[i*2+1], node[i*2+2]) def query(l, r): L = l + MAX_N R = r + MAX_N s = INF while L < R: if R & 1: R -= 1 s = segfunc(...
Traceback (most recent call last): File "/tmp/tmpk6mlu4mi/tmpct30wccm.py", line 25, in <module> N, K = map(int, input().split()) ^^^^^^^ EOFError: EOF when reading a line
s426591807
p02537
u311379832
1601359040
Python
PyPy3 (7.3.0)
py
Runtime Error
743
140104
753
def segfunc(x, y): return max(x, y) def update(i, x): i += noden-1 node[i] = x while i: i = (i-1)//2 node[i] = segfunc(node[i*2+1], node[i*2+2]) def query(l, r): L = l + noden R = r + noden s = INF while L < R: if R & 1: R -= 1 s = segfunc(s,...
Traceback (most recent call last): File "/tmp/tmpf4pem4jh/tmp056nph_n.py", line 25, in <module> N, K = map(int, input().split()) ^^^^^^^ EOFError: EOF when reading a line
s682786337
p02537
u311379832
1601358926
Python
PyPy3 (7.3.0)
py
Runtime Error
637
118616
737
def segfunc(x, y): return max(x, y) def update(i, x): i += MAX_N-1 node[i] = x while i: i >>= 1 node[i] = segfunc(node[i << 1], node[(i << 1) + 1]) def query(l, r): L = l + MAX_N R = r + MAX_N s = INF while L < R: if R & 1: R -= 1 s = segfun...
Traceback (most recent call last): File "/tmp/tmpdjm1y040/tmp_se50tgf.py", line 26, in <module> N, K = map(int, input().split()) ^^^^^^^ EOFError: EOF when reading a line
s392543018
p02537
u311379832
1601358749
Python
PyPy3 (7.3.0)
py
Runtime Error
346
93468
831
def segfunc(x, y): return max(x, y) def init(tmpn): global noden n = 1 while tmpn > n: n *= 2 noden = n def update(i, x): i += noden-1 node[i] = x while i: i >>= 1 node[i] = segfunc(node[i << 1], node[(i << 1) + 1]) def query(l, r): L = l + noden R = r + no...
Traceback (most recent call last): File "/tmp/tmp90ds_yoo/tmphskrrg6k.py", line 32, in <module> N, K = map(int, input().split()) ^^^^^^^ EOFError: EOF when reading a line
s075521839
p02537
u311379832
1601358292
Python
PyPy3 (7.3.0)
py
Runtime Error
555
103340
847
def segfunc(x, y): return max(x, y) def init(tmpn): global noden n = 1 while tmpn > n: n *= 2 noden = n def update(i, x): i += noden-1 node[i] = x while i: i >>= 1 node[i] = segfunc(node[i << 1], node[(i << 1) + 1]) def query(l, r): L = l + noden R = r + no...
Traceback (most recent call last): File "/tmp/tmpkul5jw1l/tmpm7a9tnka.py", line 32, in <module> N, K = map(int, input().split()) ^^^^^^^ EOFError: EOF when reading a line
s530207059
p02537
u311379832
1601358029
Python
PyPy3 (7.3.0)
py
Runtime Error
559
102756
844
def segfunc(x, y): return max(x, y) def init(tmpn): global noden n = 1 while tmpn > n: n *= 2 noden = n def update(i, x): i += noden-1 node[i] = x while i: i = (i-1)//2 node[i] = segfunc(node[i*2 + 1], node[i*2 + 2]) def query(l, r): L = l + noden R = r + n...
Traceback (most recent call last): File "/tmp/tmpc37490eq/tmpz__45obl.py", line 32, in <module> N, K = map(int, input().split()) ^^^^^^^ EOFError: EOF when reading a line
s449017075
p02537
u311379832
1601357327
Python
PyPy3 (7.3.0)
py
Runtime Error
533
99692
844
def segfunc(x, y): return max(x, y) def init(tmpn): global noden n = 1 while tmpn > n: n *= 2 noden = n def update(i, x): i += noden-1 node[i] = x while i: i = (i-1)//2 node[i] = segfunc(node[i*2 + 1], node[i*2 + 2]) def query(l, r): L = l + noden R = r + n...
Traceback (most recent call last): File "/tmp/tmpc5qj2ijh/tmpamgsufo8.py", line 32, in <module> N, K = map(int, input().split()) ^^^^^^^ EOFError: EOF when reading a line
s109328678
p02537
u311379832
1601357128
Python
PyPy3 (7.3.0)
py
Runtime Error
578
102884
848
def segfunc(x, y): return max(x, y) def init(tmpn): global noden n = 1 while tmpn > n: n *= 2 noden = n def update(i, x): i += noden-1 node[i] = x while i: i = (i-1)//2 node[i] = segfunc(node[i*2 + 1], node[i*2 + 2]) def query(l, r): L = l + noden R = r + n...
Traceback (most recent call last): File "/tmp/tmp5gg66vcq/tmp5tv6hvpb.py", line 32, in <module> N, K = map(int, input().split()) ^^^^^^^ EOFError: EOF when reading a line
s074565135
p02537
u311379832
1601354667
Python
PyPy3 (7.3.0)
py
Runtime Error
687
103416
845
def segfunc(x, y): return max(x, y) def init(tmpn): global noden n = 1 while tmpn > n: n *= 2 noden = n def update(i, x): i += noden-1 node[i] = x while i: i = (i-1)//2 node[i] = segfunc(node[i*2+1], node[i*2+2]) def query(l, r): L = l + noden R = r + noden...
Traceback (most recent call last): File "/tmp/tmpvjdiju23/tmp_a04948n.py", line 32, in <module> N, K = map(int, input().split()) ^^^^^^^ EOFError: EOF when reading a line
s118379997
p02537
u311379832
1601354418
Python
PyPy3 (7.3.0)
py
Runtime Error
679
103556
849
def segfunc(x, y): return max(x, y) def init(tmpn): global noden n = 1 while tmpn > n: n *= 2 noden = n def update(i, x): i += noden-1 node[i] = x while i: i = (i-1)//2 node[i] = segfunc(node[i*2+1], node[i*2+2]) def query(l, r): L = l + noden R = r + noden...
Traceback (most recent call last): File "/tmp/tmpr4stsqed/tmp43bdfnoo.py", line 32, in <module> N, K = map(int, input().split()) ^^^^^^^ EOFError: EOF when reading a line
s320811833
p02537
u311379832
1601354408
Python
Python (3.8.2)
py
Runtime Error
2206
32384
849
def segfunc(x, y): return max(x, y) def init(tmpn): global noden n = 1 while tmpn > n: n *= 2 noden = n def update(i, x): i += noden-1 node[i] = x while i: i = (i-1)//2 node[i] = segfunc(node[i*2+1], node[i*2+2]) def query(l, r): L = l + noden R = r + noden...
Traceback (most recent call last): File "/tmp/tmp3dqqvkm4/tmp9u9783jw.py", line 32, in <module> N, K = map(int, input().split()) ^^^^^^^ EOFError: EOF when reading a line
s647296092
p02537
u781262926
1601345284
Python
Python (3.8.2)
py
Runtime Error
369
43796
2271
import typing def _ceil_pow2(n: int) -> int: x = 0 while (1 << x) < n: x += 1 return x def _bsf(n: int) -> int: x = 0 while n % 2 == 0: x += 1 n //= 2 return x class SegTree: def __init__(self, op: typing.Callable[[typing.Any, typing.Any], typing.A...
Traceback (most recent call last): File "/tmp/tmp5mrwf89a/tmpk7v9hdbr.py", line 83, in <module> n, k, *A = map(int, open(0).read().split()) ^^^^^^^^ ValueError: not enough values to unpack (expected at least 2, got 0)
s035045067
p02537
u781262926
1601344741
Python
Python (3.8.2)
py
Runtime Error
109
43648
2302
import typing def _ceil_pow2(n: int) -> int: x = 0 while (1 << x) < n: x += 1 return x def _bsf(n: int) -> int: x = 0 while n % 2 == 0: x += 1 n //= 2 return x class SegTree: def __init__(self, op: typing.Callable[[typing.Any, typing.Any], typing.A...
Traceback (most recent call last): File "/tmp/tmp4fhw30em/tmpe7p6satw.py", line 83, in <module> n, k, *A = map(int, open(0).read().split()) ^^^^^^^^ ValueError: not enough values to unpack (expected at least 2, got 0)
s529912981
p02537
u869790980
1601335662
Python
PyPy2 (7.3.0)
py
Runtime Error
393
84652
222
n,k = map(int , raw_input().split()) ais = [int(raw_input()) for _ in range(n)] h = [0 for oo in range(300001)] for ai in ais: h[ai] = 1 + max([h[v] if 0<=v<len(h) for v in range(ai-k, ai + k +1)] or [0]) print max(h)
File "/tmp/tmp53c5vmz4/tmpet3_py9b.py", line 5 h[ai] = 1 + max([h[v] if 0<=v<len(h) for v in range(ai-k, ai + k +1)] or [0]) ^^^^^^^^^^^^^^^^^^^ SyntaxError: expected 'else' after 'if' expression
s475065414
p02537
u869790980
1601335610
Python
PyPy2 (7.3.0)
py
Runtime Error
489
109772
200
n,k = map(int , raw_input().split()) ais = [int(raw_input()) for _ in range(n)] h = [0 for oo in range(300001)] for ai in ais: h[ai] = 1 + max([h[v] for v in range(ai-k, ai + k +1)]) print max(h)
File "/tmp/tmpqcnk1trh/tmpp1sa3b62.py", line 6 print max(h) ^^^^^^^^^^^^ SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
s299469414
p02537
u525065967
1601331135
Python
PyPy3 (7.3.0)
py
Runtime Error
2207
74376
283
n, k = map(int, input().split()) ans = 0 dp = [0] * 3*10**5 for i in range(n): ai = int(input()) longest = 0 for aj in range(max(0, ai-k), min(ai+k+1, n)): longest = max(longest, dp[aj]) dp[ai] = max(dp[ai], longest + 1) ans = max(ans, dp[ai]) print(ans)
Traceback (most recent call last): File "/tmp/tmpb0sgdqge/tmpjyesrlsf.py", line 1, in <module> n, k = map(int, input().split()) ^^^^^^^ EOFError: EOF when reading a line
s442332741
p02537
u346308892
1601303010
Python
PyPy3 (7.3.0)
py
Runtime Error
351
93476
1383
class SegmentTree: # 初期化処理 # f : SegmentTreeにのせるモノイド # default : fに対する単位元 def __init__(self, size, f=lambda x, y: x+y, default=0): self.size = 2**(size-1).bit_length() # 簡単のため要素数Nを2冪にする self.default = default self.dat = [default]*(self.size*2) # 要素を単位元で初期化 self.f = f ...
Traceback (most recent call last): File "/tmp/tmpl31n0fnx/tmpzken7y4p.py", line 39, in <module> N, K = map(int, input().split()) ^^^^^^^ EOFError: EOF when reading a line
s010744112
p02537
u346308892
1601302873
Python
PyPy3 (7.3.0)
py
Runtime Error
353
93564
1509
import sys def acinput(): return list(map(int, input().split(" "))) class SegmentTree: # 初期化処理 # f : SegmentTreeにのせるモノイド # default : fに対する単位元 def __init__(self, size, f=lambda x, y: x+y, default=0): self.size = 2**(size-1).bit_length() # 簡単のため要素数Nを2冪にする self.default = default ...
Traceback (most recent call last): File "/tmp/tmpuwswz87n/tmp_n5_8ec3.py", line 48, in <module> N, K = acinput() ^^^^^^^^^ File "/tmp/tmpuwswz87n/tmp_n5_8ec3.py", line 45, in acinput return list(map(int, input()[:-1].split(" "))) ^^^^^^^ EOFError: EOF when reading a line
s688267754
p02537
u346308892
1601302791
Python
PyPy3 (7.3.0)
py
Runtime Error
263
83484
1542
import sys input = sys.stdin.readline def acinput(): return list(map(int, input()[:-1].split(" "))) class SegmentTree: # 初期化処理 # f : SegmentTreeにのせるモノイド # default : fに対する単位元 def __init__(self, size, f=lambda x, y: x+y, default=0): self.size = 2**(size-1).bit_length() # 簡単のため要素数Nを2冪にする ...
Traceback (most recent call last): File "/tmp/tmpcgmjr2ss/tmpsqk441_e.py", line 50, in <module> N, K = acinput() ^^^^^^^^^ File "/tmp/tmpcgmjr2ss/tmpsqk441_e.py", line 47, in acinput return list(map(int, input()[:-1].split(" "))) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ValueError: inva...
s015383705
p02537
u346308892
1601302636
Python
Python (3.8.2)
py
Runtime Error
111
21484
1540
import sys input = sys.stdin.readline def acinput(): return list(map(int, input()[:-1].split(" "))) class SegmentTree: # 初期化処理 # f : SegmentTreeにのせるモノイド # default : fに対する単位元 def __init__(self, size, f=lambda x, y: x+y, default=0): self.size = 2**(size-1).bit_length() # 簡単のため要素数Nを2冪にする ...
Traceback (most recent call last): File "/tmp/tmpf1th_z_w/tmpl9jvgv_r.py", line 50, in <module> N, K = acinput() ^^^^^^^^^ File "/tmp/tmpf1th_z_w/tmpl9jvgv_r.py", line 47, in acinput return list(map(int, input()[:-1].split(" "))) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ValueError: inva...
s386113890
p02537
u346308892
1601302534
Python
Python (3.8.2)
py
Runtime Error
2207
32780
1533
import sys input = sys.stdin.readline def acinput(): return list(map(int, input()[:-1].split(" "))) class SegmentTree: # 初期化処理 # f : SegmentTreeにのせるモノイド # default : fに対する単位元 def __init__(self, size, f=lambda x, y: x+y, default=0): self.size = 2**(size-1).bit_length() # 簡単のため要素数Nを2冪にする ...
Traceback (most recent call last): File "/tmp/tmpnn7l14p_/tmpkginbggl.py", line 50, in <module> N, K = acinput() ^^^^^^^^^ File "/tmp/tmpnn7l14p_/tmpkginbggl.py", line 47, in acinput return list(map(int, input()[:-1].split(" "))) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ValueError: inva...
s101796855
p02537
u346308892
1601302501
Python
Python (3.8.2)
py
Runtime Error
30
9240
1523
input = sys.stdin.readline def acinput(): return list(map(int, input()[:-1].split(" "))) class SegmentTree: # 初期化処理 # f : SegmentTreeにのせるモノイド # default : fに対する単位元 def __init__(self, size, f=lambda x, y: x+y, default=0): self.size = 2**(size-1).bit_length() # 簡単のため要素数Nを2冪にする se...
Traceback (most recent call last): File "/tmp/tmpgsm_ve0e/tmp4_rhnw9q.py", line 3, in <module> input = sys.stdin.readline ^^^ NameError: name 'sys' is not defined
s830387070
p02537
u346308892
1601302450
Python
Python (3.8.2)
py
Runtime Error
25
9100
1455
input = sys.stdin.readline class SegmentTree: # 初期化処理 # f : SegmentTreeにのせるモノイド # default : fに対する単位元 def __init__(self, size, f=lambda x, y: x+y, default=0): self.size = 2**(size-1).bit_length() # 簡単のため要素数Nを2冪にする self.default = default self.dat = [default]*(self.size*2) # 要...
Traceback (most recent call last): File "/tmp/tmppbouug6l/tmpptjg3c7d.py", line 3, in <module> input = sys.stdin.readline ^^^ NameError: name 'sys' is not defined
s855544751
p02537
u346308892
1601302360
Python
Python (3.8.2)
py
Runtime Error
2208
50664
1537
import numpy as np from functools import * import sys sys.setrecursionlimit(100000) input = sys.stdin.readline class SegmentTree: # 初期化処理 # f : SegmentTreeにのせるモノイド # default : fに対する単位元 def __init__(self, size, f=lambda x, y: x+y, default=0): self.size = 2**(size-1).bit_length() # 簡単のため要素数Nを2...
Traceback (most recent call last): File "/tmp/tmpwpv__dip/tmp5vuj_fgt.py", line 49, in <module> N, K = acinput() ^^^^^^^^^ File "/tmp/tmpwpv__dip/tmp5vuj_fgt.py", line 46, in acinput return list(map(int, input()[:-1].split(" "))) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ValueError: inva...
s234329363
p02537
u574922408
1601298008
Python
PyPy3 (7.3.0)
py
Runtime Error
204
86712
827
#!/usr/bin/env python3 import collections as cl import sys def II(): return int(sys.stdin.readline()) def MI(): return map(int, sys.stdin.readline().split()) def LI(): return list(map(int, sys.stdin.readline().split())) def main(): N, K = MI() A = [] max_a = 0 for i in range(N): ...
Traceback (most recent call last): File "/tmp/tmp67psb1qh/tmpgqr8u0_8.py", line 46, in <module> main() File "/tmp/tmp67psb1qh/tmpgqr8u0_8.py", line 19, in main N, K = MI() ^^^^ ValueError: not enough values to unpack (expected 2, got 0)
s187865434
p02537
u682672120
1601272171
Python
PyPy3 (7.3.0)
py
Runtime Error
85
68624
7195
class SegmentTree: ''' Segment tree。区間を表す関数の引数は全て閉区間で統一する(search系の戻り値を考慮) -------- n:要素数, func:演算(モノイド), e:単位元(モノイド), init_list:初期値 ''' def __init__(self, n, func=lambda x, y : max(x, y), e = -float('inf'), init_list = None): assert n > 0 and (not init_list or len(init_list) <= n) ...
Traceback (most recent call last): File "/tmp/tmpf5sj598m/tmpwxgmzvsw.py", line 194, in <module> n, k = map(int, input().split()) ^^^^^^^ EOFError: EOF when reading a line
s995454595
p02537
u159723084
1601270768
Python
Python (3.8.2)
py
Runtime Error
2206
18448
851
# -*- coding: utf-8 -*- N,K=map(int,input().split()) S=[] for i in range(19): S.append([0]*2**i) S.append([0]*300010) ans=0 for i in range(N): A=int(input()) R=min(A+K,300000) L=max(A-K,0) #tmp=max(S[19][L:(R+1)])+1 M=[] j=19 while(1): if L==R: M.append(S[j][L]) ...
Traceback (most recent call last): File "/tmp/tmpw6ygohxq/tmp01fh0ark.py", line 3, in <module> N,K=map(int,input().split()) ^^^^^^^ EOFError: EOF when reading a line