s_id
stringlengths
10
10
p_id
stringlengths
6
6
u_id
stringlengths
10
10
date
stringlengths
10
10
language
stringclasses
1 value
original_language
stringclasses
11 values
filename_ext
stringclasses
1 value
status
stringclasses
1 value
cpu_time
stringlengths
1
5
memory
stringlengths
1
7
code_size
stringlengths
1
6
code
stringlengths
1
539k
s742767658
p03504
u988402778
1561001395
Python
Python (3.4.3)
py
Runtime Error
18
3064
1119
import sys from itertools import accumulate # set test data sys.stdin = open('sample.txt') # for test # functions used r = lambda: sys.stdin.readline().strip() #single: int(r()), line: map(int, r().split()) R = lambda: list(map(int, r().split())) # line: R(), lines: [R() for _ in range(n)] Rmap = lambda: map(int, r()...
s770417676
p03504
u988402778
1560944522
Python
Python (3.4.3)
py
Runtime Error
18
3064
782
from itertools import accumulate # functions used r = lambda: sys.stdin.readline().strip() #single: int(r()), line: map(int, r().split()) R = lambda: list(map(int, r().split())) # line: R(), lines: [R() for _ in range(n)] Rmap = lambda: map(int, r().split()) # set inputs N, C = R() STC = [R() for _ in range(N)] tbl = ...
s964831511
p03504
u603745966
1560050709
Python
PyPy3 (2.4.0)
py
Runtime Error
613
67672
2515
from functools import reduce import math import collections def main(): # 文字列の2進数を数値にする # '101' → '5' # 文字列の頭に'0b'をつけてint()にわたす # binary = int('0b'+'101',0) # 2進数で立っているbitを数える # 101(0x5) → 2 # cnt_bit = bin(5).count('1') # N! を求める # f = math.factorial(N) # N の逆元 # N_i...
s734768290
p03504
u603745966
1560050643
Python
Python (3.4.3)
py
Runtime Error
373
12404
2515
from functools import reduce import math import collections def main(): # 文字列の2進数を数値にする # '101' → '5' # 文字列の頭に'0b'をつけてint()にわたす # binary = int('0b'+'101',0) # 2進数で立っているbitを数える # 101(0x5) → 2 # cnt_bit = bin(5).count('1') # N! を求める # f = math.factorial(N) # N の逆元 # N_i...
s345936265
p03504
u603745966
1560050558
Python
Python (3.4.3)
py
Runtime Error
364
12416
2511
from functools import reduce import math import collections def main(): # 文字列の2進数を数値にする # '101' → '5' # 文字列の頭に'0b'をつけてint()にわたす # binary = int('0b'+'101',0) # 2進数で立っているbitを数える # 101(0x5) → 2 # cnt_bit = bin(5).count('1') # N! を求める # f = math.factorial(N) # N の逆元 # N_i...
s547896920
p03504
u603745966
1560050188
Python
Python (3.4.3)
py
Runtime Error
890
25664
2516
from functools import reduce import math import collections def main(): # 文字列の2進数を数値にする # '101' → '5' # 文字列の頭に'0b'をつけてint()にわたす # binary = int('0b'+'101',0) # 2進数で立っているbitを数える # 101(0x5) → 2 # cnt_bit = bin(5).count('1') # N! を求める # f = math.factorial(N) # N の逆元 # N_i...
s365961955
p03504
u310678820
1559914072
Python
Python (3.4.3)
py
Runtime Error
18
3064
567
N, C = map(int, input().split()) num = 10#**5+1 count = [0]*(num) channel = [0]*num for i in range(N): s, t, c = map(int, input().split()) print(count) if channel[s]==c and channel[t-1]==c: count[s]+=1 count[t-1]-=1 elif channel[s]==c:#はじめ=終わり count[s]+=1 count[t]-=1 ...
s631359553
p03504
u310678820
1559912873
Python
Python (3.4.3)
py
Runtime Error
17
3064
223
N, C = map(int, input().split()) num = 10*5+1 count = [0]*(num) for i in range(N): s, t, c = map(int, input().split()) count[s-1]+=1 count[t]-=1 for i in range(1, num): count[i]+=count[i-1] print(max(count))
s088553764
p03504
u947883560
1559211361
Python
Python (3.4.3)
py
Runtime Error
190
14988
948
#!/usr/bin/env python3 import sys from itertools import accumulate INF = float("inf") def solve(N: int, C: int, s: "List[int]", t: "List[int]", c: "List[int]"): # いもす法 seq = [0]*(2*10**5) for sv, tv, cv in zip(s, t, c): seq[2*sv-1] += 1 seq[2*tv] -= 1 acc = list(accumulate(seq)) # ...
s922320247
p03504
u947883560
1559211032
Python
Python (3.4.3)
py
Runtime Error
182
13456
944
#!/usr/bin/env python3 import sys from itertools import accumulate INF = float("inf") def solve(N: int, C: int, s: "List[int]", t: "List[int]", c: "List[int]"): # いもす法 seq = [0]*(10**5+1) for sv, tv, cv in zip(s, t, c): seq[sv] += 1 seq[tv+1] -= 1 acc = list(accumulate(seq)) # prin...
s388141453
p03504
u947883560
1559210989
Python
Python (3.4.3)
py
Runtime Error
176
13444
942
#!/usr/bin/env python3 import sys from itertools import accumulate INF = float("inf") def solve(N: int, C: int, s: "List[int]", t: "List[int]", c: "List[int]"): # いもす法 seq = [0]*(10**5) for sv, tv, cv in zip(s, t, c): seq[sv] += 1 seq[tv+1] -= 1 acc = list(accumulate(seq)) # print(...
s662186583
p03504
u123756661
1558821894
Python
Python (3.4.3)
py
Runtime Error
538
17788
773
n,c=map(int,input().split()) d=[[] for i in range(c)] w=[0]*100002 for i in range(n): s,t,x=map(int,input().split()) d[x-1].append((s,t)) for i in range(c): d[i].sort() e=0 for j in range(len(d[i])): if len(d[i])==1: w[d[i][0][0]]+=1 w[d[i][0][1]+1]-=1 elif j...
s682518068
p03504
u123756661
1558821681
Python
PyPy3 (2.4.0)
py
Runtime Error
834
55000
773
n,c=map(int,input().split()) d=[[] for i in range(c)] w=[0]*100002 for i in range(n): s,t,x=map(int,input().split()) d[x-1].append((s,t)) for i in range(c): d[i].sort() e=0 for j in range(len(d[i])): if len(d[i])==1: w[d[i][0][0]]+=1 w[d[i][0][1]+1]-=1 elif j...
s191851276
p03504
u123756661
1558821111
Python
PyPy3 (2.4.0)
py
Runtime Error
839
55000
829
n,c=map(int,input().split()) d=[[] for i in range(c)] w=[0]*100001 for i in range(n): s,t,x=map(int,input().split()) d[x-1].append((s,t)) for i in range(c): d[i].sort() e=0 for j in range(len(d[i])): if len(d[i])==1: w[d[i][0][0]]+=1 w[d[i][0][1]+1]-=1 elif j=...
s706550804
p03504
u123756661
1558818271
Python
PyPy3 (2.4.0)
py
Runtime Error
854
55000
839
n,c=map(int,input().split()) d=[[] for i in range(c)] w=[0]*100001 for i in range(n): s,t,c=map(int,input().split()) d[c-1].append((s,t)) for i in range(c): d[i].sort() e=d[i][0][1] for j in range(len(d[i])): if len(d[i])==1: w[d[i][0][0]]+=1 w[d[i][0][1]+1]-=1 ...
s307989094
p03504
u187205913
1557675900
Python
PyPy3 (2.4.0)
py
Runtime Error
613
71128
288
n,c = map(int,input().split()) l = [[0]*(10**5+1) for _ in range(c+1)] for _ in range(n): s,t,c = map(int,input().split()) for i in range(s,t+1): l[c-1][i] = 1 ans = [0]*10**5 for i in range(len(l)): for j in range(len(l[i])): ans[j] += l[i][j] print(max(ans))
s733291272
p03504
u187205913
1557664497
Python
PyPy3 (2.4.0)
py
Runtime Error
648
70232
282
n,c = map(int,input().split()) l = [[0]*10**5 for _ in range(c)] for _ in range(n): s,t,c = map(int,input().split()) for i in range(s,t+1): l[c-1][i] = 1 ans = [0]*10**5 for i in range(len(l)): for j in range(len(l[i])): ans[j] += l[i][j] print(max(ans))
s425276677
p03504
u187205913
1557664208
Python
PyPy3 (2.4.0)
py
Runtime Error
174
38640
340
n = int(input()) ans = 0 def make_divisors(n): divisors = [] for i in range(1, int(n**0.5)+1): if n % i == 0: divisors.append(i) if i != n // i: divisors.append(n//i) return divisors div = make_divisors(n) for i in div[1:]: if n//(i-1)==n%(i-1): an...
s670113659
p03504
u077337864
1557200119
Python
Python (3.4.3)
py
Runtime Error
449
18272
498
from heapq import heapify, heappush, heappop n, c = map(int, input().split()) stc = [] for _ in range(n): s, t, c = map(int, input().split()) stc.append((s, t, c)) stc.sort() ans = 1 recl = [(stc[0][1], stc[0][2])] for s, t, c in stc[1:]: endr = heappop(recl) if c == endr[1]: heappush(recl, (t, c)) else...
s347498708
p03504
u938812966
1557007521
Python
Python (3.4.3)
py
Runtime Error
542
21696
436
N,C=map(int, input().split()) Z=[[] for _ in range(C+1)] for _ in range(N): s,t,c = map(int, input().split()) Z[c].append([s,t]) Y=[] for z in [sorted(z) for z in Z if len(z) > 0]: for i in range(len(z)-1): if z[i][1] == z[i+1][0]: z[i+1][0] = z[i][0] else: Y.append(z[i]) Y.append(z.pop()) X=[0 for _ i...
s201377696
p03504
u734548018
1556644861
Python
Python (3.4.3)
py
Runtime Error
192
28212
436
# /usr/bin/python # -*- coding: utf-8 -*- import sys import math ## input N,C = map(int, input().split()) Cn = [[0 for j in range(10**5+1)] for i in range(C)] An = [0 for j in range(10**5*2+1)] for i in range(N): s,t,c = map(int, input().split()) if Cn[c-1][s*2] == -1: An[s*2] += 1 else: An[s*2-1] += 1 ...
s100245110
p03504
u533885955
1556425510
Python
Python (3.4.3)
py
Runtime Error
428
14204
486
#D問題 N,C=map(int,input().split()) S=[] T=[] C=[] for i in range(N): s,t,c=map(int,input().split()) S.append(s) T.append(t) C.append(c) SMAX=max(S) TMAX=max(T) Scount=[0 for i in range(SMAX+2)] Tcount=[0 for i in range(TMAX+2)] for i in range(N): Scount[S[i]]+=1 Tcount[T[i]]+=1 count=[] for i in ...
s955181070
p03504
u059210959
1556174879
Python
Python (3.4.3)
py
Runtime Error
578
23384
880
N,C = map(int,input().split()) tv_times = [[int(j) for j in input().split()] for i in range(N)] channells = {} for i in range(C+1): channells[i] = [] max_end = -1 for i in range(N): s,g,c = tv_times[i] max_end = max(max_end,g) channells[c] += [s,g] tv_times = [] f = [0 for i in range(max_end+1)] for ...
s721199378
p03504
u059210959
1556174753
Python
Python (3.4.3)
py
Runtime Error
568
23384
831
N,C = map(int,input().split()) tv_times = [[int(j) for j in input().split()] for i in range(N)] channells = {} for i in range(C+1): channells[i] = [] max_end = -1 for i in range(N): s,g,c = tv_times[i] max_end = max(max_end,g) channells[c] += [s,g] tv_times = [] f = [0 for i in range(max_end+1)] for ...
s578187250
p03504
u059210959
1556174718
Python
Python (3.4.3)
py
Runtime Error
565
24544
829
N,C = map(int,input().split()) tv_times = [[int(j) for j in input().split()] for i in range(N)] channells = {} for i in range(C+1): channells[i] = [] max_end = -1 for i in range(N): s,g,c = tv_times[i] max_end = max(max_end,g) channells[c] += [s,g] tv_times = [] f = [0 for i in range(max_end+1)] for ...
s187125670
p03504
u059210959
1556173724
Python
Python (3.4.3)
py
Runtime Error
565
23384
880
N,C = map(int,input().split()) tv_times = [[int(j) for j in input().split()] for i in range(N)] channells = {} for i in range(C+1): channells[i] = [] max_end = -1 for i in range(N): s,g,c = tv_times[i] max_end = max(max_end,g) channells[c] += [s,g] tv_times = [] f = [0 for i in range(max_end+1)] for ...
s628258052
p03504
u103902792
1556152194
Python
Python (3.4.3)
py
Runtime Error
1030
244396
533
import collections n,c = map(int,input().split()) channels = [list(map(int,input().split())) for i in range(n)] print(channels) channel_set = [list(range(i[0],i[1]+1)) for i in channels] channels = [] for ch in channel_set: channels.extend(ch) ...
s939009090
p03504
u497596438
1556074590
Python
PyPy3 (2.4.0)
py
Runtime Error
584
65112
464
N,C=map(int,input().split()) T=10**5+2 sm=[0]*(T) l=[] r=[] c=[] for i in range(N): s,t,k=map(int,input().split()) l.append(s) r.append(t) c.append(k) for i in range(1,C+1): tt=[0]*T for j in range(N): if c[j]==i: tt[l[j]*2]+=1 tt[r[j]*2+1]-=1 for j in range(T...
s173800329
p03504
u075012704
1555368803
Python
PyPy3 (2.4.0)
py
Runtime Error
724
119896
462
from itertools import accumulate N, C = map(int, input().split()) TimeTable = [[0] * (10 ** 5 + 1) for i in range(C + 1)] for i in range(N): s, t, c = map(int, input().split()) TimeTable[c][s] += 1 TimeTable[c][t + 1] -= 1 for c in range(C + 1): TimeTable[c] = list(accumulate(TimeTable[c])) ans = 0 f...
s847130590
p03504
u977389981
1553468794
Python
Python (3.4.3)
py
Runtime Error
457
22048
434
N, C = map(int, input().split()) STC = [[int(i) for i in input().split()] for i in range(N)] STC.sort() R = [[STC[0][1], STC[0][2]]] for s, t, c in STC[1:]: for i in range(len(R)): R[i][0], R[i][1] = t_r, c_r if c == c_r and t_r <= s: R[i] = [t, c] break if c != c_r ...
s527508734
p03504
u977389981
1553459069
Python
Python (3.4.3)
py
Runtime Error
728
131492
375
N, C = map(int, input().split()) A = [[] for i in range(C + 1)] for i in range(N): s, t, c = map(int, input().split()) A[c].extend(list(range(s - 1, t + 1))) dp = [0] * (10 ** 5 + 1) for a in A: if a == []: continue a.sort() dp[a[0]] += 1 dp[a[-1] + 1] -= 1 for i in range(1, 1...
s187526226
p03504
u977389981
1553442289
Python
Python (3.4.3)
py
Runtime Error
1905
27380
399
N, C = map(int, input().split()) A = [[0] * (10 ** 5 + 1) for i in range(C + 1)] for i in range(N): s, t, c = map(int, input().split()) A[c][s] += 1 A[c][t + 1] -= 1 for i in range(C + 1): for j in range(1, 10 ** 5 + 1): A[i][j] += A[i][j - 1] for j in range(10 ** 5 + 1): for ...
s919138343
p03504
u393512980
1552975169
Python
Python (3.4.3)
py
Runtime Error
20
3064
466
N = int(input()) F = [list(map(int, input().split())) for _ in range(N)] P = [list(map(int, input().split())) for _ in range(N)] ans = -float("inf") for i in range(1, 2 ** 10): b, s = i, 0 cnt = [0 for _ in range(N)] while b > 0: if b & 1: for j in range(N): cnt[j] += F[j...
s743226945
p03504
u585482323
1552974109
Python
PyPy3 (2.4.0)
py
Runtime Error
526
118216
1872
#!usr/bin/env python3 from collections import defaultdict from collections import deque from heapq import heappush, heappop import sys import math import bisect import random def LI(): return list(map(int, sys.stdin.readline().split())) def I(): return int(sys.stdin.readline()) def LS():return list(map(list, sys.stdin....
s246853643
p03504
u585482323
1552965291
Python
PyPy3 (2.4.0)
py
Runtime Error
611
133680
1407
#!usr/bin/env python3 from collections import defaultdict from collections import deque from heapq import heappush, heappop import sys import math import bisect import random def LI(): return list(map(int, sys.stdin.readline().split())) def I(): return int(sys.stdin.readline()) def LS():return list(map(list, sys.stdin....
s486675178
p03504
u785578220
1552825869
Python
Python (3.4.3)
py
Runtime Error
581
23644
577
inf = float("INF") from operator import itemgetter a,b=map(int,input().split()) d = [0]*(2*(10**5)+10) dp = [] for i in range(a): ts,tf,c =map(int,input().split()) dp.append([ts,tf,c]) dp = sorted(dp, key=itemgetter(2)) for i in range(1,a): if dp[i][0] == dp[i-1][1] and dp[i][2] == dp[i-1][2]: dp[i...
s942602887
p03504
u001024152
1550958233
Python
Python (3.4.3)
py
Runtime Error
376
3956
244
# D N,C = map(int, input().split()) T_MAX = int(1e5) t = [0]*(T_MAX+1) for _ in range(N): si,ti,ci = map(int, input().split()) t[si-1] += 1 t[ti+1] -= 1 ans = 1 wa = 0 for ti in t: wa += ti ans = max(ans, wa) print(ans)
s152185296
p03504
u634208461
1550613888
Python
Python (3.4.3)
py
Runtime Error
545
29088
244
N, C = map(int, input().split()) query = [list(map(int, input().split())) for _ in range(N)] time = [0 for _ in range(2 * 10 ** 5)] for q in query: s, t = q[:2] for i in range(2 * s - 1, 2 * t + 1): time[i] += 1 print(max(time))
s153859051
p03504
u785578220
1550087263
Python
Python (3.4.3)
py
Runtime Error
470
4596
248
a,b=map(int,input().split()) d = [0]*(2*(10**5)) for i in range(a): ts,tf,c =map(int,input().split()) d[(ts-1)*2]+=1 d[(tf-1)*2+2]-=1 M = 0 for i in range(len(d)): if i > 0: d[i] = d[i-1]+d[i] M = max(M,d[i]) print(M)
s182853935
p03504
u983918956
1549942372
Python
Python (3.4.3)
py
Runtime Error
518
36328
433
import itertools N,C = map(int,input().split()) imos = [0]*(50) info = [list(map(int,input().split())) for i in range(N)] info = sorted(info,key=lambda x:(x[2],x[0])) note = -1 before_t = -1 for i in range(N): s,t,c = info[i] s -= 1 if c == note and s < before_t: s = before_t imos[s] += 1 im...
s620640367
p03504
u983918956
1549942320
Python
Python (3.4.3)
py
Runtime Error
514
36328
445
import itertools N,C = map(int,input().split()) imos = [0]*(50) info = [list(map(int,input().split())) for i in range(N)] info = sorted(info,key=lambda x:(x[2],x[0])) note = -1 before_t = -1 for i in range(N): s,t,c = info[i] s -= 1 if c == note and s < before_t: s = before_t imos[s] += 1 im...
s871142850
p03504
u309977459
1548110183
Python
PyPy3 (2.4.0)
py
Runtime Error
853
119896
479
from itertools import accumulate N, C = map(int, input().split()) STC = [list(map(int, input().split())) for _ in range(N)] M = 10**5 merge = [[0]*(M+1) for _ in range(31)] for i in range(N): s, t, c = STC[i] merge[c][s] += 1 merge[c][t+1] -= 1 for c in range(31): merge[c] = list(map(lambda x: int(bool...
s141152393
p03504
u682730715
1547615200
Python
Python (3.4.3)
py
Runtime Error
537
25244
725
# coding: UTF-8 import sys #sys.setrecursionlimit(n) import heapq import re import bisect import random import math import itertools from collections import defaultdict, deque from copy import deepcopy from decimal import * N, C = map(int, input().split()) stc = [[int(i) for i in input().split()] for _ in range(N)] s...
s288023054
p03504
u785989355
1547413533
Python
Python (3.4.3)
py
Runtime Error
1832
7904
451
N,C = list(map(int,input().split())) prog = [[] for i in range(C)] for i in range(N): s,t,c = list(map(int,input().split())) prog[c].append([s,t]) ttable = [0 for i in range(2*(10**5)+2)] for i in range(C): table = [0 for i in range(2*(10**5)+2)] for p in prog[i]: table[2*p[0]-1]+= 1 ...
s577694900
p03504
u054106284
1544478196
Python
PyPy3 (2.4.0)
py
Runtime Error
385
65260
381
import sys input = sys.stdin.readline N, C = (int(i) for i in input().split()) pp = [[0] * 100000 for i in range(C)] for i in range(N): s, t, c = (int(i) for i in input().split()) for j in range(s, t+1): pp[c-1][j] = 1 res = 0 for i in range(100000): cc = 0 for j in range(C): if pp[j...
s468110496
p03504
u236127431
1542342571
Python
Python (3.4.3)
py
Runtime Error
2110
49408
380
N,C=map(int,input().split()) List=[[int(i) for i in input().split()] for i in range(N)] Time=[[0]*(10**5+1)]*C for i in range(N): T_c=list(Time[List[i][2]-1]) T_c[List[i][0]-1:List[i][1]]=[1]*(List[i][1]-List[i][0]+1) Time[List[i][2]-1]=list(T_c) T=0 T_max=0 for t in range(10**5): for c in range(C): T+=Time...
s461357101
p03504
u368780724
1541251591
Python
Python (3.4.3)
py
Runtime Error
2105
22860
700
def inpl(): return [int(i) for i in input().split()] N, C = inpl() channel = [[] for _ in range(C)] for i in range(N): s, t, c = inpl() channel[c-1].append([s,t]) H = [0 for i in range(10**5+3)] for i in range(C): channel[i].sort(key = lambda x: x[0]) for j in range(len(channel[i])-1): if channe...
s026769037
p03504
u368780724
1541250996
Python
Python (3.4.3)
py
Runtime Error
658
22948
702
def inpl(): return [int(i) for i in input().split()] N, C = inpl() channel = [[] for _ in range(C)] for i in range(N): s, t, c = inpl() channel[c-1].append([s,t]) H = [0 for i in range(10**5+1)] for i in range(C): channel[i].sort(key = lambda x: x[0]) for j in range(len(channel[i])-1): if channe...
s623489561
p03504
u170201762
1540434904
Python
Python (3.4.3)
py
Runtime Error
593
33264
330
N,C = map(int,input().split()) cum = [0]*(10**5+1) d = {} for i in range(10**5): d[i] = [] for i in range(N): s,t,c = map(int,input().split()) if c not in d[s]: cum[s-1] += 1 cum[t] -= 1 else: cum[s] += 1 cum[t] -= 1 d[t].append(c) import numpy as np print(np.cumsum(c...
s425458015
p03504
u827202523
1539820170
Python
Python (3.4.3)
py
Runtime Error
386
4772
414
def getN(): return int(input()) def getMN(): a = input().split() b = [int(i) for i in a] return b[0],b[1] def getlist(): a = input().split() b = [int(i) for i in a] return b n, cc = getMN() jikan = [0 for i in range(100001)] for i in range(n): s, t, c = getlist() jikan[s] += 1 ...
s946831887
p03504
u827202523
1539820097
Python
Python (3.4.3)
py
Runtime Error
20
3188
413
def getN(): return int(input()) def getMN(): a = input().split() b = [int(i) for i in a] return b[0],b[1] def getlist(): a = input().split() b = [int(i) for i in a] return b n, cc = getMN() jikan = [0 for i in range(10001)] for i in range(n): s, t, c = getlist() jikan[s] += 1 ...
s470391803
p03504
u232852711
1536816649
Python
Python (3.4.3)
py
Runtime Error
431
28972
304
T_MAX = 10**5 n, nc = list(map(int, input().split())) stc = [list(map(int, input().split())) for _ in range(n)] rec = [0]*(2*T_MAX+1) for i in range(n): s, t, c = stc[i] rec[2*s-1] += 1 rec[2*t+1] -= 1 for i in range(1, len(rec)): rec[i] += rec[i-1] # print(rec[:100]) print(max(rec))
s100335819
p03504
u620084012
1535632249
Python
Python (3.4.3)
py
Runtime Error
1544
26676
401
N, C = map(int, input().split()) T = [[0 for k in range(100000)] for l in range(C)] for k in range(N): s, t, c = map(int, input().split()) T[c-1][s-1] += 1 T[c-1][t] -= 1 for l in range(C): for k in range(1,100000): T[l][k] += T[l][k-1] ans = 0 for k in range(100000): t = 0 for l in ra...
s680606242
p03504
u620084012
1535632186
Python
Python (3.4.3)
py
Runtime Error
1638
26676
401
N, C = map(int, input().split()) T = [[0 for k in range(100000)] for k in range(C)] for k in range(N): s, t, c = map(int, input().split()) T[c-1][s-1] += 1 T[c-1][t] -= 1 for l in range(C): for k in range(1,100000): T[l][k] += T[l][k-1] ans = 0 for k in range(100000): t = 0 for l in ra...
s781869116
p03504
u828847847
1533991465
Python
Python (3.4.3)
py
Runtime Error
17
3064
279
n, c = map(int,raw_input().split()) arr = [[0 for i in range(c)] for j in range(10**5+1)] for i in range(n): s,t,ch = map(int,raw_input().split()) s -= 1 ch -= 1 for i in range(s,t): arr[i][ch] = 1 ans = 0 for i in range(10**5+1): ans = max(ans,sum(arr[i])) print ans
s056916888
p03504
u828847847
1533990752
Python
Python (3.4.3)
py
Runtime Error
17
3064
408
n,c = map(int,raw_input().split()) arr = [[0 for i in range((10**5+1))] for i in range(c)] for i in range(n): s,t,ch = map(int,raw_input().split()) arr[ch-1][s-1] = 1 arr[ch-1][t] = -1 for i in range(c): for j in range(1,(10**5+1)): arr[i][j] += arr[i][j-1] ans = 0 for i in range(((10**5+1))): count = 0 f...
s574457309
p03504
u828847847
1533990371
Python
Python (3.4.3)
py
Runtime Error
17
3064
271
n, c = map(int, input().split()) r = [[0 for i in range(c)] for j in range(100000)] for i in range(n): s, t, c = map(int, input().split()) for j in range(s - 1, t): r[j][c - 1] = 1 ans = 0 for i in range(100000): ans = max(ans,sum(r[i]) print(ans)
s558265641
p03504
u828847847
1533989360
Python
Python (2.7.6)
py
Runtime Error
2108
58412
423
n,c = map(int,raw_input().split()) arr = [[0 for i in range((10**5) * 2)] for i in range(c)] for i in range(n): s,t,ch = map(int,raw_input().split()) arr[ch-1][s*2-1] = 1 arr[ch-1][t*2] = -1 for i in range(c): for j in range(1,(10**5)*2): arr[i][j] = arr[i][j-1] + arr[i][j] ans = 0 for i in range((10**5*2))...
s113202327
p03504
u177398299
1532759435
Python
Python (3.4.3)
py
Runtime Error
18
3064
288
N, C = map(int, input().split()) r = [[0 for _ in range(C)] for _ in range(10 * 5)] for _ in range(N): s, t, c = map(int, input().split()) for i in range(s - 1, t): r[i][c - 1] = 1 ans = 0 for t in r: sum_t = sum(t) if sum_t > ans: ans = sum_t print(ans)
s831303131
p03504
u177398299
1532759088
Python
Python (3.4.3)
py
Runtime Error
17
3064
273
N, C = map(int, input().split()) r = [[0] * C for _ in range(10 * 5)] for _ in range(N): s, t, c = map(int, input().split()) for i in range(s - 1, t): r[i][c - 1] = 1 ans = 0 for t in r: sum_t = sum(t) if sum_t > ans: ans = sum_t print(ans)
s397961895
p03504
u177398299
1532758867
Python
Python (3.4.3)
py
Runtime Error
17
3064
273
N, C = map(int, input().split()) r = [[0] * C for _ in range(10 * 5)] for _ in range(N): s, t, c = map(int, input().split()) for i in range(s - 1, t): r[j][c - 1] = 1 ans = 0 for t in r: sum_t = sum(t) if sum_t > ans: ans = sum_t print(ans)
s058164860
p03504
u334712262
1532323920
Python
PyPy3 (2.4.0)
py
Runtime Error
740
82772
1348
# -*- coding: utf-8 -*- import bisect import heapq import math import random import sys from collections import Counter, defaultdict from decimal import ROUND_CEILING, ROUND_HALF_UP, Decimal from functools import lru_cache, reduce from itertools import combinations, combinations_with_replacement, product, permutations ...
s535958812
p03504
u334712262
1532323824
Python
PyPy3 (2.4.0)
py
Runtime Error
765
88916
1345
# -*- coding: utf-8 -*- import bisect import heapq import math import random import sys from collections import Counter, defaultdict from decimal import ROUND_CEILING, ROUND_HALF_UP, Decimal from functools import lru_cache, reduce from itertools import combinations, combinations_with_replacement, product, permutations ...
s443338993
p03504
u334712262
1532323805
Python
Python (3.4.3)
py
Runtime Error
446
31284
1345
# -*- coding: utf-8 -*- import bisect import heapq import math import random import sys from collections import Counter, defaultdict from decimal import ROUND_CEILING, ROUND_HALF_UP, Decimal from functools import lru_cache, reduce from itertools import combinations, combinations_with_replacement, product, permutations ...
s020479365
p03504
u415905784
1532317395
Python
Python (3.4.3)
py
Runtime Error
453
3888
181
N, C = map(int, input().split()) T = [0 for i in range(10 ** 5)] for i in range(N): s, t, c = map(int, input().split()) for j in range(s - 1, t + 1): T[j] += 1 print(max(T))
s811231874
p03504
u062147869
1529046419
Python
PyPy3 (2.4.0)
py
Runtime Error
925
62808
623
N,C =map(int,input().split()) chan=[[] for i in range(C)] for i in range(N): a,b,c=map(int,input().split()) chan[c-1].append([a,b]) for i in range(C): chan[i].sort() imos=[0]*(10**5+1) for i in range(C): if len(chan[i])==0: continue imos[chan[i][0][0]]+=1 imos[chan[i][0][1]+1]-=1 for...
s344561078
p03504
u941884460
1528555622
Python
Python (3.4.3)
py
Runtime Error
396
28188
245
N,C = map(int,input().split()) tvs = [list(map(int,input().split())) for x in range(N)] times = [0]*(pow(10,5)+2) for tv in tvs: times[tv[0]] += 1 times[tv[1]+1] -=1 for i in range(1,len(times)+1): times[i] += times[i-1] print(max(times))
s647599706
p03504
u941884460
1528555565
Python
Python (3.4.3)
py
Runtime Error
408
28184
243
N,C = map(int,input().split()) tvs = [list(map(int,input().split())) for x in range(N)] times = [0]*(pow(10,5)+1) for tv in tvs: times[tv[0]] += 1 times[tv[1]+1] -=1 for i in range(1,len(times)): times[i] += times[i-1] print(max(times))
s863026655
p03504
u957084285
1527381405
Python
Python (3.4.3)
py
Runtime Error
39
4084
208
l = [0]*(10**5+10) n, c = map(int, input().split()) for _ in range(n): s, t, c = map(int, input().split()) l[s*2-1] += 1 l[t*2] -= 1 for i in range(1, len(l)): l[i] += l[i-1] print(max(l))
s347222099
p03504
u249895018
1525672758
Python
Python (3.4.3)
py
Runtime Error
467
22732
309
n,c = map(int, input().split()) a = [] for i in range(n): a.append([x for x in map(int, input().split())]) result = [0] * 200005 for _s in a: result[_s[0]*2-1]+=1 result[_s[1]*2] += -1 for i in range(1, len(result)+1, 1): result[i] = result[i] + result[i-1] ans = max(result) print(ans)
s618807423
p03504
u941884460
1520705936
Python
Python (3.4.3)
py
Runtime Error
18
3188
430
N,C=map(int,input().split()) chan = '' max1 = 0 for x in range(C): chan = chan + '0' reserv = {} for i in range(N): tmp = input().split() s,t,c=int(tmp[0]),int(tmp[1]),int(tmp[2]) for j in range(s,t+1): if j in reserv: work = list(reserv[j]) max1 = max(max1,1 + reserv[j].count('1')) else: ...
s580723768
p03504
u941884460
1520705430
Python
Python (3.4.3)
py
Runtime Error
1628
13520
357
N,C=map(int,input().split()) chan = '' max1 = 0 for x in range(C): chan = chan + '0' reserv = [chan]*pow(10,5) for i in range(N): tmp = input().split() s,t,c=int(tmp[0]),int(tmp[1]),int(tmp[2]) for j in range(s,t+1): work = list(reserv[j]) work[(c-1)] = '1' reserv[j] = "".join(work) max1 = max(m...
s868210601
p03504
u075012704
1517889676
Python
Python (3.4.3)
py
Runtime Error
459
26660
625
import numpy as np N, C = map(int, input().split()) STC = [tuple(map(int, input().split())) for i in range(N)] # 0.5秒から10万秒まで0.5秒区切り time = np.array([np.zeros(30) for i in range(C)]) # STC処理 for s, t, c in STC: # c-1でチャンネル番号ごとのtimeにアクセス if time[c-1][2*s] != 0: time[c-1][2*s] = 0 else: tim...
s819977872
p03504
u590048048
1516371246
Python
Python (3.4.3)
py
Runtime Error
634
20476
758
def getter(starts, ends): while starts: if starts[-1][0] < ends[-1][1]: yield (starts.pop(), True) else: yield (ends.pop(), False) def foo(targets): starts = sorted(targets, key=lambda x:x[0], reverse=True) ends = sorted(targets, key=lambda x: x[1], reverse=True) ...
s267848100
p03504
u865741247
1516315530
Python
Python (3.4.3)
py
Runtime Error
440
4596
386
temp_in=input() temp_in=temp_in.split(" ") temp_in=list(map(int,temp_in)) a,b=temp_in times=[0]*(10**5+1) times_sum=[0]*(10**5+1) for i in range(a): temp_in=input() temp_in=temp_in.split(" ") temp_in=list(map(int,temp_in)) times[temp_in[0]]+=1 times[temp_in[1]+1]-=1 for i in range(len(times_sum)-1):...
s744914348
p03504
u323626540
1512881545
Python
Python (3.4.3)
py
Runtime Error
1185
28916
299
N, C = map(int, input().split()) f = [[0] * 100000 for _ in range(C)] for i in range(N): s, t, c = map(int, input().split()) f[c-1][s-1] = 1 f[c-1][t] = -1 for c in range(C): for i in range(100000): if i > 0: f[c][i] += f[c][i-1] print(max(map(sum, zip(*f))))
s399546289
p03504
u667084803
1512789491
Python
Python (3.4.3)
py
Runtime Error
418
6132
246
N,C=map(int,input().split()) imos=[0]*(2*10**5) for i in range(N): s,t,c=map(int,input().split()) imos[2*s-1]+=1 imos[2*t]-=1 channels=[imos[0]]*(2*10**5) for i in range(2*10**5-1): channels[i+1]=channels[i]+imos[i+1] print(max(channels))
s974081407
p03504
u667084803
1512789126
Python
Python (3.4.3)
py
Runtime Error
380
4596
236
N,C=map(int,input().split()) imos=[0]*(10**5) for i in range(N): s,t,c=map(int,input().split()) imos[s-1]+=1 imos[t]-=1 channels=[imos[0]]*(10**5) for i in range(10**5-1): channels[i+1]=channels[i]+imos[i+1] print(max(channels))
s888967148
p03504
u941884460
1512733067
Python
Python (3.4.3)
py
Runtime Error
2106
54392
382
tmp = input().rstrip().split() N = int(tmp[0]) list = {} count = {} for i in range(N): work = input().rstrip().split() for j in range(int(work[0]),int(work[1])+1): if j not in list: list[j] = [work[2]] elif work[2] not in list[j]: list[j].append(work[2]) c...
s054967721
p03504
u941884460
1512731650
Python
Python (3.4.3)
py
Runtime Error
2106
45832
482
tmp = input().rstrip().split() N = int(tmp[0]) list = [[] for x in range(100000)] count = [0]*100000 load = [] for y in range(N): work = input().rstrip().split() load.append(work) load.sort() for z in range(int(load[0][0]),int(load[N-1][1])+1): for i in range(N): if z >= int(load[i][0]) and z <= ...
s729437375
p03504
u941884460
1512729729
Python
Python (3.4.3)
py
Runtime Error
857
19504
346
tmp = input().rstrip().split() N = int(tmp[0]) list = [[] for x in range(100001)] count = [0]*100000 for i in range(N): work = input().rstrip().split() for i in range(int(work[0]),int(work[1])+1): if int(work[2]) not in list[i]: list[i].append(int(work[2])) count[i] += 1 ...
s067628276
p03504
u941884460
1512729623
Python
Python (3.4.3)
py
Runtime Error
860
19480
345
tmp = input().rstrip().split() N = int(tmp[0]) list = [[] for x in range(100000)] count = [0]*100000 for i in range(N): work = input().rstrip().split() for i in range(int(work[0]),int(work[1])+1): if int(work[2]) not in list[i]: list[i].append(int(work[2])) count[i] += 1 ...
s517894991
p03504
u635277286
1512723564
Python
Python (3.4.3)
py
Runtime Error
2104
5740
1115
def popcount(n): res=0 while n > 0: res += n % 2; n //= 2 return res n=0 def init_seg(_n): global n n = 1 while n < _n: n *= 2 MAX_N=131072 data=[0]*MAX_N datb=[0]*MAX_N def add(a, b, x, k, l, r): if a <=l and r <= b: data[k] += x elif l < b and a < r: datb[k] += (min(b,r) - max(a,l))*x add(a, b, x...
s387060859
p03504
u635277286
1512685942
Python
Python (3.4.3)
py
Runtime Error
18
2940
890
def popcount(n): res=0 while n > 0: res += n%2; n /= 2 return res n=0 def init_seg(_n): n=1 while(n < _n) n *= 2 data=[0]*n datb=[0]*n def add(a,b,x,k,l,r): if a <=l and r <= b: data[k] += x else: datb[k] += (min(b,r) - max(a,l))*x add(a,b,x,2*k+1,l,(l+r)/2) add(a,b,x,2*k+2,(l+r)/2,r) def sum(a,b,...
s206220862
p03504
u635277286
1512685851
Python
Python (3.4.3)
py
Runtime Error
17
2940
890
def popcount(n): res=0 while n > 0: res += n%2; n /= 2 return res n=0 def init_seg(_n): n=1 while(n < _n) n *= 2 data=[0]*n datb=[0]*n def add(a,b,x,k,l,r): if a <=l and r <= b: data[k] += x else: datb[k] += (min(b,r) - max(a,l))*x add(a,b,x,2*k+1,l,(l+r)/2) add(a,b,x,2*k+2,(l+r)/2,r) def sum(a,b,...
s560891365
p03504
u075012704
1512680881
Python
Python (3.4.3)
py
Runtime Error
333
18828
398
N, C = map(int, input().split()) timeTable = [tuple(map(int, input().split())) for i in range(N)] sutyoku = [[] for i in range(20003)] for s,t,c in timeTable: if s == 0: for i in range(2*t): sutyoku[i].append(c) else: for i in range(2*s-1,2*t): sutyoku[i].append(c) su_...
s583564586
p03504
u075012704
1512680632
Python
Python (3.4.3)
py
Runtime Error
333
21996
380
N, C = map(int, input().split()) timeTable = [tuple(map(int, input().split())) for i in range(N)] sutyoku = [{0} for i in range(20003)] for s,t,c in timeTable: if s == 0: for i in range(2*t): sutyoku[i].add(c) else: for i in range(2*s-1,2*t): sutyoku[i].add(c) ans = 0 ...
s912694642
p03504
u075012704
1512680489
Python
Python (3.4.3)
py
Runtime Error
327
21980
380
N, C = map(int, input().split()) timeTable = [tuple(map(int, input().split())) for i in range(N)] sutyoku = [set() for i in range(20002)] for s,t,c in timeTable: if s == 0: for i in range(2*t): sutyoku[i].add(c) else: for i in range(2*s-1,2*t): sutyoku[i].add(c) ans = ...
s058650727
p03504
u075012704
1512680404
Python
Python (3.4.3)
py
Runtime Error
340
22144
380
N, C = map(int, input().split()) timeTable = [tuple(map(int, input().split())) for i in range(N)] sutyoku = [set() for i in range(20003)] for s,t,c in timeTable: if s == 0: for i in range(2*t): sutyoku[i].add(c) else: for i in range(2*s-1,2*t): sutyoku[i].add(c) ans = ...
s316757986
p03504
u818655004
1512670721
Python
Python (3.4.3)
py
Runtime Error
358
12632
368
N, C = map(int, input().split()) s_list = [] t_list = [] c_list = [] for i in range(N): s_i, t_i, c_i = map(int, input().split()) s_list.append(s_i) t_list.append(t_i) c_list.append(c_i) time = [0 for i in range(max(t_list))] for i in range(N): rg = t_list[i]-s_list[i] for ii in range(N): ...
s466897595
p03504
u818655004
1512670547
Python
Python (3.4.3)
py
Runtime Error
363
12604
366
N, C = map(int, input().split()) s_list = [] t_list = [] c_list = [] for i in range(N): s_i, t_i, c_i = map(int, input().split()) s_list.append(s_i) t_list.append(t_i) c_list.append(c_i) time = [0 for i in range(max(t_list))] for i in range(N): rg = t_list[i]-s_list[i] for ii in range(N): ...
s136100913
p03504
u702582248
1512446953
Python
Python (3.4.3)
py
Runtime Error
2106
19028
744
def func(): tvs = [] for i in range(num): tvs.append((-1, -1)) for i in range(len(bans)): now = bans[i][0] can = bans[i][1] for j, tv in enumerate([tv for tv in tvs if tv[1] == can] + [tv for tv in tvs if tv[1 != can]]): if tv[1] == -1 or (tv[1] == can and tv[0] <...
s976938185
p03504
u925364229
1512404227
Python
Python (3.4.3)
py
Runtime Error
803
27380
682
L = 100005 n,c = map(int,input().split(" ")) # arr[col] には、区間の始まり ==> 1,区間中 ==> 0,区間終わり ==> -1 # 連続した区間は結合した形で表現される arr = [[0]*L for j in range(c)] for i in range(n): s,t,col = map(int,input().split(" ")) arr[col][s] += 1 arr[col][t] -= 1 imos = [0]*L #全チャンネルを同時に考えたいもす法 for i in range(c): for p in r...
s430283696
p03504
u925364229
1512404126
Python
Python (3.4.3)
py
Runtime Error
2108
245364
681
L = 1000000 n,c = map(int, input().split()) # arr[col] には、区間の始まり ==> 1,区間中 ==> 0,区間終わり ==> -1 # 連続した区間は結合した形で表現される arr = [[0]*L for j in range(c)] for i in range(n): s,t,col = map(int,input().split(" ")) arr[col][s] += 1 arr[col][t] -= 1 imos = [0]*L #全チャンネルを同時に考えたいもす法 for i in range(c): for p in ra...
s410443629
p03504
u925364229
1512404019
Python
Python (3.4.3)
py
Runtime Error
1365
29428
691
L = 100000 n,c = map(int, input().split()) # arr[col] には、区間の始まり ==> 1,区間中 ==> 0,区間終わり ==> -1 # 連続した区間は結合した形で表現される arr = [[0]*L for j in range(c)] for _ in range(n): s,t,col = map(lambda x:int(x)-1, input().split()) arr[col][s] += 1 arr[col][t] -= 1 imos = [0]*L #全チャンネルを同時に考えたいもす法 for i in range(c): f...
s025673252
p03504
u858748695
1512366999
Python
Python (3.4.3)
py
Runtime Error
393
3956
294
#!/usr/bin/env python3 N, C = map(int, input().split()) table = [0] * (10 ** 5 + 1) for i in range(N): s, t, c = map(int, input().split()) table[s] += 1 table[t + 1] -= 1 ans = 0 for i in range(1, 10 ** 5 + 1): table[i] += table[i - 1] ans = max(ans, table[i]) print(ans)
s395561421
p03504
u379340657
1512366631
Python
Python (3.4.3)
py
Runtime Error
2104
6484
1054
n,c = map(int, input().split()) queue = [[] for _ in range(c)] for _ in range(n): s,t,c = map(int, input().split()) if s*2 in queue[c-1]: i = queue[c-1].index(s*2) queue[c-1][i] = t*2 elif t*2-1 in queue[c-1]: i = queue[c-1].index(t*2-1) queue[c-1][i] = s*2-1 else: ...
s484822185
p03504
u858748695
1512365847
Python
Python (3.4.3)
py
Runtime Error
1382
37108
366
#!/usr/bin/env python3 N, C = map(int, input().split()) table = [[0] * C for i in range(10 ** 5)] for i in range(N): s, t, c = map(lambda x: int(x) - 1, input().split()) table[s][c] += 1 table[t + 1][c] -= 1 ans = 0 for i in range(1, 10 ** 5): for j in range(C): table[i][j] += table[i - 1][j] ...
s461218501
p03504
u379340657
1512360154
Python
Python (3.4.3)
py
Runtime Error
17
3064
808
n,c = map(int, input().split()) request = [[] for _ in range(c)] for _ in range(n): s,t,c = map(int, input().split()) if s in request[c-1]: i = request[c-1].index(s) request[c-1][i] = t elif t in request[c-1]: i = request[c-1].index(t) request[c-1][i] = s else: re...
s686228766
p03504
u754651673
1512358862
Python
Python (3.4.3)
py
Runtime Error
17
2940
571
#include <iostream> using namespace std; int tasu = 2; int main(){ int rec[30][1000000] = {0}; int n, c; cin >> n >> c; int s[100000] = {0}; int t[100000] = {0}; int ch[100000] = {0}; for(int i = 0; i < n ; i++) cin >> s[i] >> t[i] >> ch[i]; for(int i = 0; i < tasu ; i++){ for(...