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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
s533950756 | p03504 | u072717685 | 1594076455 | Python | Python (3.8.2) | py | Runtime Error | 29 | 9264 | 392 | import sys
read = sys.stdin.read
def main():
n, c = map(int, input().split())
# cs[0]とcs[-1]はindex error除け。
cs = [0] * 10001
for _ in range(n):
s, t, c = map(int, input().split())
cs[s] += 1
cs[t + 1] -= 1
cur = 0
r = 0
for cse in cs:
cur += cse
r = m... |
s467229049 | p03504 | u285891772 | 1593990541 | Python | Python (3.8.2) | py | Runtime Error | 360 | 48068 | 1495 | import sys, re
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, tan, asin, acos, atan, radians, degrees, log2, gcd
from itertools import accumulate, permutations, combinations, combinations_with_replacement, product, groupby
from operator import itemgetter... |
s111748567 | p03504 | u285891772 | 1593990345 | Python | Python (3.8.2) | py | Runtime Error | 388 | 49828 | 1502 | import sys, re
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, tan, asin, acos, atan, radians, degrees, log2, gcd
from itertools import accumulate, permutations, combinations, combinations_with_replacement, product, groupby
from operator import itemgetter... |
s744639717 | p03504 | u844646164 | 1593572627 | Python | PyPy3 (7.3.0) | py | Runtime Error | 515 | 109676 | 666 | N, C = map(int, input().split())
stc = [list(map(lambda x:2*int(x), input().split())) for _ in range(N)]
stc = sorted(stc, key=lambda x:(x[2], x[0], x[1]))
l = []
i = N-1
s, t, c = 0, 0, 0
while i >= 0:
if stc[i][2] == stc[i-1][2] and stc[i][0] == stc[i-1][1]:
s = stc[i-1][0]
if t == 0:
... |
s445167590 | p03504 | u127499732 | 1593044553 | Python | Python (3.8.2) | py | Runtime Error | 110 | 39196 | 574 | def main():
from itertools import accumulate
n, c, *stc = map(int, open(0).read().split())
table = [0] * (10 ** 5 + 2)
m = list(zip(stc[::3], stc[1::3], stc[2::3]))
m = sorted(key=lambda a: (a[2], a[0], a[1]))
ch_ = 0
t_ = 0
for s, t, ch in m:
if ch != ch_:
ch_ = ch
... |
s986111442 | p03504 | u127499732 | 1593044440 | Python | Python (3.8.2) | py | Runtime Error | 259 | 39176 | 570 | def main():
from itertools import accumulate
n, c, *stc = map(int, open(0).read().split())
table = [0] * (10 ** 5 + 1)
m = list(zip(stc[::3], stc[1::3], stc[2::3]))
m.sort(key=lambda a: (a[2], a[0], a[1]))
ch_ = 0
t_ = 0
for s, t, ch in m:
if ch != ch_:
ch_ = ch
... |
s637276821 | p03504 | u829796346 | 1592753555 | Python | PyPy3 (7.3.0) | py | Runtime Error | 328 | 153352 | 949 | #!/usr/bin/env python3
# N,M = map(int,sys.stdin.readline().split())
# a = tuple(map(int,sys.stdin.readline().split())) # single line with multi param
# a = tuple(int(sys.stdin.readline()) for _ in range(N)) # multi line with single param
# a = tuple(tuple(map(int,sys.stdin.readline().rstrip().split())) for _ in range(... |
s197937608 | p03504 | u813174766 | 1592366332 | Python | PyPy3 (2.4.0) | py | Runtime Error | 750 | 118216 | 451 | n,C=map(int,input().split())
dp=[[0 for i in range(100001)] for j in range(31)]
for i in range(n):
s,t,c=map(int,input().split())
t+=1
dp[c][s]+=1
dp[c][t]-=1
nm=[0 for i in range(100001)]
for i in range(31):
s=1
for j in range(1,100001):
dp[i][j]+=dp[i][j-1]
if dp[i][j]==0 and dp[i][j-1]==1:
... |
s531591711 | p03504 | u146597538 | 1592146935 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3064 | 863 | n, c = map(int, input().split())
# input時に前処理として以下のことをしておく
# * 開始時間を-1(-0.5の制約だが、-1しても変わらないので-1する)しておく
# テレビ局の番組をチャンネルごとに登録
r = [[0 for i in range(c)] for j in range(100)]
for _ in range(n):
s,t,c = map(int, input().split())
for j in range(s-1, t):
r[j][c - 1] = 1
# print(*r,sep='\n')
ans = 0
for i ... |
s052412329 | p03504 | u405256066 | 1591754740 | Python | Python (3.4.3) | py | Runtime Error | 680 | 61584 | 416 | # 1-index
from sys import stdin
import numpy as np
N, C = [int(x) for x in stdin.readline().rstrip().split()]
imos = [[0]*(10**5+1) for i in range(C+1)]
for i in range(N):
s, t, c = [int(x) for x in stdin.readline().rstrip().split()]
imos[c][s] += 1
if t <= 10**5:
imos[c][t+1] -= 1
imos = np.array... |
s546469181 | p03504 | u405256066 | 1591754238 | Python | Python (3.4.3) | py | Runtime Error | 645 | 61572 | 388 | # 1-index
from sys import stdin
import numpy as np
N,C = [int(x) for x in stdin.readline().rstrip().split()]
imos = [[0]*(10**5+1) for i in range(C+1)]
for i in range(N):
s,t,c = [int(x) for x in stdin.readline().rstrip().split()]
imos[c][s] += 1
imos[c][t+1] -= 1
imos = np.array(imos)
#print(np.cumsum(im... |
s899979268 | p03504 | u945359338 | 1591426559 | Python | Python (3.4.3) | py | Runtime Error | 396 | 12520 | 311 | N,C = map(int, input().split())
s =[0]*N
t =[0]*N
c =[0]*N
for i in range(N):
s[i],t[i],c[i] = map(int, input().split())
imos = [0]*int(1e5+1)
for i in range(N):
imos[s[i]]+=1
imos[t[i]+1]-=1
ans = 0
for i in range(1,int(1e5+1)):
imos[i]=imos[i-1]+imos[i]
ans = max(ans,imos[i])
print(ans) |
s035829459 | p03504 | u784022244 | 1591334563 | Python | Python (3.4.3) | py | Runtime Error | 18 | 2940 | 238 | import numpy as np
N,C=map(int, input().split())
#s~tでc
L=np.zeros((C, 10**5+2),dtype="int")
for i in range(N):
s,t,c=map(int, input().split())
L[c-1,s-1]+=1
L[c-1,t]-=1
L=np.cumsum(L, axis=1)
print(max(np.sum(L,axis=0))
|
s694245270 | p03504 | u189479417 | 1590698363 | Python | Python (3.4.3) | py | Runtime Error | 979 | 40508 | 553 | import numpy as np
N, C = map(int,input().split())
T1 = [[] for _ in range(C)]
for _ in range(N):
s, t, c = map(int,input().split())
T1[c-1].append([s,t])
for i in range(C):
T1[i].sort()
T2 = [[] for _ in range(C)]
for i in range(C):
for s, t in T1[i]:
if len(T2[i]) != 0 and T2[i][-1][1] == s:
... |
s737998249 | p03504 | u189479417 | 1590698203 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3064 | 554 | import numpy as np
N, C = map(int,input().split())
T1 = [[] for _ in range(C)]
for _ in range(N):
s, t, c = map(int,input().split())
T1[c-1].append([s,t])
for i in range(C):
T1[i].sort()
T2 = [[] for _ in range(C)]
for i in range(C):
for s, t in T1[i]:
if len(T2[i]) != 0 and T2[i][-1][1] == s:
... |
s684665934 | p03504 | u922449550 | 1590605049 | Python | Python (3.4.3) | py | Runtime Error | 1888 | 55456 | 795 | N, C = map(int, input().split())
table = [[0]*(10**5 + 1) for i in range(C)]
st = [[] for i in range(C)]
for i in range(N):
s, t, c = map(int, input().split())
st[c-1].append([s, t])
st_new = [[] for i in range(C)]
for c in range(C):
if st[c]:
st[c].sort()
st_new[c].append(st[c][0])
n = len(st[c])
... |
s106552225 | p03504 | u922449550 | 1590604609 | Python | Python (3.4.3) | py | Runtime Error | 1969 | 53580 | 796 | N, C = map(int, input().split())
table = [[0]*(10**5 + 1) for i in range(C)]
st = [[] for i in range(C)]
for i in range(N):
s, t, c = map(int, input().split())
st[c-1].append([s, t])
st_new = [[] for i in range(C)]
for c in range(C):
if st[c]:
st[c].sort()
st_new[c].append(st[c][0])
n = len(st[c])
... |
s300254587 | p03504 | u131264627 | 1590509344 | Python | Python (3.4.3) | py | Runtime Error | 363 | 4596 | 297 | n, c = map(int, input().split())
cnt = [0] * (10 ** 5 + 1)
cnt_sum = [0] * (10 ** 5 + 1)
for _ in range(n):
s, t, _c = map(int, input().split())
cnt[s] += 1
cnt[t + 1] -= 1
cnt_sum[0] = cnt[0]
for i in range(1, 10 ** 5 + 1):
cnt_sum[i] = cnt_sum[i - 1] + cnt[i]
print(max(cnt_sum)) |
s869259478 | p03504 | u439542873 | 1589668800 | Python | Python (3.4.3) | py | Runtime Error | 365 | 18400 | 396 | from itertools import accumulate
MAX_T = 10 ** 5
n, c = map(int, input().split())
time = []
channel = []
for _ in range(n):
s, t, c = map(int, input().split())
time.append((s, t))
channel.append(c)
n_program = [0 for _ in range(MAX_T + 1)]
for s, t in time:
n_program[s] += 1
n_program[t + 1] -= ... |
s390167059 | p03504 | u780962115 | 1589667890 | Python | PyPy3 (2.4.0) | py | Runtime Error | 882 | 136052 | 508 | #recording
N,C=map(int,input().split())
plus=[[0 for i in range(10**5+1)]for j in range(C+1)]
minus=[[0 for i in range(10**5+1)]for j in range(C+1)]
for _ in range(N):
s,t,c=map(int,input().split())
plus[c][s]=1
minus[c][t+1]=-1
for c in range(1,C+1):
for i in range(1,10**5+1):
plus[c][i]+=plus[... |
s827106134 | p03504 | u372144784 | 1589501186 | Python | PyPy3 (2.4.0) | py | Runtime Error | 179 | 39024 | 531 | import sys
from operator import itemgetter
readline = sys.stdin.buffer.readline
def even(n): return 1 if n%2==0 else 0
n,c = map(int,readline().split())
ch = []*c
for i in range(n):
s,t,c = map(int,readline().split())
ch[c-1].append([s,t])
imos = [0]*(10**5+1)
for i in ch:
i.sort()
for j in range(1,len(... |
s265154002 | p03504 | u346812984 | 1588717120 | Python | Python (3.4.3) | py | Runtime Error | 358 | 14792 | 468 | import numpy as np
import sys
sys.setrecursionlimit(10 ** 6)
INF = float("inf")
MOD = 10 ** 9 + 7
def input():
return sys.stdin.readline().strip()
def main():
N, C = map(int, input().split())
MAX = 10 ** 5 + 1
vals = [0] * MAX
for _ in range(N):
s, t, c = map(int, input().split())
... |
s113097043 | p03504 | u871980676 | 1588196065 | Python | Python (3.4.3) | py | Runtime Error | 779 | 34648 | 1507 | from collections import defaultdict as dd
N, C = tuple(map(int, input().split()))
events = []
tmax = 0
dic=dd(list)
for i in range(N):
s, t, c = map(int, input().split())
dic[c].append((s,t))
eps = 0.5
for k,v in dic.items():
v1 = sorted(v)
lev = len(v)
prev = [-1,-1]
for i,val in enumerate(v1):... |
s952385593 | p03504 | u871980676 | 1588196010 | Python | Python (3.4.3) | py | Runtime Error | 862 | 34640 | 1489 | from collections import defaultdict as dd
N, C = tuple(map(int, input().split()))
events = []
tmax = 0
dic=dd(list)
for i in range(N):
s, t, c = map(int, input().split())
dic[c].append((s,t))
eps = 0.5
for k,v in dic.items():
v1 = sorted(v)
lev = len(v)
prev = [-1,-1]
for i,val in enumerate(v1):... |
s861392176 | p03504 | u871980676 | 1588195722 | Python | Python (3.4.3) | py | Runtime Error | 878 | 34624 | 1330 | from collections import defaultdict as dd
N, C = tuple(map(int, input().split()))
events = []
tmax = 0
dic=dd(list)
for i in range(N):
s, t, c = map(int, input().split())
dic[c].append((s,t))
eps = 0.5
for k,v in dic.items():
v1 = sorted(v)
lev = len(v)
prev = [-1,-1]
for i,val in enumerate(v1):... |
s032735848 | p03504 | u871980676 | 1588195179 | Python | Python (3.4.3) | py | Runtime Error | 907 | 34616 | 1312 | from collections import defaultdict as dd
N, C = tuple(map(int, input().split()))
events = []
tmax = 0
dic=dd(list)
for i in range(N):
s, t, c = map(int, input().split())
dic[c].append((s,t))
eps = 0.5
for k,v in dic.items():
v1 = sorted(v)
lev = len(v)
prev = [-1,-1]
for i,val in enumerate(v1):... |
s866239343 | p03504 | u871980676 | 1588179970 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 706 | N, C = tuple(map(int, input().split()))
events = []
tmax = 0
for i in range(N):
s, t, c = map(int, input().split())
start = (s-0.5, 1)
end = (t, 0)
events.append(start)
events.append(end)
if tmax < t:
tmax = t
events.sort()
idx = 0
cnt ... |
s805933593 | p03504 | u609061751 | 1587935284 | Python | PyPy3 (2.4.0) | py | Runtime Error | 406 | 101564 | 327 | import sys
input = sys.stdin.readline
N, C = [int(x) for x in input().split()]
imos = [0]*(10**6 + 1)
for _ in range(N):
s, t, c = [int(x) for x in input().split()]
s *= 10
t *= 10
imos[max(0, s - 5)] += 1
imos[t + 1] -= 1
from itertools import accumulate
csum = list(accumulate(imos))
print(max... |
s599620705 | p03504 | u609061751 | 1587935019 | Python | PyPy3 (2.4.0) | py | Runtime Error | 402 | 101468 | 319 | import sys
input = sys.stdin.readline
N, C = [int(x) for x in input().split()]
imos = [0]*(10**6 + 1)
for _ in range(N):
s, t, c = [int(x) for x in input().split()]
s *= 10
t *= 10
imos[s - 5] += 1
imos[t + 1] -= 1
from itertools import accumulate
csum = list(accumulate(imos))
print(max(csum)) |
s435343674 | p03504 | u974620347 | 1587860008 | Python | PyPy3 (2.4.0) | py | Runtime Error | 708 | 72156 | 707 | def main():
N,C = [int(_n) for _n in input().split()]
L = 100000
table = [[0]*L for _ in range(C)]
for i in range(N):
s,t,c = [int(_n) for _n in input().split()]
c -= 1
s -= 1
t -= 1
table[c][s] += 1
table[c][t+1] -= 1
for c in range(C):
for j... |
s961570777 | p03504 | u970308980 | 1587261182 | Python | Python (3.4.3) | py | Runtime Error | 22 | 3316 | 1052 |
import heapq
from collections import defaultdict, deque
from math import ceil, factorial, gcd
from itertools import accumulate
import sys
import bisect
sys.setrecursionlimit(10 ** 7)
INF = float("inf")
MOD = 10 ** 9 + 7
si = lambda: input().strip()
ii = lambda: int(input())
mii = lambda: map(int, input().split())
l... |
s326760416 | p03504 | u970308980 | 1587261146 | Python | Python (3.4.3) | py | Runtime Error | 21 | 3316 | 1049 | import heapq
from collections import defaultdict, deque
from math import ceil, factorial, gcd
from itertools import accumulate
import sys
import bisect
sys.setrecursionlimit(10 ** 7)
INF = float("inf")
MOD = 10 ** 9 + 7
si = lambda: input().strip()
ii = lambda: int(input())
mii = lambda: map(int, input().split())
lm... |
s813987298 | p03504 | u228223940 | 1587246498 | Python | PyPy3 (2.4.0) | py | Runtime Error | 168 | 38736 | 1434 | n,c = map(int,input().split())
stc = [[int(i) for i in input().split()] for j in range(n)]
ans = 0
stc.sort(key=lambda x:(x[2],x[1],x[0]))
time = 10**5+1
c_imos = [[0 for i in range(time)] for j in range(c)]
for i in range(n):
c_imos[stc[i][2]-1][stc[i][0]-1] += 1
c_imos[stc[i][2]-1][stc[i][1]] -= 1
#prin... |
s517700144 | p03504 | u228223940 | 1587245719 | Python | PyPy3 (2.4.0) | py | Runtime Error | 1249 | 141956 | 1422 | n,c = map(int,input().split())
stc = [[int(i) for i in input().split()] for j in range(n)]
ans = 0
stc.sort(key=lambda x:(x[2],x[1],x[0]))
time = 10**5
c_imos = [[0 for i in range(time)] for j in range(c)]
for i in range(n):
c_imos[stc[i][2]-1][stc[i][0]-1] += 1
c_imos[stc[i][2]-1][stc[i][1]] -= 1
#print(... |
s115273754 | p03504 | u654470292 | 1587193656 | Python | Python (3.4.3) | py | Runtime Error | 21 | 3316 | 855 | import sys
from collections import *
import heapq
import math
from math import gcd
import bisect
import copy
from itertools import permutations,accumulate,combinations,product
def input():
return sys.stdin.readline()[:-1]
def ruiseki(lst):
return [0]+list(accumulate(lst))
mod=pow(10,9)+7
al=[chr(ord('a') + i) f... |
s488815516 | p03504 | u654470292 | 1587193589 | Python | PyPy3 (2.4.0) | py | Runtime Error | 180 | 38640 | 855 | import sys
from collections import *
import heapq
import math
from math import gcd
import bisect
import copy
from itertools import permutations,accumulate,combinations,product
def input():
return sys.stdin.readline()[:-1]
def ruiseki(lst):
return [0]+list(accumulate(lst))
mod=pow(10,9)+7
al=[chr(ord('a') + i) f... |
s276174768 | p03504 | u471539833 | 1586290559 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 1 | a |
s055873593 | p03504 | u964299793 | 1586248651 | Python | Python (3.4.3) | py | Runtime Error | 1976 | 26776 | 620 | import sys
input=sys.stdin.buffer.readline
n,c=map(int,input().split())
a=[ [0 for _ in range(10**5+2)] for _ in range(c)]
for _ in range(n):
s,t,cc=map(int,input().split())
cc-=1
# print(s-1,end=' s-1\n')
a[cc][s-1]+=1
a[cc][t]-=1
'''for i in range(s-1,t):
a[cc][i]=1'''
for i in range(c)... |
s352607524 | p03504 | u964299793 | 1586247562 | Python | Python (3.4.3) | py | Runtime Error | 1995 | 26648 | 600 | import sys
input=sys.stdin.buffer.readline
n,c=map(int,input().split())
a=[ [0 for _ in range(10**5+2)] for _ in range(c)]
for _ in range(n):
s,t,cc=map(int,input().split())
cc-=1
# print(s-1,end=' s-1\n')
a[cc][s-1]+=1
a[cc][t]-=1
'''for i in range(s-1,t):
a[cc][i]=1'''
for i in range(c)... |
s998042020 | p03504 | u065446124 | 1586216902 | Python | PyPy3 (2.4.0) | py | Runtime Error | 863 | 70564 | 466 | n,C=map(int,input().split())
import collections
d=collections.defaultdict(list)
for i in range(n):
s,t,c=map(int,input().split())
d[c].append((s,t))
T=[0 for i in range(2*10**5+1)]
for i in d.values():
i.sort()
T[i[0][0]*2-1]+=1
T[i[-1][1]*2+1]-=1
for x,y in zip(i,i[1:]):
s1,t1=x
... |
s529323143 | p03504 | u291766461 | 1586044485 | Python | Python (3.4.3) | py | Runtime Error | 374 | 4596 | 275 | N, C = map(int, input().split())
MAX_N = (10 ** 5 + 1)
X = [0] * MAX_N
for _ in range(N):
s, t, c = map(int, input().split())
X[s] += 1
X[t+1] -= 1
# print(X)
ans = [0] * MAX_N
for i in range(MAX_N - 1):
ans[i + 1] = ans[i] + X[i]
# print(ans)
print(max(ans)) |
s169238231 | p03504 | u547167033 | 1585978671 | Python | Python (3.4.3) | py | Runtime Error | 1030 | 30464 | 539 | N,C=map(int,input().split())
ch=[[] for i in range(31)]
for i in range(N):
s,t,c=map(int,input().split())
ch[c].append([s,t])
arr=[[] for i in range(31)]
start=[]
end=[]
for i in range(31):
score=[0]*(10**5+1)
for j in range(len(ch[i])):
score[ch[i][j][0]]+=1
score[ch[i][j][1]]-=1
for j in range(10**5... |
s376747933 | p03504 | u672475305 | 1585507344 | Python | Python (3.4.3) | py | Runtime Error | 488 | 14812 | 182 | import numpy as np
n,c = map(int,input().split())
d = [0]*(10**5)
for _ in range(n):
s,t,c = map(int,input().split())
d[s-1] += 1
d[t] -= 1
d = np.cumsum(d)
print(max(d)) |
s541045998 | p03504 | u932465688 | 1584838076 | Python | Python (3.4.3) | py | Runtime Error | 1938 | 23532 | 865 | n,c = map(int,input().split())
L = [[] for i in range(c)]
for i in range(n):
s,t,k = map(int,input().split())
L[k-1].append([s,t])
for i in range(c):
L[i].sort()
for i in range(c):
d = [0]*(10**5+1)
T = []
for j in range(len(L[i])):
d[L[i][j][0]] += 1
d[L[i][j][1]] -= 1
for j... |
s992592220 | p03504 | u520276780 | 1584810668 | Python | Python (3.4.3) | py | Runtime Error | 471 | 18580 | 616 | n,c = map(int, input().split( ))
v = [0]*(10**5+1)
#ci不要ではなかった
#チャンネルは継続できる
#座圧不要
Cs = [set() for i in range(c+1)]
Ct = [set() for i in range(c+1)]
for i in range(n):
si,ti,ci = map(int, input().split( ))
if ti in Cs[ci]:
Cs[ci].remove(ti)
else:
Ct[ci].add(ti)
if si in Cs[ci]:
Ct... |
s371120498 | p03504 | u520276780 | 1584809766 | Python | Python (3.4.3) | py | Runtime Error | 379 | 3956 | 254 | n,_ = map(int, input().split( ))
v = [0]*(10**5+1)
#ci不要
#座圧不要
for i in range(n):
si,ti,ci = map(int, input().split( ))
v[si]+=1;v[ti+1]-=1
ans = 0
tmp = 0
for i in range(1,10**5+1):
tmp += v[i]
ans = max(tmp,ans)
print(ans)
|
s295762921 | p03504 | u279493135 | 1584138716 | Python | Python (3.4.3) | py | Runtime Error | 275 | 28920 | 737 | import sys, re
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians
from itertools import accumulate, permutations, combinations, product
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase... |
s907041450 | p03504 | u476604182 | 1583688684 | Python | Python (3.4.3) | py | Runtime Error | 149 | 12480 | 293 | import numpy as np
N, C, *L = map(int, open('0').read().split())
program = np.zeros((10**5+2,31),np.int32)
for s,t,c in zip(*[iter(L)]*3):
program[s][c] += 1
program[t+1][c] += -1
program = np.cumsum(program, axis=0)
ans = np.apply_along_axis(np.count_nonzero, 1, program).max()
print(ans) |
s267083050 | p03504 | u807772568 | 1583617141 | Python | PyPy3 (2.4.0) | py | Runtime Error | 379 | 82908 | 1486 | import sys,collections as cl,bisect as bs
sys.setrecursionlimit(100000)
input = sys.stdin.readline
mod = 10**9+7
Max = sys.maxsize
def l(): #intのlist
return list(map(int,input().split()))
def m(): #複数文字
return map(int,input().split())
def onem(): #Nとかの取得
return int(input())
def s(x): #圧縮
a = []
aa =... |
s330678515 | p03504 | u595289165 | 1583316074 | Python | Python (3.4.3) | py | Runtime Error | 447 | 51716 | 453 | n, c = map(int, input().split())
stc = [list(map(int, input().split())) for _ in range(n)]
T = max(stc, key=lambda x:x[1])[1]
record = [[0]*(T+2) for _ in range(c+1)]
for s, t, c in stc:
record[c][s] += 1
record[c][t] -= 1
for r in record:
for i in range(T+3):
r[i+1] += r[i]
for s, t, c in stc:
... |
s818136277 | p03504 | u941434715 | 1583278999 | Python | Python (3.4.3) | py | Runtime Error | 584 | 39940 | 404 | #coding: utf-8
import math
import heapq
import bisect
import numpy as np
from collections import Counter
#from scipy.misc import comb
N,C = map(int, input().split())
L = [list(map(int, input().split())) for i in range(N)]
T_MAX = 2*(10**5)+1
time = [0]*(T_MAX)
for l in L:
time[l[0]*2-1] += 1
time[l[1]*2+1] -... |
s319169707 | p03504 | u941434715 | 1583275982 | Python | Python (3.4.3) | py | Runtime Error | 579 | 38260 | 385 | #coding: utf-8
import math
import heapq
import bisect
import numpy as np
from collections import Counter
#from scipy.misc import comb
N,C = map(int, input().split())
L = [list(map(int, input().split())) for i in range(N)]
time = [0]*(2*(10**5))
for l in L:
time[l[0]*2-1] += 1
time[l[1]*2] -= 1
ans = 0
tmp = ... |
s530759892 | p03504 | u994988729 | 1582551532 | Python | Python (3.4.3) | py | Runtime Error | 217 | 18960 | 608 | import sys
input = sys.stdin.readline
N, C = map(int, input().split())
STC = [tuple(map(int, input().split())) for _ in range(N)]
STC.sort(reverse=True, key=lambda x: x[1]) # tを基準に降順ソート
record = []
while STC:
s_now, t_now, c_now = STC.pop()
for i in range(len(record)):
t, s, c = record[i]
if... |
s935952365 | p03504 | u296150111 | 1582149295 | Python | Python (3.4.3) | py | Runtime Error | 357 | 3828 | 184 | n,c=map(int,input().split())
time=[0]*(10**5)
for i in range(n):
s,t,c=map(int,input().split())
time[s-1]+=1
time[t]-=1
for i in range(10**5-1):
time[i+1]+=time[i]
print(max(time)) |
s220233436 | p03504 | u780962115 | 1581205038 | Python | Python (3.4.3) | py | Runtime Error | 1046 | 18912 | 765 | n,c=map(int,input().split())
lists=[[] for i in range(31)]
for i in range(n):
s,t,c=map(int,input().split())
lists[c].append((s,t))
for i in range(31):
lists[c]=sorted(lists[c],key=lambda x:x[0])
for i in range(31):
if len(lists[i])>=2:
sublists=[]
start=lists[i][0][0]
end=lists... |
s409820516 | p03504 | u780962115 | 1581204392 | Python | Python (3.4.3) | py | Runtime Error | 1307 | 34092 | 1191 | n,c=map(int,input().split())
lists=[[] for i in range(31)]
for i in range(n):
s,t,c=map(int,input().split())
lists[c].append((s,t))
for i in range(31):
lists[c]=sorted(lists[c],key=lambda x:x[0])
for i in range(1,31):
if len(lists[i])>=2:
sublists=[]
start=lists[i][0][0]
end=lis... |
s074741570 | p03504 | u780962115 | 1581204290 | Python | Python (3.4.3) | py | Runtime Error | 1341 | 18960 | 1179 | n,c=map(int,input().split())
lists=[[] for i in range(31)]
for i in range(n):
s,t,c=map(int,input().split())
lists[c].append((s,t))
for i in range(31):
lists[c]=sorted(lists[c],key=lambda x:x[0])
for i in range(1,31):
if len(lists[i])>=2:
sublists=[]
start=lists[i][0][0]
end=lis... |
s721642257 | p03504 | u970899068 | 1580682689 | Python | PyPy3 (2.4.0) | py | Runtime Error | 830 | 69208 | 426 | import itertools
n,c = map(int, input().split())
a = [list(map(int, input().split())) for i in range(n)]
a.sort(key=lambda x:x[0])
a.sort(key=lambda x:x[2])
# 同じチャンネルの番組を繋げる。
for i in range(n-1):
if a[i][1]==a[i+1][0] and a[i][2]==a[i+1][2]:
a[i][1]-=1
# いもす法
x=[0]*(10**5+1)
for i in range(n):
x[a[i][0... |
s238439275 | p03504 | u970899068 | 1580681943 | Python | PyPy3 (2.4.0) | py | Runtime Error | 727 | 65496 | 262 | import itertools
n,c = map(int, input().split())
a = [list(map(int, input().split())) for i in range(n)]
a.sort(key=lambda x:x[0])
# いもす法
x=[0]*(10**5+1)
for i in range(n):
x[a[i][0]]+=1
x[a[i][1]+1]-=1
x = itertools.accumulate(x)
print(max(x)) |
s780133392 | p03504 | u691896522 | 1580248942 | Python | PyPy3 (2.4.0) | py | Runtime Error | 777 | 86364 | 475 | n, c = map(int, input().split())
data = [[0 for i in range(c+1)] for j in range(10**5+1)]
for i in range(n):
s, t, channel = map(int, input().split())
data[s][channel] += 1
data[t+1][channel] -= 1
for i in range(c+1):
for j in range(1,10**5+1):
data[j][i] += data[j-1][i]
ans = 0
for i in range(1... |
s407133620 | p03504 | u691896522 | 1580247990 | Python | PyPy3 (2.4.0) | py | Runtime Error | 588 | 46256 | 233 | n, c = map(int, input().split())
data = [0 for j in range(10**5+1)]
for i in range(n):
s, t, channel = map(int, input().split())
data[s] += 1
data[t+1] -= 1
for i in range(10**5):
data[i+1] += data[i]
print(max(data)) |
s081136501 | p03504 | u476604182 | 1579207428 | Python | Python (3.4.3) | py | Runtime Error | 379 | 19000 | 406 | N, C = map(int, input().split())
dic = []
L = 0
for i in range(N):
s, t, c = map(int, input().split())
dic += [(c-1,s,t)]
if t+1>L:
L = t+1
sm = [0]*L
for c in range(C):
tt = [0]*(L)
for i in range(N):
if dic[i][0]==c:
tt[dic[i][1]*2-1] += 1
tt[dic[i][2]*2] -= 1
for i in range(1,L):
... |
s697681020 | p03504 | u905582793 | 1578361338 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3188 | 397 | N,C = map(int,input().split())
p = [list(map(int,input().split())) for i in range(N)]
p.sort()
ch = [[0,0] for i in range(C+1)]
p_true = []
for i in range(N):
[s,t,c] = p[i]
if ch[c][1] == s:
ch[c][1] = t
elif ch[c] == [0,0]:
ch[c] = [s,t]
else:
p_true.append([*ch[c],c])
ch[c] = [s,t]
for i in r... |
s491361634 | p03504 | u087356957 | 1578030320 | Python | Python (3.4.3) | py | Runtime Error | 2110 | 64136 | 874 | import numpy as np
def main():
input_string = list(map(int,input().split()))
N = input_string[0]
C = input_string[1]
data = []
for i in range(N):
data.append(list(map(int,input().split())))
data_np = np.array(data).reshape(N,3)
max_time = max(data_np[:,1])
schedule = np.zeros(... |
s695507312 | p03504 | u588341295 | 1577333331 | Python | Python (3.4.3) | py | Runtime Error | 401 | 25764 | 1451 | # -*- coding: utf-8 -*-
import sys
from itertools import accumulate
def input(): return sys.stdin.readline().strip()
def list2d(a, b, c): return [[c] * b for i in range(a)]
def list3d(a, b, c, d): return [[[d] * c for j in range(b)] for i in range(a)]
def list4d(a, b, c, d, e): return [[[[e] * d for j in range(c)] fo... |
s167314574 | p03504 | u445624660 | 1575812377 | Python | PyPy3 (2.4.0) | py | Runtime Error | 873 | 133936 | 536 | # N個のimosなので二次元でやる 0.5がうざいので*2する( (2*10^5) * C )
N, C = map(int, input().split())
x = 2 * (10 ** 5)
imos = [[0 for _ in range(x)] for _ in range(C)]
for _ in range(N):
s, t, c = map(int, input().split())
s, t, c = s * 2, t * 2, c - 1
imos[c][s - 1] += 1
imos[c][t] -= 1
for i in range(C):
for j i... |
s927152916 | p03504 | u445624660 | 1575812209 | Python | Python (3.4.3) | py | Runtime Error | 2107 | 50100 | 536 | # N個のimosなので二次元でやる 0.5がうざいので*2する( (2*10^5) * C )
N, C = map(int, input().split())
x = 2 * (10 ** 5)
imos = [[0 for _ in range(x)] for _ in range(C)]
for _ in range(N):
s, t, c = map(int, input().split())
s, t, c = s * 2, t * 2, c - 1
imos[c][s - 1] += 1
imos[c][t] -= 1
for i in range(C):
for j i... |
s574484001 | p03504 | u735069283 | 1575671138 | Python | Python (3.4.3) | py | Runtime Error | 1224 | 64472 | 297 | import sys
input = sys.stdin.readline
sys.setrecursionlimit(10 ** 7)
import numpy as np
N,C=map(int,input().split())
X=np.array([[0]*2*10**5]*(C+1))
for i in range(N):
s,t,c=map(int,input().split())
s=2*s-1
t=2*t
for j in range(s,t+1):
X[c][j]=1
answer=max(X.sum(axis=0))
print(answer) |
s813706887 | p03504 | u735069283 | 1575670935 | Python | Python (3.4.3) | py | Runtime Error | 1447 | 62424 | 228 | import numpy as np
N,C=map(int,input().split())
X=np.array([[0]*2*10**5]*(C+1))
for i in range(N):
s,t,c=map(int,input().split())
s=2*s-1
t=2*t
for j in range(s,t+1):
X[c][j]=1
answer=max(X.sum(axis=0))
print(answer) |
s976276342 | p03504 | u190406011 | 1575512385 | Python | PyPy3 (2.4.0) | py | Runtime Error | 291 | 48560 | 290 | import sys
from itertools import accumulate
n, c = [int(i) for i in sys.stdin.readline().split()]
ls = [0 for i in range(10**5+1)]
for i in range(n):
s, t, c = [int(i) for i in sys.stdin.readline().split()]
ls[s] += 1
ls[t+1] -= 1
ls = [i for i in accumulate(ls)]
print(max(ls)) |
s548966075 | p03504 | u600402037 | 1575484318 | Python | Python (3.4.3) | py | Runtime Error | 482 | 24540 | 855 | import sys
import heapq # heapqライブラリのimport
stdin = sys.stdin
ri = lambda: int(rs())
rl = lambda: list(map(int, stdin.readline().split()))
rs = lambda: stdin.readline().rstrip() # ignore trailing spaces
N, C = rl()
STC = [[] for _ in range(C+1)]
for _ in range(N):
s, t, c = rl()
STC[c].append((s, t))
fo... |
s402334927 | p03504 | u600402037 | 1575484198 | Python | Python (3.4.3) | py | Runtime Error | 379 | 24544 | 860 | import sys
import heapq # heapqライブラリのimport
stdin = sys.stdin
ri = lambda: int(rs())
rl = lambda: list(map(int, stdin.readline().split()))
rs = lambda: stdin.readline().rstrip() # ignore trailing spaces
N, C = rl()
STC = [[] for _ in range(C+1)]
for _ in range(N):
s, t, c = rl()
STC[c].append((s, t))
fo... |
s377113153 | p03504 | u600402037 | 1575484052 | Python | Python (3.4.3) | py | Runtime Error | 425 | 24544 | 819 | import sys
import heapq # heapqライブラリのimport
stdin = sys.stdin
ri = lambda: int(rs())
rl = lambda: list(map(int, stdin.readline().split()))
rs = lambda: stdin.readline().rstrip() # ignore trailing spaces
N, C = rl()
STC = [[] for _ in range(C+1)]
for _ in range(N):
s, t, c = rl()
STC[c].append((s, t))
fo... |
s102110958 | p03504 | u600402037 | 1575483803 | Python | Python (3.4.3) | py | Runtime Error | 502 | 24584 | 814 | import sys
import heapq # heapqライブラリのimport
stdin = sys.stdin
ri = lambda: int(rs())
rl = lambda: list(map(int, stdin.readline().split()))
rs = lambda: stdin.readline().rstrip() # ignore trailing spaces
N, C = rl()
STC = [[] for _ in range(C+1)]
for _ in range(N):
s, t, c = rl()
STC[c].append((s, t))
fo... |
s558103397 | p03504 | u347640436 | 1572960172 | Python | Python (3.4.3) | py | Runtime Error | 651 | 26484 | 310 | N, C = map(int, input().split())
tt = [[0] * (10 ** 5 + 1) for _ in range(C)]
for _ in range(N):
s, t, c = map(int, input().split())
for i in range(s - 1, t):
tt[c - 1] = 1
ct = [0] * (10 ** 5 + 1)
for i in range(C):
for j in range(10 ** 5 + 1):
ct[j] += tt[i][j]
print(max(ct))
|
s855840633 | p03504 | u466331465 | 1570910539 | Python | Python (3.4.3) | py | Runtime Error | 254 | 22856 | 307 | import sys
from itertools import accumulate
input = sys.stdin.readline
def inputs():return [int(x) for x in input().split()]
N,C = inputs()
stc = [inputs() for i in range(N)]
ans = [0]*(10**5+1)
for i in range(N):
s,t,c, = stc[i]
ans[s]+=1
ans[t+1]-=1
ans = list(accumulate(ans))
print(max(ans)) |
s015434710 | p03504 | u370331385 | 1570816723 | Python | Python (3.4.3) | py | Runtime Error | 427 | 27380 | 642 | N,C = map(int,input().split())
num = 100009
channel = [[0]*num for _ in range(C)]
time = [0]*num
max_num = 0
for i in range(N):
s,t,c = map(int,input().split())
s,t,c = 2*s-1,2*t,c-1
if(channel[c-1][s-1] == 1): channel[c-1][s-1] = 0
channel[c-1][s] = 1
channel[c-1][t] = 1
max_num = max(max_num,t)
tmp = 0... |
s136289652 | p03504 | u370331385 | 1570753161 | Python | Python (3.4.3) | py | Runtime Error | 268 | 27380 | 1093 | import sys
sys.setrecursionlimit(10**9)
input = sys.stdin.readline
N,C = map(int,input().split())
time = [0]*100009
channel = [[0]*100009 for _ in range(C)]
#(方針)チャンネル関係なしに
#同じチャンネルの連続だと録画開始時間に0.5秒のロスがない
# 同チャンネルで 1-7 7-8 → [0.5,8) → 録画機1つ(0.5~7.99)
# 違うチャンネルで 1-7 7-8 → [0.5,7) 0.5~6.99 , [6.5,8) 6.5~7.99 → 録画機2つ
#前... |
s931591088 | p03504 | u499381410 | 1570472042 | Python | PyPy3 (2.4.0) | py | Runtime Error | 333 | 57948 | 817 | from collections import defaultdict, deque, Counter
from heapq import heappush, heappop, heapify
import math
from bisect import bisect_left
import random
from itertools import permutations, accumulate, combinations
import sys
import string
INF = float('inf')
def LI(): return list(map(int, sys.stdin.readline().split()... |
s105463588 | p03504 | u499381410 | 1570472006 | Python | PyPy3 (2.4.0) | py | Runtime Error | 349 | 58460 | 811 | from collections import defaultdict, deque, Counter
from heapq import heappush, heappop, heapify
import math
from bisect import bisect_left
import random
from itertools import permutations, accumulate, combinations
import sys
import string
INF = float('inf')
def LI(): return list(map(int, sys.stdin.readline().split()... |
s514544002 | p03504 | u118642796 | 1570104748 | Python | PyPy3 (2.4.0) | py | Runtime Error | 927 | 114380 | 614 | N,C = map(int,input().split())
ST = []
STC = [[] for _ in range(C)]
for _ in range(N):
s,t,c = map(int,input().split())
STC[c-1].append([s,t])
for i in range(C):
STC[i].sort(key=lambda x:x[0])
s=STC[i][0][0]
t=STC[i][0][1]
for j in range(1,len(STC[i])):
if t==STC[i][j][0]:
t=STC[i][j][1]
if ... |
s802464951 | p03504 | u017810624 | 1568853524 | Python | PyPy3 (2.4.0) | py | Runtime Error | 1074 | 184164 | 316 | n,c=map(int,input().split())
l=[list(map(int,input().split())) for i in range(n)]
L=[[0 for i in range(10**5)] for i in range(c)]
for i in range(n):
for j in range(l[i][0],l[i][1]+1):
L[l[i][2]-1][j]=1
ans=[]
for i in range(10**5):
ct=0
for j in range(c):
ct+=L[j][i]
ans.append(ct)
print(max(ans)) |
s887094884 | p03504 | u054556734 | 1568244634 | Python | Python (3.4.3) | py | Runtime Error | 879 | 32812 | 644 | import numpy as np
n,c = map(int,input().split())
table = np.zeros(10**5+1, dtype=np.int)
ch = [[] for _ in range(c+1)]
for _ in range(n):
s,t,c = map(int,input().split())
ch[c].append([s,t])
times = []
for arr in ch:
if not arr: continue
for i in range(len(arr)):
if i == 0: continue
... |
s119431825 | p03504 | u054556734 | 1568229825 | Python | Python (3.4.3) | py | Runtime Error | 819 | 31520 | 667 | import numpy as np
n,c = map(int,input().split())
table = np.zeros(10**5+1, dtype=np.int)
chan = [[] for _ in range(c+2)]
for _ in range(n):
s,t,c = map(int,input().split())
chan[c].append([s,t])
# 同チャンネルの連続番組を統合する
times = []
for i in range(c+2):
arr = chan[i]
if chan[i]==[] : continue
for i in ... |
s412525965 | p03504 | u054556734 | 1568229538 | Python | Python (3.4.3) | py | Runtime Error | 825 | 31516 | 658 | import numpy as np
n,c = map(int,input().split())
table = np.zeros(10**5+1)
chan = [[] for _ in range(c+2)]
for _ in range(n):
s,t,c = map(int,input().split())
chan[c].append([s,t])
# 同チャンネルの連続番組を統合する
times = []
for i in range(c+2):
arr = chan[i]
if chan[i]==[] : continue
for i in range(len(arr)... |
s418077169 | p03504 | u054556734 | 1568228547 | Python | Python (3.4.3) | py | Runtime Error | 547 | 21492 | 740 | n,c = map(int,input().split())
table = [0 for i in range(10**5+1)]
chan = [[] for _ in range(c+2)]
for _ in range(n):
s,t,c = map(int,input().split())
chan[c].append([s,t])
# 同チャンネルの連続番組を統合する
times = []
for i in range(c+2):
arr = chan[i]
if chan[i]==[] : continue
for i in range(len(arr)):
... |
s485614440 | p03504 | u054556734 | 1568173911 | Python | Python (3.4.3) | py | Runtime Error | 517 | 21488 | 710 | n,c = map(int,input().split())
table = [0 for i in range(10**5+1)]
chan = [[] for _ in range(c+2)]
for _ in range(n):
s,t,c = map(int,input().split())
chan[c].append([s,t])
# 同チャンネルの連続番組を統合する
times = []
for i in range(c+2):
arr = chan[i]
if chan[i]==[] : continue
for i in range(len(arr)):
... |
s413308806 | p03504 | u054556734 | 1568172854 | Python | Python (3.4.3) | py | Runtime Error | 468 | 21520 | 694 | n,c = map(int,input().split())
table = [0]*(10**5)
chan = [[] for _ in range(c+1)]
for _ in range(n):
s,t,c = map(int,input().split())
chan[c].append([s,t])
# 同チャンネルの連続番組を統合する
times = []
for i in range(c+2):
arr = chan[i]
if chan[i]==[] : continue
for i in range(len(arr)):
if i == len(arr)... |
s668751030 | p03504 | u054556734 | 1568172744 | Python | Python (3.4.3) | py | Runtime Error | 531 | 25996 | 622 | n,c = map(int,input().split())
table = [0]*(10**5)
chan = [[] for _ in range(c+1)]
for _ in range(n):
s,t,c = map(int,input().split())
chan[c].append([s,t])
times = []
for i in range(c+2):
arr = chan[i]
if chan[i]==[] : continue
for i in range(len(arr)):
if i == len(arr)-1 : break
... |
s639343483 | p03504 | u266874640 | 1567628416 | Python | PyPy3 (2.4.0) | py | Runtime Error | 182 | 38384 | 687 | import numpy as np
N, C = map(int,input().split())
T = [[] for i in range(31)]
for i in range(N):
s,t,c = map(int,input().split())
T[c].append([s,t])
for i in range(len(T)):
times = T[i]
times.sort()
idx = 0
while len(times) > 1:
if times[idx][1] == times[idx+1][0]:
times[id... |
s513780804 | p03504 | u266874640 | 1567628071 | Python | Python (3.4.3) | py | Runtime Error | 255 | 18368 | 659 | import numpy as np
N, C = map(int,input().split())
for i in range(N):
s,t,c = map(int,input().split())
T[c].append([s,t])
for i in range(len(T)):
times = T[i]
times.sort()
idx = 0
while len(times) > 1:
if times[idx][1] == times[idx+1][0]:
times[idx] = [times[idx][0], times[i... |
s613244661 | p03504 | u191874006 | 1567121177 | Python | PyPy3 (2.4.0) | py | Runtime Error | 441 | 66396 | 1045 | #!/usr/bin/env python3
#ABC80 D
import sys
import math
import bisect
sys.setrecursionlimit(1000000000)
from heapq import heappush, heappop,heappushpop
from collections import defaultdict
from itertools import accumulate
from collections import Counter
from collections import deque
from operator import itemgetter
from ... |
s958444497 | p03504 | u619819312 | 1566712531 | Python | Python (3.4.3) | py | Runtime Error | 540 | 28832 | 470 | from heapq import *
from itertools import chain
n,c=map(int,input().split())
a=sorted([list(map(int,input().split()))for i in range(n)])
b=[[]for i in range(c+1)]
for i,j,h in a:
if len(b[h])>0:
if b[h][-1][1]==i:
b[h][-1][1]=j
else:
b[h].append([i,j])
d=sorted(chain.from_iterable(b)... |
s540434527 | p03504 | u545368057 | 1566480020 | Python | Python (3.4.3) | py | Runtime Error | 345 | 4772 | 553 | """
https://atcoder.jp/contests/abc080/tasks/abc080_d
400
同じチャンネル同士でかぶりが発生するとアウト
imos
"""
N,C = map(int, input().split())
t_max = 10**5
# c_imos = [[0]*t_max for t in range(C)]
imos = [0] * t_max
for i in range(N):
s,t,c = map(int, input().split())
c -= 1
# t -= 1
s -= 1
# c_imos[c][s] += 1
#... |
s254068731 | p03504 | u545368057 | 1566479931 | Python | PyPy3 (2.4.0) | py | Runtime Error | 608 | 47592 | 350 | N,C = map(int, input().split())
t_max = 10**5
# c_imos = [[0]*t_max for t in range(C)]
imos = [0] * t_max
for i in range(N):
s,t,c = map(int, input().split())
c -= 1
# t -= 1
s -= 1
# c_imos[c][s] += 1
# c_imos[c][t] -= 1
imos[s] += 1
imos[t] -= 1
# for c_ in c_imos:
# pri... |
s874347135 | p03504 | u191874006 | 1566238031 | Python | PyPy3 (2.4.0) | py | Runtime Error | 661 | 138048 | 1286 | #!/usr/bin/env python3
#ABC80 D
import sys
import math
import bisect
sys.setrecursionlimit(1000000000)
from heapq import heappush, heappop,heappushpop
from collections import defaultdict
from itertools import accumulate
from collections import Counter
from collections import deque
from operator import itemgetter
from ... |
s308514699 | p03504 | u927534107 | 1565970674 | Python | Python (3.4.3) | py | Runtime Error | 361 | 3828 | 176 | n,c=map(int,input().split())
l=[0]*10**5
for i in range(n):
s,t,c=map(int,input().split())
l[s-1]+=1
l[t]-=1
for i in range(10**5-1):
l[i+1]+=l[i]
print(max(l)) |
s641694964 | p03504 | u472065247 | 1565552684 | Python | Python (3.4.3) | py | Runtime Error | 2105 | 37600 | 773 | N, C = map(int, input().split())
TV = [list(map(int, input().split())) for _ in range(N)]
TV = sorted([l for l in TV], key=lambda x: x[0])
X = []
for c in range(1, C + 1):
TV_temp = [l for l in TV if l[2] == c]
TV_T = list(zip(*TV_temp))
l = []
for tv in TV_temp:
if tv[1] in TV_T[0]:
... |
s806614130 | p03504 | u619197965 | 1562193483 | Python | PyPy3 (2.4.0) | py | Runtime Error | 910 | 93912 | 406 | n,C=[int(i) for i in input().split()]
stc=[[int(i) for i in input().split()] for _ in range(n)]
stc.sort(key=lambda x:x[1])
stc.sort(key=lambda x:x[2])
time=[0]*(2*(10**5+1))
end=[[0]*(10**5) for _ in range(C)]
for s,t,c in stc:
end[c-1][t]+=1
for s,t,c in stc:
if end[c-1][s]==0:
time[2*s-1]+=1
ti... |
s447453144 | p03504 | u619197965 | 1562191252 | Python | PyPy3 (2.4.0) | py | Runtime Error | 731 | 66392 | 258 | n,c=[int(i) for i in input().split()]
stc=sorted([[int(i) for i in input().split()] for _ in range(n)],key=lambda x:x[0])
time=[0]*(10**5)
for s,t,c in stc:
time[s-1]+=1
time[t]-=1
for i in range(10**5):
time[i]=time[i-1]+time[i]
print(max(time)) |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.