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
s041144727
p02548
u081060730
1600543219
Python
Python (3.8.2)
py
Runtime Error
28
9152
91
N=int(input()) import sympy a=0 for i in range(1,N): a+=len(sympy.divisors(i)) print(a)
Traceback (most recent call last): File "/tmp/tmpeh2vg4_d/tmpwyy2ksst.py", line 1, in <module> N=int(input()) ^^^^^^^ EOFError: EOF when reading a line
s922370519
p02548
u581579603
1600543176
Python
Python (3.8.2)
py
Runtime Error
27
9164
181
N = int(input()) import sympy as sy kotae = 0 for C in range(1, N): sa = N - C if sa == 1: kotae += 1 else: kotae += sy.divisor_count(sa) print(kotae)
Traceback (most recent call last): File "/tmp/tmp_qswye4n/tmpjra40ukd.py", line 1, in <module> N = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s195715810
p02548
u607884285
1600543118
Python
Python (3.8.2)
py
Runtime Error
28
9088
109
import sympy N=int(input()) count=0 for i in range(1,N): count+=len(sympy.divisors(i)) print(count)
Traceback (most recent call last): File "/tmp/tmp818ru1za/tmp4av8h0zd.py", line 3, in <module> N=int(input()) ^^^^^^^ EOFError: EOF when reading a line
s451406005
p02548
u811612390
1600543031
Python
Python (3.8.2)
py
Runtime Error
31
9096
196
import sympy def main(): n = int(input()) res = 0 for c in range(1,n): ab = n - c res += sympy.divisor_count(ab) print(res) if __name__ == "__main__": main()
Traceback (most recent call last): File "/tmp/tmpem9mfh7a/tmpjuvg6wbz.py", line 13, in <module> main() File "/tmp/tmpem9mfh7a/tmpjuvg6wbz.py", line 4, in main n = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s771136034
p02548
u720492855
1600543025
Python
Python (3.8.2)
py
Runtime Error
29
9088
142
n=input() c=0 for i in range(n): for j in range(n-2): for k in range(n-3): if(i*j+k==n): c+=1 print(c)
Traceback (most recent call last): File "/tmp/tmpgjyemax6/tmp1ejyjodx.py", line 1, in <module> n=input() ^^^^^^^ EOFError: EOF when reading a line
s055802821
p02548
u107915058
1600542990
Python
Python (3.8.2)
py
Runtime Error
25
9156
103
n = int(input()) import sympy ans = 0 for i in range(1,n): ans += sympy.divisor_count(i) print(ans)
Traceback (most recent call last): File "/tmp/tmpcb1z6xcf/tmpjz45mo3d.py", line 1, in <module> n = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s327985534
p02548
u720492855
1600542974
Python
Python (3.8.2)
py
Runtime Error
27
9088
142
n=input() c=0 for i in range(n): for j in range(n-2): for k in range(n-3): if(i*j+k==n): c+=1 print(c)
Traceback (most recent call last): File "/tmp/tmpnnie5ctp/tmpsfi7i3aq.py", line 1, in <module> n=input() ^^^^^^^ EOFError: EOF when reading a line
s196719924
p02548
u919730120
1600542954
Python
Python (3.8.2)
py
Runtime Error
24
8972
124
n=int(input()) ans=0 for a in range(1,n-1): for b in range(1,n-a): if n-a*b<=0: continue else: ans=+=1 print(ans)
File "/tmp/tmp4859ue6a/tmpdvpys7uq.py", line 8 ans=+=1 ^^ SyntaxError: invalid syntax
s588685223
p02548
u748311048
1600542952
Python
Python (3.8.2)
py
Runtime Error
28
9092
105
import sympy n = int(input()) cnt = 0 for i in range(1, n): cnt+=len(sympy.divisors(n-i)) print(cnt)
Traceback (most recent call last): File "/tmp/tmpqm0lajre/tmpr9uld5t7.py", line 2, in <module> n = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s644055104
p02548
u755801379
1600542951
Python
Python (3.8.2)
py
Runtime Error
24
9156
97
n=int(input()) import sympy ans=0 for i in range(1,n): ans+=len(sympy.divisors(i)) print(ans)
Traceback (most recent call last): File "/tmp/tmp194r6o4a/tmp1b2hjt9x.py", line 1, in <module> n=int(input()) ^^^^^^^ EOFError: EOF when reading a line
s557525698
p02548
u777800738
1600542951
Python
Python (3.8.2)
py
Runtime Error
2107
3523080
141
import numpy as np num=int(input())-1 m=np.outer([a+1 for a in range(num)],[a+1 for a in range(num)]) m=np.where(m<=num,1,0) print(np.sum(m))
Traceback (most recent call last): File "/tmp/tmp6qhb89u7/tmpwbadgipu.py", line 2, in <module> num=int(input())-1 ^^^^^^^ EOFError: EOF when reading a line
s888439372
p02548
u107915058
1600542933
Python
Python (3.8.2)
py
Runtime Error
26
9092
103
import sympy n = int(input()) ans = 0 for i in range(1,n): ans += sympy.divisor_count(i) print(ans)
Traceback (most recent call last): File "/tmp/tmpaot9llnw/tmpg1l1_gib.py", line 2, in <module> n = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s667483194
p02548
u777800738
1600542924
Python
Python (3.8.2)
py
Runtime Error
2314
3512828
150
import numpy as np num=int(input())-1 m=np.outer([a+1 for a in range(num)],[a+1 for a in range(num)]) print(m) m=np.where(m<=num,1,0) print(np.sum(m))
Traceback (most recent call last): File "/tmp/tmphew1qb6v/tmpke2rp1px.py", line 2, in <module> num=int(input())-1 ^^^^^^^ EOFError: EOF when reading a line
s000968952
p02548
u827261928
1600542831
Python
Python (3.8.2)
py
Runtime Error
27
9084
101
import sympy N=int(input()) s=0 for i in range(1,N): x=N-i s+=len(sympy.divisors(x)) print(s)
Traceback (most recent call last): File "/tmp/tmp0vmhnpcs/tmp70bgxdma.py", line 2, in <module> N=int(input()) ^^^^^^^ EOFError: EOF when reading a line
s599714652
p02548
u206890818
1600542749
Python
Python (3.8.2)
py
Runtime Error
381
91764
525
import math import collections import bisect from collections import deque from copy import copy, deepcopy import time import numpy as np import numba from numba import njit, b1, i4, i8, f8 from numba import jit def main(): N = int(input()) count=0 ans=False for i in range(N): a,b = map(int,i...
Traceback (most recent call last): File "/tmp/tmpmj1ln34z/tmpwfzeqnkx.py", line 29, in <module> main() File "/tmp/tmpmj1ln34z/tmpwfzeqnkx.py", line 15, in main N = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s391537479
p02548
u074220993
1600542598
Python
Python (3.8.2)
py
Runtime Error
24
9096
228
def main(): N = input() ans = 0 for c in range(1, N): ans += solve(N-c) print(ans) def solve(n): res = 0 for i in range(1,n//2): if n % i == 0: res += 1 return res main()
Traceback (most recent call last): File "/tmp/tmp_2ai25__/tmpwrj2j74q.py", line 15, in <module> main() File "/tmp/tmp_2ai25__/tmpwrj2j74q.py", line 2, in main N = input() ^^^^^^^ EOFError: EOF when reading a line
s606140245
p02549
u665452497
1600716914
Python
PyPy3 (7.3.0)
py
Runtime Error
90
74648
285
import numpypy as np N,K=map(int,input().split()) arr=np.array([0]*N) for _ in range(K): l,r=map(int,input().split()) arr[l-1:r]+=1 #print(arr) dp=np.array([0]*(2*N)) dp[1]=1 for n in range(2,N+1): dp[n:n+N]+=(arr*(dp[n-1]%998244353)) #print(dp) print(dp[N]%998244353)
Traceback (most recent call last): File "/tmp/tmps6ilwyq1/tmpxw0rhzmu.py", line 1, in <module> import numpypy as np ModuleNotFoundError: No module named 'numpypy'
s714881826
p02549
u523885719
1600706380
Python
PyPy3 (7.3.0)
py
Runtime Error
2208
104276
480
import sys input = sys.stdin.readline sys.setrecursionlimit(10000) N, K = map(int, input().split()) LR = [list(map(int, input().split())) for _ in range(K)] m = 998244353 S = [] for lr in LR: S.extend(range(lr[0], lr[1]+1)) p = ['a']*N p[0] = 1 def getpi(i): if i<0: return 0 if p[i] == 'a': ...
Traceback (most recent call last): File "/tmp/tmpcvr2whqr/tmpnqkrcpzk.py", line 5, in <module> N, K = map(int, input().split()) ^^^^ ValueError: not enough values to unpack (expected 2, got 0)
s032419036
p02549
u523885719
1600705087
Python
PyPy3 (7.3.0)
py
Runtime Error
481
89220
450
import sys input = sys.stdin.readline N, K = map(int, input().split()) LR = [list(map(int, input().split())) for _ in range(K)] m = 998244353 S = [] for lr in LR: S.extend(range(lr[0], lr[1]+1)) p = ['a']*N p[0] = 1 def getpi(i): if i<0: return 0 if p[i] == 'a': t = 0 for s in S...
Traceback (most recent call last): File "/tmp/tmp8fdtj_kg/tmpeatv_so1.py", line 3, in <module> N, K = map(int, input().split()) ^^^^ ValueError: not enough values to unpack (expected 2, got 0)
s738107559
p02549
u523885719
1600704136
Python
Python (3.8.2)
py
Runtime Error
2206
18900
450
import sys input = sys.stdin.readline N, K = map(int, input().split()) LR = [list(map(int, input().split())) for _ in range(K)] m = 998244353 S = [] for lr in LR: S.extend(range(lr[0], lr[1]+1)) p = ['a']*N p[0] = 1 def getpi(i): if i<0: return 0 if p[i] == 'a': t = 0 for s in S...
Traceback (most recent call last): File "/tmp/tmpp0aen64d/tmpwzh_apor.py", line 3, in <module> N, K = map(int, input().split()) ^^^^ ValueError: not enough values to unpack (expected 2, got 0)
s897894587
p02549
u236885379
1600703910
Python
PyPy3 (7.3.0)
py
Runtime Error
101
74620
571
#include <iostream> using namespace std; using ll = __int128_t; ll dp[1000005] = {0}; pair<int, int> p[10]; int main() { int n, k; cin >> n >> k; for (int i = 0; i < k; ++i) { cin >> p[i].first >> p[i].second; } ll cur = 1; for (int i = 1; i < n; ++i) { cur += dp[i]; ...
File "/tmp/tmpiehjmg0a/tmp1txr43u2.py", line 2 using namespace std; ^^^^^^^^^ SyntaxError: invalid syntax
s551762384
p02549
u236885379
1600703891
Python
PyPy3 (7.3.0)
py
Runtime Error
91
74588
566
#include <iostream> using namespace std; using ll = __int128_t; ll dp[1000005] = {0}; pair<int, int> p[10]; int main() { int n, k; cin >> n >> k; for (int i = 0; i < k; ++i) { cin >> p[i].first >> p[i].second; } ll cur = 1; for (int i = 1; i < n; ++i) { cur += dp[i]; ...
File "/tmp/tmp_j85vm0q/tmp4yc9522c.py", line 2 using namespace std; ^^^^^^^^^ SyntaxError: invalid syntax
s406347813
p02549
u499317876
1600701532
Python
Python (3.8.2)
py
Runtime Error
440
17628
501
N,K=map(int,input().split()) LR=[] move=[] P=998244353 for i in range(K): temp=list(map(int,input().split())) LR.append(temp) for j in range(temp[0],temp[1]+1): move.append(j) move.sort() l=len(move) stamp={0:1} def dp(N): if N<0: return 0 elif N in stamp.keys(): re...
Traceback (most recent call last): File "/tmp/tmp2v7x97zo/tmpj1g2900z.py", line 1, in <module> N,K=map(int,input().split()) ^^^^^^^ EOFError: EOF when reading a line
s936576080
p02549
u499317876
1600700702
Python
Python (3.8.2)
py
Runtime Error
455
17644
524
N,K=map(int,input().split()) LR=[] move=[] for i in range(K): temp=list(map(int,input().split())) LR.append(temp) for j in range(temp[0],temp[1]+1): move.append(j) move.sort() l=len(move) ishere={0:1} def dp(N): if N<0: return 0 elif N==0: return 1 elif N in ish...
Traceback (most recent call last): File "/tmp/tmpiots44ru/tmphf4j8bds.py", line 1, in <module> N,K=map(int,input().split()) ^^^^^^^ EOFError: EOF when reading a line
s256718151
p02549
u200916944
1600700408
Python
PyPy3 (7.3.0)
py
Runtime Error
1051
135220
360
N,K,*LR=map(int,open(0).read().split()) S=set() for i in range(0,K*2,2): S |= set(range(LR[i],LR[i+1]+1)) cache={1:1} def count(n): if n in cache: return cache[n] ans=0 for s in S: ns=n-s if ns==1: ans+=1 elif ns>1: ans+=count(ns) cache[n]=ans ...
Traceback (most recent call last): File "/tmp/tmp8pemx9f4/tmpbmg4f77j.py", line 1, in <module> N,K,*LR=map(int,open(0).read().split()) ^^^^^^^ ValueError: not enough values to unpack (expected at least 2, got 0)
s375732160
p02549
u502731482
1600699399
Python
PyPy3 (7.3.0)
py
Runtime Error
2208
85944
393
n, k = map(int, input().split()) l, r = [0] * k, [0] * k mod = 998244353 data = [] for i in range(k): l, r = map(int, input().split()) data.append(l) data.append(r) data = list(set(data)) ans = 0 def check(i): global ans if i >= n: if i == n: ans += 1 return for j i...
Traceback (most recent call last): File "/tmp/tmpdlivted4/tmp8x2ip6w9.py", line 1, in <module> n, k = map(int, input().split()) ^^^^^^^ EOFError: EOF when reading a line
s189064245
p02549
u502731482
1600699350
Python
Python (3.8.2)
py
Runtime Error
2205
9348
393
n, k = map(int, input().split()) l, r = [0] * k, [0] * k mod = 998244353 data = [] for i in range(k): l, r = map(int, input().split()) data.append(l) data.append(r) data = list(set(data)) ans = 0 def check(i): global ans if i >= n: if i == n: ans += 1 return for j i...
Traceback (most recent call last): File "/tmp/tmpg0subnoi/tmpbl6k8f98.py", line 1, in <module> n, k = map(int, input().split()) ^^^^^^^ EOFError: EOF when reading a line
s330460944
p02549
u422990499
1600691979
Python
Python (3.8.2)
py
Runtime Error
2206
19052
548
def f(L,n): x=0 if n<1: return 0 if n==1: return 1 if n>1: for i in range(len(L)): x+=f(L,n-L[i]) x=x%998244353 return x def f2(L,a,b): for i in range(min(a,b),max(a,b)+1): L[i]=1 return L N,K=map(int,input().split()) M=[] for...
Traceback (most recent call last): File "/tmp/tmp2vuzh98x/tmp32blptlk.py", line 16, in <module> N,K=map(int,input().split()) ^^^^^^^ EOFError: EOF when reading a line
s217530463
p02549
u789542708
1600690091
Python
Python (3.8.2)
py
Runtime Error
2206
9540
434
def a(num, b): ans = 0 for i in range(len(b)): if(num - b[i] == 0): ans = ans + 1 elif(num - b[i] > 0): ans +=a(num - b[i], b) return ans N ,K = map(int, input().split()) S = [] for i in range(K): for n in ...
Traceback (most recent call last): File "/tmp/tmpnqkz3517/tmp3eosz7f7.py", line 10, in <module> N ,K = map(int, input().split()) ^^^^^^^ EOFError: EOF when reading a line
s880584741
p02549
u894521144
1600689752
Python
PyPy3 (7.3.0)
py
Runtime Error
150
97796
617
def main(N, S): dp = [0 if n != 0 else 1 for n in range(N)] # 初期値 lst_S = sorted(list(S)) for i in range(N): if dp[i] == 0: # 計算時間削減のため, 時間さえ間に合えば不要かも. continue for j in lst_S: if i + j > N - 1: break else: dp[i+j] = (dp[i...
Traceback (most recent call last): File "/tmp/tmp101_k21q/tmpivit015h.py", line 17, in <module> N, K = list(map(int, input().split())) ^^^^^^^ EOFError: EOF when reading a line
s975317017
p02549
u889405092
1600686913
Python
Python (3.8.2)
py
Runtime Error
27
9040
309
N,K=map(int,input().split()) X=[list (map(int,input().split())) for i in range(K)] Y=[] for i in range(K): for j in range(X[i-1][0],X[i-1][1]+1): Y.append(j) else: else: Z=[0]*(max(Y)-1)+[1] for i in range(N-1): a=0 for j in Y: a=a+Z[len(Z)-j] break Z.append(a): break print(Z(-1))
File "/tmp/tmpkp1d5cq2/tmpywxf9lsn.py", line 8 else: IndentationError: expected an indented block after 'else' statement on line 7
s699578848
p02549
u889405092
1600686731
Python
Python (3.8.2)
py
Runtime Error
24
9044
309
N,K=map(int,input().split()) X=[list (map(int,input().split())) for i in range(K)] Y=[] for i in range(K): for j in range(X[i-1][0],X[i-1][1]+1): Y.append(j) else: else: Z=[0]*(max(Y)-1)+[1] for i in range(N-1): a=0 for j in Y: a=a+Z[len(Z)-j] else: Z.append(a): else: print(Z(-1))
File "/tmp/tmp2lhbor96/tmplt0ikgx0.py", line 8 else: IndentationError: expected an indented block after 'else' statement on line 7
s968905710
p02549
u889405092
1600686582
Python
Python (3.8.2)
py
Runtime Error
22
8936
317
N,K=map(int,input().split()) X=[list (map(int,input().split())) for i in range(K)] Y=[] for i in range(K): for j in range(X[i-1][0],X[i-1][1]+1): Y.append(j) else: else: Z=[0]*(max(Y)-1)+[1] for i in range(N-1): a=0 for j in Y: a=a+Z[len(Z)-j] else: Z.append(a): else: print(Z(N+max(Y)-2))
File "/tmp/tmp8fhmbb73/tmpcbdfc06k.py", line 8 else: IndentationError: expected an indented block after 'else' statement on line 7
s073057291
p02549
u997641430
1600648622
Python
Python (3.8.2)
py
Runtime Error
678
24696
310
p = 998244353 n, k = map(int, input().split()) LRs = [tuple(map(int, input().split())) for _ in range(k)] A = [0] * (2 * n) for lj, rj in LRs: A[lj] += 1 A[rj + 1] -= 1 s = 0 for i in range(1, n): s = (s + A[i]) % p for lj, rj in LRs: A[i + lj] += s A[i + rj + 1] -= s print(s)
Traceback (most recent call last): File "/tmp/tmpm6t99zah/tmp290gii55.py", line 2, in <module> n, k = map(int, input().split()) ^^^^^^^ EOFError: EOF when reading a line
s348154718
p02549
u653837719
1600632037
Python
PyPy3 (7.3.0)
py
Runtime Error
99
76296
469
n, k = map(int, input().split()) sec = [list(map(int, input().split())) for _ in range(k)] sec.sort() mod = 998244353 dp = [0] * n dp[0] = 1 sum_dp = [0, 1] for i in range(1, n): for l, r in sec: if i - l < 0: break elif i - r > 0: dp[i] = ((dp[i] + sum_dp[i-l+1]) % mod - s...
Traceback (most recent call last): File "/tmp/tmp9mkw2w9d/tmp6u5dv1o1.py", line 1, in <module> n, k = map(int, input().split()) ^^^^^^^ EOFError: EOF when reading a line
s618421869
p02549
u348293370
1600627774
Python
Python (3.8.2)
py
Runtime Error
2207
39444
604
mod = 998244353 n,k = map(int, input().split()) num_list = [list(map(int, input().split())) for _ in range(k)] cnt_list = [0]*n cnt_list[0] = 1 s_list = [] set_list = [0]*n for i in range(len(num_list)): if num_list[i][0] == num_list[i][1]: s_list.append(num_list[i][0]) else: for j in range(nu...
Traceback (most recent call last): File "/tmp/tmplinmbef_/tmpze8iqq5v.py", line 2, in <module> n,k = map(int, input().split()) ^^^^^^^ EOFError: EOF when reading a line
s547134121
p02549
u348293370
1600627747
Python
Python (3.8.2)
py
Runtime Error
2207
39440
604
mod = 998244353 n,k = map(int, input().split()) num_list = [list(map(int, input().split())) for _ in range(k)] cnt_list = [0]*n cnt_list[0] = 1 s_list = [] set_list = [0]*n for i in range(len(num_list)): if num_list[i][0] == num_list[i][1]: s_list.append(num_list[i][0]) else: for j in range(nu...
Traceback (most recent call last): File "/tmp/tmpihdyla9c/tmp0yfp7nfb.py", line 2, in <module> n,k = map(int, input().split()) ^^^^^^^ EOFError: EOF when reading a line
s290781056
p02549
u306412379
1600627034
Python
Python (3.8.2)
py
Runtime Error
2206
26340
397
from functools import lru_cache n, k = map(int, input().split()) a = set() for i in range(k): l, r = map(int, input().split()) for j in range(l, r + 1): a.add(j) a = list(a) x = [0] * n x[0] = 1 @lru_cache def mov(i): y = 0 for d in a: if i == 1: return 1 elif i -...
Traceback (most recent call last): File "/tmp/tmp5zbj1qmc/tmppgrer9vg.py", line 3, in <module> n, k = map(int, input().split()) ^^^^^^^ EOFError: EOF when reading a line
s125510775
p02549
u683116963
1600613279
Python
Python (3.8.2)
py
Runtime Error
2205
9652
455
div = 998244353 N, K = map(int, input().split()) L = set() for _ in range(K): L = L.union(set(list(map(int, input().split())))) Lst = list(L) Lst.sort() def cntroot(remaining, cnt, Lst): for x in Lst: if (remaining - x) > 0: cnt = cntroot(remaining - x, cnt, Lst) elif (remaining ...
Traceback (most recent call last): File "/tmp/tmp4caxlt_8/tmpfqnm39po.py", line 3, in <module> N, K = map(int, input().split()) ^^^^^^^ EOFError: EOF when reading a line
s148667121
p02549
u334712262
1600613211
Python
PyPy2 (7.3.0)
py
Runtime Error
508
84788
4682
# -*- coding: utf-8 -*- import bisect import heapq import math import random from collections import Counter, defaultdict, deque from decimal import ROUND_CEILING, ROUND_HALF_UP, Decimal from fractions import Fraction from functools import lru_cache, reduce from itertools import combinations, combinations_with_replacem...
Traceback (most recent call last): File "/tmp/tmpw5pyndn5/tmpblyqoddn.py", line 218, in <module> main() File "/tmp/tmpw5pyndn5/tmpblyqoddn.py", line 212, in main N, K = read_int_n() ^^^^ ValueError: not enough values to unpack (expected 2, got 0)
s039435300
p02549
u334712262
1600613166
Python
PyPy2 (7.3.0)
py
Runtime Error
321
84248
4682
# -*- coding: utf-8 -*- import bisect import heapq import math import random from collections import Counter, defaultdict, deque from decimal import ROUND_CEILING, ROUND_HALF_UP, Decimal from fractions import Fraction from functools import lru_cache, reduce from itertools import combinations, combinations_with_replacem...
Traceback (most recent call last): File "/tmp/tmpsa82g3ta/tmp49jcevaz.py", line 218, in <module> main() File "/tmp/tmpsa82g3ta/tmp49jcevaz.py", line 212, in main N, K = read_int_n() ^^^^ ValueError: not enough values to unpack (expected 2, got 0)
s783841222
p02549
u683116963
1600613139
Python
Python (3.8.2)
py
Runtime Error
2205
9496
448
div = 998244353 N, K = map(int, input().split()) L = set() for _ in range(K): L = L.union(set(list(map(int, input().split())))) Lst = list(L) Lst.reverse() print(Lst) def cntroot(remaining, cnt, Lst): for x in Lst: if (remaining - x) > 0: cnt = cntroot(remaining - x, cnt, Lst) el...
Traceback (most recent call last): File "/tmp/tmpm7xyg6nd/tmpd_4rfd_g.py", line 3, in <module> N, K = map(int, input().split()) ^^^^^^^ EOFError: EOF when reading a line
s829393125
p02549
u054514819
1600610558
Python
PyPy3 (7.3.0)
py
Runtime Error
127
77452
421
import sys def input(): return sys.stdin.readline().strip() def mapint(): return map(int, input().split()) sys.setrecursionlimit(10**9) N, K = mapint() dp = [0]*(N*2+1) dp[1] = 1 dp[2] = -1 mod = 998244353 LR = [list(mapint()) for _ in range(K)] for i in range(1, N+1): dp[i] = (dp[i]+dp[i-1])%mod for l, r in L...
Traceback (most recent call last): File "/tmp/tmpa151497s/tmpodhorv6l.py", line 6, in <module> N, K = mapint() ^^^^ ValueError: not enough values to unpack (expected 2, got 0)
s980090597
p02549
u805332733
1600610387
Python
PyPy3 (7.3.0)
py
Runtime Error
106
69896
570
# 配るDP def resolve(): base = 998244353 N, K = map(int, input().split(" ")) LRs = [] for _ in range(K): (L, R) = map(int, input().split(" ")) LRs.append((L, R)) dp = [0] * (N+1) dp[1] = 1 for i in range(1, N): dp[i] += dp[i-1] for lr in LRs: left = i + lr[0] right = i + lr[1...
Traceback (most recent call last): File "/tmp/tmpd_wcwg7n/tmp2_rvokfi.py", line 29, in <module> resolve() File "/tmp/tmpd_wcwg7n/tmp2_rvokfi.py", line 4, in resolve N, K = map(int, input().split(" ")) ^^^^^^^ EOFError: EOF when reading a line
s256716342
p02549
u239228953
1600605834
Python
Python (3.8.2)
py
Runtime Error
28
9128
338
n,k = list(map(int,list(input().split()))) s = [] for i in range(k): s.append(list(map(int.list(input().split())))) l = [] for i in s: l.extend(i) l = list(set(l)) dp=[0]*(n+1) for i in l: dp[i]=1 for i in range(n+1): for j in l: if i-j>0: dp[i]+=dp[i-j] #print(dp) print...
Traceback (most recent call last): File "/tmp/tmplbvgkceg/tmp1kafow1j.py", line 1, in <module> n,k = list(map(int,list(input().split()))) ^^^^^^^ EOFError: EOF when reading a line
s957014963
p02549
u239228953
1600605478
Python
Python (3.8.2)
py
Runtime Error
27
9024
338
n,k = list(map(int.list(input().split()))) s = [] for i in range(k): s.append(list(map(int.list(input().split())))) l = [] for i in s: l.extend(i) l = list(set(l)) dp=[0]*(n+1) for i in l: dp[i]=1 for i in range(n+1): for j in l: if i-j>0: dp[i]+=dp[i-j] #print(dp) print...
Traceback (most recent call last): File "/tmp/tmpeo2ob39_/tmpytye6yhh.py", line 1, in <module> n,k = list(map(int.list(input().split()))) ^^^^^^^^ AttributeError: type object 'int' has no attribute 'list'
s493645971
p02549
u576432509
1600603013
Python
PyPy3 (7.3.0)
py
Runtime Error
2210
217432
694
from bisect import bisect_left,bisect icase=0 if icase==0: n,k=map(int,input().split()) s=[] for i in range(k): li,ri=list(map(int,input().split())) for i in range(li,ri+1): s.append(i) elif icase==1: n,k=5,2 s=[1, 3, 4] elif icase==2: n,k=60,3 s=[5, 6, 7, 8...
Traceback (most recent call last): File "/tmp/tmputuq1qft/tmpwobqqakq.py", line 5, in <module> n,k=map(int,input().split()) ^^^^^^^ EOFError: EOF when reading a line
s148527491
p02549
u692054751
1600595546
Python
PyPy3 (7.3.0)
py
Runtime Error
87
74676
370
n, K = [int(a) for a in input().split()] s = [[int(a) for a in input().split()] for _ in range(K)] MOD = 998244353 dp = [0] * (n + 1) dp_sum = [0] * (n + 1) dp[1] = 1 for i in range(1, n+1): for l, r in s: dp[i] += dp_sum[i-l if (i-l) > 0 else 0] - dp_sum[(i-r-1) if (i-r-1) > 0 else 0] dp_sum[i]...
File "/tmp/tmpz0fcb_ww/tmp0prhwfi7.py", line 13 dp_sum[i] = (dp[i] + dp_sum[i-1]) % MOD ^ IndentationError: unindent does not match any outer indentation level
s170600462
p02549
u145145077
1600594083
Python
Python (3.8.2)
py
Runtime Error
1480
26028
371
n,k=map(int,input().split()) lr=[list(map(int,input().split())) for _ in range(k)] mod = 998244353 dp = [0] * (n+1) sdp = [0] * (n+1) dp[1] = 1 sdp[1] = 1 for i in range(n+1): for j in range(k): left = max(0, i-lr[j][1]) right = max(0, i-lr[j][0]+1) dp[i] += sdp[right] - sdp[left] if i+1 <= n: ...
Traceback (most recent call last): File "/tmp/tmpcg6nozbl/tmpv0en7y9k.py", line 1, in <module> n,k=map(int,input().split()) ^^^^^^^ EOFError: EOF when reading a line
s596993854
p02549
u347502437
1600593027
Python
Python (3.8.2)
py
Runtime Error
25
9200
243
N, K = map(int, input().split()) S = [] for i in range(K): L, R = map(int, input().split()) S += [i in range(L, R+1)] A = [1] for n in range(1,N): s = sum(A[n - i] for i in S if n - i >= 0) % 998244353 A.append(s) print(A[N-1])
Traceback (most recent call last): File "/tmp/tmp8ydutptk/tmpi0dlbxhj.py", line 1, in <module> N, K = map(int, input().split()) ^^^^^^^ EOFError: EOF when reading a line
s047605934
p02549
u099006712
1600591096
Python
Python (3.8.2)
py
Runtime Error
318
37860
452
def count(n, S, memo): if n < 0: return 0 elif n == 1: return 1 elif memo[n] > -1: return memo[n] else: x = 0 for s in S: x += count(n - s, S, memo) memo[n] = x return memo[n] N, K = map(int, input().split()) S = set() for i in range(...
Traceback (most recent call last): File "/tmp/tmpzycqqdwr/tmpwidc0kkz.py", line 16, in <module> N, K = map(int, input().split()) ^^^^^^^ EOFError: EOF when reading a line
s066543043
p02549
u602500004
1600589530
Python
PyPy3 (7.3.0)
py
Runtime Error
88
74888
857
import math import sys import os import numpy as np sys.setrecursionlimit(10**7) def _S(): return sys.stdin.readline().rstrip() def I(): return int(_S()) def LS(): return list(_S().split()) def LI(): return list(map(int,LS())) if os.getenv("LOCAL"): inputFile = basename_without_ext = os.path.splitext(os.path.bas...
Traceback (most recent call last): File "/tmp/tmp4i00pgf6/tmp72bxqusd.py", line 19, in <module> N,K = LI() ^^^ ValueError: not enough values to unpack (expected 2, got 0)
s106833394
p02549
u326609687
1600583615
Python
Python (3.8.2)
py
Runtime Error
109
27324
1780
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/tmp11deqqyg/tmp7lqsndqm.py", line 19, in <module> from nbmodule import solve ModuleNotFoundError: No module named 'nbmodule'
s771327182
p02549
u851125702
1600580794
Python
PyPy3 (7.3.0)
py
Runtime Error
2210
134508
361
N,K=map(int,input().split()) x=998244353 S=[] for i in range(K): l,r=map(int,input().split()) for j in range(l,r+1): S.append(j) S=list(set(S)) dp=[0 for i in range(N)] for i in range(len(S)): dp[S[i]]=1 for i in range(N): for j in range(len(S)): if(i-S[j]>0): dp[i]+=dp[i-S[j]]...
Traceback (most recent call last): File "/tmp/tmpro2tdrqi/tmp9l2s8qex.py", line 1, in <module> N,K=map(int,input().split()) ^^^^^^^ EOFError: EOF when reading a line
s168788905
p02549
u851125702
1600580527
Python
Python (3.8.2)
py
Runtime Error
2206
29080
360
N,K=map(int,input().split()) x=998244353 S=[] for i in range(K): l,r=map(int,input().split()) for j in range(l,r+1): S.append(j) S=list(set(S)) dp=[0 for i in range(N)] for i in range(len(S)): dp[S[i]]=1 for i in range(N): for j in range(len(S)): if(i-S[j]>0): dp[i]+=dp[i-S[j]]...
Traceback (most recent call last): File "/tmp/tmpswqhk9ck/tmpdttg3ywk.py", line 1, in <module> N,K=map(int,input().split()) ^^^^^^^ EOFError: EOF when reading a line
s425182841
p02549
u515740713
1600577819
Python
PyPy3 (7.3.0)
py
Runtime Error
90
74800
1450
# -*- coding: Shift-JIS -*- import sys read = sys.stdin.buffer.read readline = sys.stdin.buffer.readline readlines = sys.stdin.buffer.readlines MOD = 998244353 class BIT2: """ 区間加算BIT(区間加算・区間合計取得) """ def __init__(self, N): self.N = (N+1) self.data0 = [0] * (N+1) self.data1 = [0] * (N+...
SyntaxError: encoding problem: Shift-JIS
s442933516
p02549
u332657092
1600569079
Python
PyPy3 (7.3.0)
py
Runtime Error
109
74316
311
n, k = map(int, input().split()) s = [] for i in range(k): l, r = map(int, input().split()) s += list(range(l, r+1) mod = 998244353 dp = [0] * (n+1) dp[1] = 1 s = sorted(s) for i in range(1, n): dp[i] %= mod for add in s: if i+add <= n: dp[i+add] += dp[i] print(dp[n] % mod)
File "/tmp/tmp0thpjfgh/tmpc85zljuu.py", line 5 s += list(range(l, r+1) ^ SyntaxError: '(' was never closed
s585078445
p02549
u469254913
1600566533
Python
Python (3.8.2)
py
Runtime Error
251
16920
944
# import numpy as np # import math # import copy # from collections import deque import sys input = sys.stdin.readline # sys.setrecursionlimit(10000) # from numba import njit,i8 # @njit(i8(i8,i8,i8,i8[:,:],i8[:],i8,i8)) def give_dp(N,K,mod,LR,dp,l,r): for i in range(N): if i > 0: dp[i] += dp[i...
Traceback (most recent call last): File "/tmp/tmp3gnpzt0c/tmp_cfvy9py.py", line 48, in <module> main() File "/tmp/tmp3gnpzt0c/tmp_cfvy9py.py", line 30, in main N,K = map(int,input().split()) ^^^ ValueError: not enough values to unpack (expected 2, got 0)
s303552476
p02549
u448406471
1600566491
Python
Python (3.8.2)
py
Runtime Error
2211
238144
614
import sys sys.setrecursionlimit(200000) K, N = map(int, input().split()) num_list = [] for i in range(N): L, R = map(int, input().split()) num_list += list(range(L, R+1)) num_set = set(sorted(num_list)) counted = {} def recursion(n, count): if n == 0: return 1 elif n < 0: return...
Traceback (most recent call last): File "/tmp/tmp9cn8a6my/tmpyo5uiyd7.py", line 4, in <module> K, N = map(int, input().split()) ^^^^^^^ EOFError: EOF when reading a line
s838276566
p02549
u448406471
1600566358
Python
Python (3.8.2)
py
Runtime Error
211
44100
547
import sys sys.setrecursionlimit(20000) K, N = map(int, input().split()) num_list = [] for i in range(N): L, R = map(int, input().split()) num_list += list(range(L, R+1)) num_set = set(sorted(num_list)) counted = {} def recursion(n): count = 0 for i in num_set: if n-i < 0: continu...
Traceback (most recent call last): File "/tmp/tmpykbju7od/tmp0apbkyej.py", line 4, in <module> K, N = map(int, input().split()) ^^^^^^^ EOFError: EOF when reading a line
s149804902
p02549
u789622053
1600560212
Python
PyPy2 (7.3.0)
py
Runtime Error
423
86196
919
# inp.readline() # int(inp.readline()) # out.write() # raw_input() # map(int,raw_input().split()) # map(int,inp.readline().split()) # for _ in xrange(input()): # print "Case #"+str(_+1)+": "+ if __name__ == "__main__": from sys import stdin as inp, stdout as out,setrecursionlimit as srl from collections import...
Traceback (most recent call last): File "/tmp/tmp69t80j1f/tmpiu0ilzty.py", line 23, in <module> for _ in xrange(1): ^^^^^^ NameError: name 'xrange' is not defined. Did you mean: 'range'?
s534262624
p02549
u568426505
1600560202
Python
Python (3.8.2)
py
Runtime Error
25
8996
1131
#include <iostream> #include <stdio.h> #include <algorithm> #include <math.h> #include <list> #include <string> #include <map> #include <vector> #include <stack> #include <queue> #include <iomanip> // setprecisionを使用するのに必要 cout << fixed << setprecision(15) << p でpを小数点以下15桁表示 using namespace std; #define REPD(i, a, b) f...
File "/tmp/tmp02jzdh9p/tmpfepvbafz.py", line 12 using namespace std; ^^^^^^^^^ SyntaxError: invalid syntax
s671931665
p02549
u448406471
1600559382
Python
Python (3.8.2)
py
Runtime Error
253
31096
608
K, N = map(int, input().split()) num_list = [] for i in range(N): L, R = map(int, input().split()) num_list += list(range(L, R+1)) num_set = set(sorted(num_list)) counted = {} def recursion(n): count = 0 if n == 0: return 1 elif n < 0: return 0 for i in num_set: if i<=0:...
Traceback (most recent call last): File "/tmp/tmpxo_8y7x1/tmpev2r9rir.py", line 1, in <module> K, N = map(int, input().split()) ^^^^^^^ EOFError: EOF when reading a line
s971809429
p02549
u395252999
1600557620
Python
Python (3.8.2)
py
Runtime Error
358
25936
603
import sys input = sys.stdin.readline def main(): N, K = map(int, input().split()) LR = [tuple(map(int, input().split())) for _ in range(K)] S = set() for start, end in LR: for i in range(start, end + 1): S.add(i) M = dict() answer = calc(N, S, M) print(answer % 9982443...
Traceback (most recent call last): File "/tmp/tmp6j6lzx_s/tmp49smb165.py", line 32, in <module> main() File "/tmp/tmp6j6lzx_s/tmp49smb165.py", line 6, in main N, K = map(int, input().split()) ^^^^ ValueError: not enough values to unpack (expected 2, got 0)
s870203673
p02549
u539969758
1600557530
Python
Python (3.8.2)
py
Runtime Error
26
9184
544
N,X,M = map(int,input().split()) ans = X A = X TF = True srt = 1000000 retu = dict() retu[X] = 1 loop = X for i in range(N-1): if TF: A = A**2 % M if retu.get(A) != None: srt = j goal = i TF = False break if TF: retu[A] = 1 loop...
Traceback (most recent call last): File "/tmp/tmpjhw4o4_z/tmpcbks0t6y.py", line 1, in <module> N,X,M = map(int,input().split()) ^^^^^^^ EOFError: EOF when reading a line
s201444755
p02549
u395252999
1600557155
Python
Python (3.8.2)
py
Runtime Error
387
26000
640
import sys input = sys.stdin.readline def main(): N, K = map(int, input().split()) LR = [tuple(map(int, input().split())) for _ in range(K)] S = set() for (start, end) in LR: for i in range(start, end + 1): S.add(i) M = dict() answer = calc(N, S, M) print(answer % 99824...
Traceback (most recent call last): File "/tmp/tmp7qrj6ofu/tmp0zzschws.py", line 33, in <module> main() File "/tmp/tmp7qrj6ofu/tmp0zzschws.py", line 6, in main N, K = map(int, input().split()) ^^^^ ValueError: not enough values to unpack (expected 2, got 0)
s281961779
p02549
u395252999
1600556917
Python
Python (3.8.2)
py
Runtime Error
363
26032
628
import sys input = sys.stdin.readline def main(): N, K = map(int, input().split()) LR = [tuple(map(int, input().split())) for _ in range(K)] S = set() for (start, end) in LR: for i in range(start, end + 1): S.add(i) M = dict() answer = calc(N, S, M) print(answer % 99824...
Traceback (most recent call last): File "/tmp/tmpb3f2au_z/tmp0btnk506.py", line 33, in <module> main() File "/tmp/tmpb3f2au_z/tmp0btnk506.py", line 6, in main N, K = map(int, input().split()) ^^^^ ValueError: not enough values to unpack (expected 2, got 0)
s840925909
p02549
u829999015
1600556851
Python
Python (3.8.2)
py
Runtime Error
2206
29732
391
mod = 998244353 N, K = map(int, input().split()) LR = [map(int, input().split()) for _ in range(K)] L, R = [list(i) for i in zip(*LR)] a = [] for i in range(K): a.extend(list(range(L[i], R[i] + 1))) LR = list(set(a)) DP = [0]*N DP[0] = 1 for i in range(N): if i + LR[-1] >= N: LR.pop(-1) if len(LR) < 1: ...
Traceback (most recent call last): File "/tmp/tmpsc3q3ysh/tmplmzgfxmr.py", line 2, in <module> N, K = map(int, input().split()) ^^^^^^^ EOFError: EOF when reading a line
s759989503
p02549
u395252999
1600556690
Python
PyPy3 (7.3.0)
py
Runtime Error
1032
105696
628
import sys input = sys.stdin.readline def main(): N, K = map(int, input().split()) LR = [tuple(map(int, input().split())) for _ in range(K)] S = set() for (start, end) in LR: for i in range(start, end + 1): S.add(i) M = dict() answer = calc(N, S, M) print(answer % 99824...
Traceback (most recent call last): File "/tmp/tmp2b_usb_2/tmp00bm8lhn.py", line 33, in <module> main() File "/tmp/tmp2b_usb_2/tmp00bm8lhn.py", line 6, in main N, K = map(int, input().split()) ^^^^ ValueError: not enough values to unpack (expected 2, got 0)
s816518157
p02549
u829999015
1600556177
Python
Python (3.8.2)
py
Runtime Error
2207
30824
415
mod = 998244353 N, K = map(int, input().split()) LR = [map(int, input().split()) for _ in range(K)] L, R = [list(i) for i in zip(*LR)] a = [] for i in range(K): a.extend(list(range(L[i], R[i] + 1))) LR = list(set(a)) print(LR) DP = [0]*N DP[0] = 1 for i in range(N): if i + LR[-1] >= N: LR.pop(-1) if len(LR...
Traceback (most recent call last): File "/tmp/tmpq30cnkxn/tmpwfu2vgya.py", line 2, in <module> N, K = map(int, input().split()) ^^^^^^^ EOFError: EOF when reading a line
s910618463
p02549
u911856499
1600555624
Python
Python (3.8.2)
py
Runtime Error
24
9316
802
import sys import copy #import math #import itertools #import numpy as np #import re def func(x,m): return x**2%m N,X,M=[int(c) for c in input().split()] myset = {X} mydict = {0:X} A = [] A.append(X) s = X i = 0 i_stop = i #i=0は計算したので1から for i in range(1,N): A.append(func(A[i-1],M)) if A[i] in myset: ...
Traceback (most recent call last): File "/tmp/tmp7kdwy02w/tmprshspvr0.py", line 11, in <module> N,X,M=[int(c) for c in input().split()] ^^^^^^^ EOFError: EOF when reading a line
s546741675
p02549
u829999015
1600555436
Python
Python (3.8.2)
py
Runtime Error
2206
29696
396
mod = 998244353 N, K = map(int, input().split()) LR = [map(int, input().split()) for _ in range(K)] L, R = [list(i) for i in zip(*LR)] a = [] for i in range(K): a.extend(list(range(L[i], R[i] + 1))) LR = list(set(a)) DP = [0]*N DP[0] = 1 for i in range(N): if i + LR[-1] > N: LR.pop(-1) for s in LR: loc...
Traceback (most recent call last): File "/tmp/tmp25c5pto9/tmpdjg6295y.py", line 2, in <module> N, K = map(int, input().split()) ^^^^^^^ EOFError: EOF when reading a line
s304917057
p02549
u331105860
1600554211
Python
Python (3.8.2)
py
Runtime Error
535
107908
698
import numpy as np # noqa import numba from numba import njit, b1, i4, i8, f8 m = 998244353 N, K = map(int, input().split()) jumps = [] for i in range(K): l, r = map(int, input().split()) jumps.append(np.array([l, r])) jumps = np.array(jumps) @njit((i8, i8, i8[:, :]), cache=True) def main(N, m, jumps): ...
Traceback (most recent call last): File "/tmp/tmp5_rb297z/tmp_oljeecl.py", line 6, in <module> N, K = map(int, input().split()) ^^^^^^^ EOFError: EOF when reading a line
s450480041
p02549
u479475321
1600554120
Python
Python (3.8.2)
py
Runtime Error
2206
12864
708
n,k = map(int, input().split()) hani = [0 for i in range(n)]#i-1がふくまれているか kumi = [-1 for i in range(n+1)] #iマス目に行く通り min = n for i in range(k): l,r = map(int,input().split()) if l < min: min = l for j in range(l-1,r): hani[j] = 1 kumi[0] = 1 for i in range(1,min): kumi[i] = 0 kumi[min] =...
Traceback (most recent call last): File "/tmp/tmpv3mgamvn/tmpvp8z76sz.py", line 1, in <module> n,k = map(int, input().split()) ^^^^^^^ EOFError: EOF when reading a line
s520083227
p02549
u479475321
1600554025
Python
Python (3.8.2)
py
Runtime Error
2206
12820
727
n,k = map(int, input().split()) hani = [0 for i in range(n)]#i-1がふくまれているか kumi = [-1 for i in range(n+1)] #iマス目に行く通り min = n for i in range(k): l,r = map(int,input().split()) if l < min: min = l for j in range(l-1,r): hani[j] = 1 kumi[0] = 1 if min > 1: for i in range(1,min): kum...
Traceback (most recent call last): File "/tmp/tmp61x21rh9/tmpjl1pwdzk.py", line 1, in <module> n,k = map(int, input().split()) ^^^^^^^ EOFError: EOF when reading a line
s042727523
p02549
u479475321
1600553827
Python
Python (3.8.2)
py
Runtime Error
2206
12772
708
n,k = map(int, input().split()) hani = [0 for i in range(n)]#i-1がふくまれているか kumi = [-1 for i in range(n+1)] #iマス目に行く通り min = n for i in range(k): l,r = map(int,input().split()) if l < min: min = l for j in range(l-1,r): hani[j] = 1 kumi[0] = 1 for i in range(1,min): kumi[i] = 0 kumi[min] =...
Traceback (most recent call last): File "/tmp/tmphebdalmm/tmpxlpu_1r7.py", line 1, in <module> n,k = map(int, input().split()) ^^^^^^^ EOFError: EOF when reading a line
s770287279
p02549
u331105860
1600553770
Python
Python (3.8.2)
py
Runtime Error
1726
107740
688
import numpy as np # noqa import numba from numba import njit, b1, i4, i8, f8 m = 998244353 N, K = map(int, input().split()) jumps = [] for i in range(K): l, r = map(int, input().split()) jumps.append([l, r]) jumps = np.array(jumps) @njit((i8, i8, i8[:, :]), cache=True) def main(N, m, jumps): dpsum = ...
Traceback (most recent call last): File "/tmp/tmppa5pwzla/tmp2hj57oyj.py", line 6, in <module> N, K = map(int, input().split()) ^^^^^^^ EOFError: EOF when reading a line
s399909437
p02549
u287742786
1600553640
Python
Python (3.8.2)
py
Runtime Error
27
8980
577
# -*- coding: utf-8 -*- def input_int_array(): return map(int, input().split()) def answer(): n, k = input_int_array() spans = [tuple(input_int_array()) for x in range(k)] count = [0 for x in range(n)] count[0] = 1 for i in range(n): if i > 0: count[i] += count[i-1] ...
File "/tmp/tmpw9v_r627/tmpm_5mad75.py", line 27 answer( ^ SyntaxError: '(' was never closed
s091804391
p02549
u095094246
1600552917
Python
Python (3.8.2)
py
Runtime Error
315
16748
336
#配るDP n,k=map(int,input().split()) l=[0]*k r=[0]*k for j in range(k): l[j],r[j] = map(int,input().split()) p=998244353 dp=[0]*(n+100) dp[1]=1 dp[2]=-1 for i in range(1,n+1): dp[i] += dp[i-1] dp[i] %= p for lj,rj in zip(l,r): dp[i+lj] += dp[i] dp[i+lj] %= p dp[i+rj+1] -= dp[i] dp[i+rj+1] %= p ...
Traceback (most recent call last): File "/tmp/tmpkp9q2_w_/tmpl55kcoht.py", line 2, in <module> n,k=map(int,input().split()) ^^^^^^^ EOFError: EOF when reading a line
s758415294
p02549
u997641430
1600552435
Python
Python (3.8.2)
py
Runtime Error
976
16868
445
p = 998244353 n, k = map(int, input().split()) LRs = [] for j in range(k): lj, rj = map(int, input().split()) LRs.append((lj, rj)) A = [0] * n i0 = min(lj for lj, rj in LRs) A[0] = 1 A[i0] = 1 for i in range(i0 + 1, n): A[i] = A[i - 1] for j in range(k): lj, rj = LRs[j] if i - lj >= 0: ...
Traceback (most recent call last): File "/tmp/tmpduh0gwny/tmpncowk5tx.py", line 2, in <module> n, k = map(int, input().split()) ^^^^^^^ EOFError: EOF when reading a line
s926804576
p02549
u479475321
1600551943
Python
Python (3.8.2)
py
Runtime Error
2206
12904
666
n,k = map(int, input().split()) hani = [0 for i in range(n)] kumi = [-1 for i in range(n)] min = n for i in range(k): l,r = map(int,input().split()) if l < min: min = l for j in range(l-1,r): hani[j] = 1 for j in range(min-1): kumi[j] = 0 kumi[min-1] = 1 def countt(n,hani,kumi): an ...
Traceback (most recent call last): File "/tmp/tmptzvesf3z/tmpukm306rj.py", line 1, in <module> n,k = map(int, input().split()) ^^^^^^^ EOFError: EOF when reading a line
s862403037
p02549
u525302207
1600551877
Python
Python (3.8.2)
py
Runtime Error
24
8980
377
mod = 998244353 n,k = map(int,input().split()) t = [False] * 20 for i in range(k): l,r = map(int,input().split()) for j in range(l,r+1,1): t[j] = True s = [] for i,v in enumerate(t): if v == True: s.append(i) dp = [0] * (n+5) dp[1] = 1 for i in range(2,n+1,1): for d in s: if...
Traceback (most recent call last): File "/tmp/tmps6ood8d9/tmp870hrpwc.py", line 2, in <module> n,k = map(int,input().split()) ^^^^^^^ EOFError: EOF when reading a line
s458143661
p02549
u479475321
1600551831
Python
Python (3.8.2)
py
Runtime Error
2206
12784
588
n,k = map(int, input().split()) hani = [0 for i in range(n)] kumi = [-1 for i in range(n)] min = n for i in range(k): l,r = map(int,input().split()) if l < min: min = l for j in range(l-1,r): hani[j] = 1 for j in range(min-1): kumi[j] = 0 kumi[min-1] = 1 def countt(n,hani,kumi): an ...
Traceback (most recent call last): File "/tmp/tmpafexu14q/tmped3jc7e0.py", line 1, in <module> n,k = map(int, input().split()) ^^^^^^^ EOFError: EOF when reading a line
s701070550
p02549
u479475321
1600551332
Python
Python (3.8.2)
py
Runtime Error
2206
12904
634
n,k = map(int, input().split()) hani = [0 for i in range(n)] kumi = [-1 for i in range(n)] for i in range(k): l,r = map(int,input().split()) for j in range(l-1,r): hani[j] = 1 def countt(n,hani,kumi): if n == 1: if hani[0] == 1: kumi[0] = 1 else: kumi[0] = 0...
Traceback (most recent call last): File "/tmp/tmp0wqhfxqq/tmp9bf8qc0u.py", line 1, in <module> n,k = map(int, input().split()) ^^^^^^^ EOFError: EOF when reading a line
s585987516
p02549
u860002137
1600551235
Python
Python (3.8.2)
py
Runtime Error
34
18272
345
n, k = map(int, input().split()) MOD = 998244353 lr = [] for _ in range(k): l, r = map(int, input().split()) lr += (list(range(l, r + 1))) lr.sort() lr = np.array(lr) dp = np.zeros(n + n, dtype=np.int64) dp[0] = 1 dp2 = dp.copy() for i in range(n): idx = i + lr dp2[idx] += dp[i] dp2 %= MOD d...
Traceback (most recent call last): File "/tmp/tmp01wqolkb/tmpd4pwbh6d.py", line 1, in <module> n, k = map(int, input().split()) ^^^^^^^ EOFError: EOF when reading a line
s752607082
p02549
u388164885
1600550244
Python
Python (3.8.2)
py
Runtime Error
223
26572
414
import functools n, k = map(int, input().split()) s = set() for i in range(k): k1, k2 = map(int, input().split()) for i in range(k1, k2+1): s.add(i) @functools.lru_cache(None) def dp(cur): ret = 0 if cur == n: ret += 1 for i in s: temp = i + cur if temp > n: ...
Traceback (most recent call last): File "/tmp/tmpxk_043qp/tmp16ruyxj2.py", line 2, in <module> n, k = map(int, input().split()) ^^^^^^^ EOFError: EOF when reading a line
s471009734
p02549
u380854465
1600550149
Python
PyPy3 (7.3.0)
py
Runtime Error
2208
84404
418
import sys import itertools N, K = map(int, input().split()) S = set() dp = [0] * (N) dp[0]=0 q = [] for i in range(K): a, b = map(int, input().split()) for j in range(a-1, b): dp[j+1] = 1 q.append(j+1) q = sorted(q) for i in range(1, N): for j in q: if i - j < 1: ...
Traceback (most recent call last): File "/tmp/tmp16yqkzy2/tmpn0sq9omw.py", line 4, in <module> N, K = map(int, input().split()) ^^^^^^^ EOFError: EOF when reading a line
s926094336
p02549
u448406471
1600549946
Python
Python (3.8.2)
py
Runtime Error
220
31308
594
K, N = map(int, input().split()) num_list = [] for i in range(N): L, R = map(int, input().split()) num_list += list(range(L, R+1)) num_set = set(sorted(num_list)) counted = {} def recursion(n): global counted count = 0 if n == 0: return 1 elif n < 0: return 0 for i in n...
Traceback (most recent call last): File "/tmp/tmpxs2kh3bz/tmpvxulo7o8.py", line 1, in <module> K, N = map(int, input().split()) ^^^^^^^ EOFError: EOF when reading a line
s775721356
p02549
u448406471
1600549913
Python
Python (3.8.2)
py
Runtime Error
213
31112
575
K, N = map(int, input().split()) num_list = [] for i in range(N): L, R = map(int, input().split()) num_list += list(range(L, R+1)) num_set = set(sorted(num_list)) counted = {} def recursion(n): count = 0 if n == 0: return 1 elif n < 0: return 0 for i in num_set: if ...
Traceback (most recent call last): File "/tmp/tmphjhljkpc/tmpzf_i5_q3.py", line 1, in <module> K, N = map(int, input().split()) ^^^^^^^ EOFError: EOF when reading a line
s870858470
p02549
u629454253
1600549610
Python
PyPy3 (7.3.0)
py
Runtime Error
89
68612
288
MOD = 998244353 N, K = map(int, input().split()) seg = [tuple(map(int, input().split())) for _ in range(K)] dp = [0] * (N+1) dp[0] = 1 for i in range(N): for s, t in seg: dp[i+s] += dp[i] dp[i+t;1] -= dp[i] dp[i+1] += dp[i] dp[i+1] %= MOD print(dp[N-1])
File "/tmp/tmp37x4jj7f/tmpjvva5bb4.py", line 10 dp[i+t;1] -= dp[i] ^ SyntaxError: invalid syntax
s198446456
p02549
u525302207
1600548952
Python
Python (3.8.2)
py
Runtime Error
33
9084
402
mod = 998244353 n,k = map(int,input().split()) t = [False] * 20 for i in range(k): l,r = map(int,input().split()) for j in range(l,r+1,1): t[j] = True s = [] for i,v in enumerate(t): if v == True: s.append(i) dp = [0] * (n+5) dp[1] = 1 for i in range(2,n+1,1): for d in s: if...
Traceback (most recent call last): File "/tmp/tmp9rq6p33n/tmprtf2wrja.py", line 2, in <module> n,k = map(int,input().split()) ^^^^^^^ EOFError: EOF when reading a line
s036971773
p02549
u525302207
1600548888
Python
Python (3.8.2)
py
Runtime Error
31
9164
424
mod = 998244353 n,k = map(int,input().split()) t = [False] * 20 for i in range(k): l,r = map(int,input().split()) for j in range(l,r+1,1): t[j] = True s = [] for i,v in enumerate(t): if v == True: s.append(i) dp = [0] * (n+5) dp[1] = 1 for i in range(2,n+1,1): for d in s: if...
Traceback (most recent call last): File "/tmp/tmpfc3se4gw/tmpy4gh6tns.py", line 2, in <module> n,k = map(int,input().split()) ^^^^^^^ EOFError: EOF when reading a line
s947311179
p02549
u876438858
1600548741
Python
PyPy3 (7.3.0)
py
Runtime Error
85
74704
466
#!/usr/bin/env python3 import sys import numpy as np input = sys.stdin.readline mod = 998244353 def I(): return int(input()) def MI(): return map(int, input().split()) N, K = MI() steps = set() for _ in range(K): l, r = MI() steps |= set(range(l, r + 1)) dp = np.zeros(N) dp[0] = 1 for i in ra...
Traceback (most recent call last): File "/tmp/tmpxnsexmlp/tmp7a1a13n0.py", line 18, in <module> N, K = MI() ^^^^ ValueError: not enough values to unpack (expected 2, got 0)
s901503904
p02549
u525302207
1600548496
Python
Python (3.8.2)
py
Runtime Error
32
9184
402
mod = 998244353 n,k = map(int,input().split()) t = [False] * 20 for i in range(k): l,r = map(int,input().split()) for j in range(l,r+1,1): t[j] = True s = [] for i,v in enumerate(t): if v == True: s.append(i) dp = [0] * (n+5) dp[1] = 1 for i in range(2,n+1,1): for d in s: if...
Traceback (most recent call last): File "/tmp/tmpgw4esfok/tmp6ovnz01m.py", line 2, in <module> n,k = map(int,input().split()) ^^^^^^^ EOFError: EOF when reading a line
s622361908
p02549
u932758529
1600548441
Python
PyPy3 (7.3.0)
py
Runtime Error
2208
98576
492
from sys import stdin #再起? CON = 998244353 cnt = 0 def move(N, S): global cnt if N == 0: cnt += 1 #print('ok') return elif N < 0: return else: for x in S: #print(x) move(N-x, S) S = set() N, K = [int(x) for x in stdin.readline().rstrip().sp...
Traceback (most recent call last): File "/tmp/tmpreu05dx8/tmperd22t4n.py", line 18, in <module> N, K = [int(x) for x in stdin.readline().rstrip().split()] ^^^^ ValueError: not enough values to unpack (expected 2, got 0)
s329975212
p02549
u617515020
1600548358
Python
PyPy3 (7.3.0)
py
Runtime Error
92
68764
287
import numpy as np P=998244353 N,K=map(int,input().split()) LR=[] for _ in range(K): l,r=map(int,input().split()) LR+=range(l,r+1) LR=list(set(LR)) LR=np.array(LR) c=[0]*N c[0]=1 for k in range(N): S=list(LR[LR<=k]) while len(S): c[k]+=c[k-S[-1]]%P S.pop() print(c[-1]%P)
Traceback (most recent call last): File "/tmp/tmpoch08487/tmp8ahbh7t2.py", line 3, in <module> N,K=map(int,input().split()) ^^^^^^^ EOFError: EOF when reading a line
s914623720
p02549
u856519712
1600548330
Python
Python (3.8.2)
py
Runtime Error
2206
17668
482
# -*- coding: utf-8 -*- N, K = map(int, input().split()) D = [] S = [] T = [] mod = 998244353 for i in range(K): D.append(list(map(int, input().split()))) while(D[i][0] <= D[i][1]): S.append(D[i][0]) D[i][0] += 1 def func(x,S,T): for i in range(len(T)): if x == T[i][0]: return T[i][1] count =...
Traceback (most recent call last): File "/tmp/tmpb0wax6zy/tmpnypgxhpd.py", line 2, in <module> N, K = map(int, input().split()) ^^^^^^^ EOFError: EOF when reading a line
s632149337
p02549
u932758529
1600548267
Python
PyPy3 (7.3.0)
py
Runtime Error
2208
105520
490
from sys import stdin #再起? cnt = 0 def move(N, S): global cnt if N == 0: cnt += 1 cnt %= 998244353 #print('ok') return elif N < 0: return else: for x in S: #print(x) move(N-x, S) S = set() N, K = [int(x) for x in stdin.readline().rs...
Traceback (most recent call last): File "/tmp/tmp92xbs69i/tmpetj4a48a.py", line 18, in <module> N, K = [int(x) for x in stdin.readline().rstrip().split()] ^^^^ ValueError: not enough values to unpack (expected 2, got 0)
s160354367
p02549
u035210736
1600548247
Python
Python (3.8.2)
py
Runtime Error
2206
9404
258
n, k = map(int, input().split()) a = list(set(sum([list(map(int, input().split())) for i in range(k)], []))) def dfs(i): cnt = 0 if i > n: return 0 elif i == n: return 1 for x in a: cnt += dfs(i+x) return cnt print(dfs(1) % 998244353)
Traceback (most recent call last): File "/tmp/tmp9d300b8s/tmpo0oyu8st.py", line 1, in <module> n, k = map(int, input().split()) ^^^^^^^ EOFError: EOF when reading a line
s033016257
p02549
u465284486
1600548211
Python
PyPy3 (7.3.0)
py
Runtime Error
2208
95224
916
from collections import deque import bisect N, K = list(map(int, input().split(" "))) S = [] for _ in range(K): a, b = list(map(int, input().split(" "))) S.extend(range(a, b+1)) combinations = [0] * (N + 1) combinations[1] = 1 checked = [False] * (N + 1) S.sort() next_node = [] for i in S: next_node.appe...
Traceback (most recent call last): File "/tmp/tmpsas5xzt_/tmpcei7eiyb.py", line 4, in <module> N, K = list(map(int, input().split(" "))) ^^^^^^^ EOFError: EOF when reading a line