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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
s004959290 | p03503 | u637551956 | 1574280430 | Python | Python (3.4.3) | py | Runtime Error | 18 | 3064 | 592 | import itertools
N=int(input())
F = [list(map(int, input().split())) for i in range(N)]
P = [list(map(int, input().split())) for i in range(N)]
store_str=list(product('01', repeat=10))
store=[[int(i) for i in j] for j in store_str]
store.pop(0)
all_sum=[]
for s in store:#joiの店をあけられる時間帯の組み合わせ
value_list=[]
for ... |
s687536127 | p03503 | u753803401 | 1573440318 | Python | PyPy3 (2.4.0) | py | Runtime Error | 174 | 38256 | 617 | import sys
import itertools
def solve():
readline = sys.stdin.buffer.readline
mod = 10 ** 9 + 7
n = int(readline())
f = [list(map(int, readline().split())) for _ in range(n)]
p = [list(map(int, readline().split())) for _ in range(n)]
mt = - (10 ** 10)
for it in itertools.product([True, Fal... |
s402591576 | p03503 | u759412327 | 1573146614 | Python | Python (3.4.3) | py | Runtime Error | 18 | 3060 | 188 | N=int(input())
F=[int(input()[::2],2)for _ in range(N)]
P=[list(map(int,input().split(" "))) for _ in range(N)]
print(max(sum(p[bin(i&f).count("1")]for f,p in zip(F,P))for i in r(1,1024))) |
s301826805 | p03503 | u759412327 | 1573146199 | Python | Python (3.4.3) | py | Runtime Error | 18 | 3060 | 209 | N = int(input())
F = [list(map(int,input().split())) for _ in range(N)]
P = [list(map(int,input().split())) for _ in range(N)]
print(max(sum([p[bin(f&i).count('1')]for f,p in zip(F,P)])for i in range(1,1024))) |
s155099112 | p03503 | u301387419 | 1571786409 | Python | Python (3.4.3) | py | Runtime Error | 29 | 3064 | 616 | N = int(input())
F = []
P = []
Pre = []
for i in range(N):
F.append(list(map(int, input().split())))
for i in range(N):
P.append(list(map(int, input().split())))
for loop in range(1,1024):
rieki = 0
Fnum = 0
f = str(format(loop,"b")).rjust(10,"0") #自店の開店時間帯
for i in range(N): # 全店舗に対し利益計算
for j in rang... |
s327305064 | p03503 | u622045059 | 1570396055 | Python | PyPy3 (2.4.0) | py | Runtime Error | 202 | 42480 | 481 | N = int(input())
F = [list(map(int, input().split())) for _ in range(N)]
P = [list(map(int, input().split())) for _ in range(N)]
max_v = -(10 ** 10)
for i in range(1,2**10):
S_cnt = [0] * 10
for j in range(10):
if i % 2 == 1:
for k in range(N):
if F[k][j] == 1:
... |
s406725167 | p03503 | u945181840 | 1569114099 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 552 | N = int(input())
F = [list(map(int, input().split())) for i in range(N)]
P = [list(map(int, input().split())) for i in range(N)]
l = [format(i, 'b').zfill(10) for i in range(1, 2 ** 10)]
ans = []
for i in l:
c = [0] *
for j in range(10):
if i[j] == '1':
for k in range(N):
i... |
s757102250 | p03503 | u332657092 | 1568990945 | Python | PyPy3 (2.4.0) | py | Runtime Error | 180 | 38384 | 490 | n = int(input())
ans = 0
import numpy as np
F = [list(map(int, input().split())) for i in range(n)]
P = [list(map(int, input().split())) for i in range(n)]
Cands = [[]]
for i in range(10):
temp = []
for cand in Cands:
temp.append(cand + [0])
temp.append(cand + [1])
Cands = temp
Cands = Cands[1:]
max... |
s621186842 | p03503 | u867763103 | 1568523684 | Python | Python (3.4.3) | py | Runtime Error | 28 | 3064 | 602 | N = int(input())
F = []
for i in range(N):
F_temp = list(map(int, input().split()))
F.append(F_temp)
P = []
for i in range(N):
P_temp = list(map(int, input().split()))
P.append(P_temp)
ans = -1000000000
for i in range(1,1024):
F0 = [0]*10
i_temp = i
for j in range(10):
F0[j] = i_te... |
s413027153 | p03503 | u610473220 | 1567188851 | Python | Python (3.4.3) | py | Runtime Error | 35 | 3188 | 571 | N = int(input())
F = []
for _ in range(N):
F.append(list(map(int, input().split())))
P = []
for _ in range(N):
P.append(list(map(int, input().split())))
c = [0] * 10
ans = - float('inf')
tmp = 0
for i in range(1, 1024):
ii = format(i, 'b')
ii = str(ii)
ii = ii.zfill(10)
ii = list(ii)
fo... |
s999847604 | p03503 | u610473220 | 1567188791 | Python | Python (3.4.3) | py | Runtime Error | 35 | 3064 | 568 | N = int(input())
F = []
for _ in range(N):
F.append(list(map(int, input().split())))
P = []
for _ in range(N):
P.append(list(map(int, input().split())))
c = [0] * 10
ans = -1000000000
tmp = 0
for i in range(1, 1024):
ii = format(i, 'b')
ii = str(ii)
ii = ii.zfill(10)
ii = list(ii)
for j... |
s359578623 | p03503 | u610473220 | 1567188635 | Python | Python (3.4.3) | py | Runtime Error | 34 | 3188 | 558 | N = int(input())
F = []
for _ in range(N):
F.append(list(map(int, input().split())))
P = []
for _ in range(N):
P.append(list(map(int, input().split())))
c = [0] * 10
ans = -1000000000
tmp = 0
for i in range(1, 1024):
ii = format(i, 'b')
ii = str(ii)
ii = ii.zfill(10)
ii = list(ii)
for j... |
s495678122 | p03503 | u610473220 | 1567188429 | Python | Python (3.4.3) | py | Runtime Error | 29 | 3064 | 535 | N = int(input())
F = []
for _ in range(N):
F.append(list(input().split()))
P = []
for _ in range(N):
P.append(list(map(int, input().split())))
c = [0] * 10
ans = -1000000000
tmp = 0
for i in range(1, 1024):
i = format(i, 'b')
i = str(i)
i = i.zfill(10)
i = list(i)
for j in range(N):
... |
s327097490 | p03503 | u677523557 | 1565716223 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3064 | 753 | N = int(input())
F = [list(map(int, input().split())) for _ in range(N)]
P = [list(map(int, input().split())) for _ in range(N)]
def dfs(i, A, ans):
if i == 10:
ans.append(A)
return ans
B = A[:]
B.append(0)
ans = dfs(i+1, B, ans)
C = A[:]
C.append(1)
ans = dfs(i+1, C, ans)
... |
s302008548 | p03503 | u091051505 | 1565480198 | Python | Python (3.4.3) | py | Runtime Error | 27 | 3064 | 560 | n = int(input())
f = []
for _ in range(n):
f.append(list(map(int, input().split())))
p = []
for _ in range(n):
p.append(list(map(int, input().split())))
ans = - (10 ** 9)
for i in range(1, 2 ** 10):
store = {lll : 0 for lll in range(10)}
k = "0" * (10 - len(bin(i)) + 2) + bin(i)[2:]
for j, kk in enu... |
s649068609 | p03503 | u091051505 | 1565478433 | Python | Python (3.4.3) | py | Runtime Error | 18 | 3064 | 605 | import sys
sys.setrecursionlimit(100000000000)
n = int(input())
f = []
for _ in range(n):
f.append(list(map(int, input().split())))
p = []
for _ in range(n):
p.append(list(map(int, input().split())))
ans = - (10 ** 9)
for i in range(1, 2 ** 10):
store = {i : 0 for i in range(10)}
k = "0" * (10 - len(bi... |
s456830803 | p03503 | u091051505 | 1565478398 | Python | Python (3.4.3) | py | Runtime Error | 27 | 3064 | 599 | import sys
sys.setrecursionlimit(1000000)
n = int(input())
f = []
for _ in range(n):
f.append(list(map(int, input().split())))
p = []
for _ in range(n):
p.append(list(map(int, input().split())))
ans = - (10 ** 9)
for i in range(1, 2 ** 10):
store = {i : 0 for i in range(10)}
k = "0" * (10 - len(bin(i))... |
s040531749 | p03503 | u091051505 | 1565478132 | Python | Python (3.4.3) | py | Runtime Error | 27 | 3064 | 556 | n = int(input())
f = []
for _ in range(n):
f.append(list(map(int, input().split())))
p = []
for _ in range(n):
p.append(list(map(int, input().split())))
ans = - (10 ** 9)
for i in range(1, 2 ** 10):
store = {i : 0 for i in range(10)}
k = "0" * (10 - len(bin(i)) + 2) + bin(i)[2:]
for j, kk in enumera... |
s317072587 | p03503 | u091051505 | 1565477189 | Python | Python (3.4.3) | py | Runtime Error | 26 | 3192 | 544 | n = int(input())
f = []
for _ in range(n):
f.append(list(map(int, input().split())))
p = []
for _ in range(n):
p.append(list(map(int, input().split())))
ans = []
for i in range(1, 2 ** 10):
store = [0 for _ in range(10)]
k = "0" * (10 - len(bin(i)) + 2) + bin(i)[2:]
for j, kk in enumerate(k):
... |
s492986345 | p03503 | u626337957 | 1564360275 | Python | Python (3.4.3) | py | Runtime Error | 18 | 3064 | 480 | N = int(input())
opens = [list(map(int, input().split())) for _ in range(N)]
values = [list(map(int, input().split())) for _ in range(N)]
ans = -(10**9)
for time in range(2**N+1):
sum_v = 0
for idx, open in enumerate(opens):
open_str = ''.join(open)
bin_str = format(time, '010b')
both_open = bin_str&bi... |
s435979286 | p03503 | u196697332 | 1562379274 | Python | Python (3.4.3) | py | Runtime Error | 18 | 3064 | 585 | import sys
N = int(input())
time_lis = [0] * N
profit = [0] * N
for n in range(N):
time_lis[n] = list(map(int, input().split()))
for n in range(N):
profit[n] = list(map(int, input().split()))
ans = 0
always_zero = True
for n in range(N):
count_1 = len([i for i in time_lis[n] if i == 1])
tmp= max(profi... |
s583671932 | p03503 | u196697332 | 1562379204 | Python | Python (3.4.3) | py | Runtime Error | 18 | 3064 | 579 | import sys
N = int(input())
time_lis = [0] * N
profit = [0] * N
for n in range(N):
time_lis[n] = list(map(int, input().split()))
for n in range(N):
profit[n] = list(map(int, input().split()))
ans = 0
always_zero = True
for n in range(N):
count_1 = len([i for i in time_lis[n] if i == 1])
ans += max(pro... |
s287634186 | p03503 | u196697332 | 1562379140 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3064 | 577 | import sys
N = int(input())
time_lis = [0] * N
profit = [0] * N
for n in range(N):
time_lis[n] = list(map(int, input().split()))
for n in range(N):
profit[n] = list(map(int, input().split()))
ans = 0
always_zero = True
for n in range(N):
count_1 = len([i for i in time_lis[n] if i == 1])
ans += max(pro... |
s717952607 | p03503 | u196697332 | 1562379074 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3064 | 583 | import sys
N = int(input())
time_lis = [0] * N
profit = [0] * N
for n in range(N):
time_lis[n] = list(map(int, input().split()))
for n in range(N):
profit[n] = list(map(int, input().split()))
ans = 0
always_zero = True
for n in range(N):
count_1 = len([i for i in time_lis[n] if i == 1])
tmp= max(profi... |
s849686053 | p03503 | u196697332 | 1562378539 | Python | Python (3.4.3) | py | Runtime Error | 18 | 3064 | 514 | import sys
N = int(input())
time_lis = [0] * N
profit = [0] * N
for n in range(N):
time_lis[n] = list(map(int, input().split()))
for n in range(N):
profit[n] = list(map(int, input().split()))
ans = 0
always_zero = True
for n in range(N):
count_1 = len([i for i in time_lis[n] if i == 1])
ans += max(pro... |
s846315600 | p03503 | u023958502 | 1561644538 | Python | Python (3.4.3) | py | Runtime Error | 18 | 3064 | 301 | n = int(input())
f = [int(input().replace(' ',''),2) for i in range(n)]
p = [list(map(int,input().split())) for i in range(n)]
prof = - 10 ** 10
for i in range(1,1 <<10):
prof1 = 0
for j,time in enumerate(f):
same = bin(i & time).count(1)
prof1 += p[j][same]
prof = max(prof,prof1)
print(prof)
|
s913194076 | p03503 | u023958502 | 1561601471 | Python | Python (3.4.3) | py | Runtime Error | 18 | 3064 | 272 | N=int(input())
F=[int(input().replace(' ',''),2) for _ in range(N)]
P=[list(map(int,input(),split())) for _ in range(N)]
ans=-10**10
for i in range(1,1<<10):
prof=0
for j,f in enumerate(F):
prof+=P[j][bin(i&f).count("1")]
ans=max(ans,prof)
print(ans) |
s923531701 | p03503 | u498620941 | 1560302410 | Python | Python (3.4.3) | py | Runtime Error | 27 | 3064 | 456 | N = int(input())
st_con = [[i for i in map(int,input().split())] for j in range(N)]
rieki = [[i for i in map(int,input().split())] for j in range(N)]
ans = -10**9
for i in range(1,2**10):
a = 0
count = [0]*10
for j in range(N):
for h in range(10):
if (i>>h) & st_con[j][h] and (i>>h) == ... |
s409193785 | p03503 | u498620941 | 1560301912 | Python | Python (3.4.3) | py | Runtime Error | 29 | 3064 | 429 | N = int(input())
st_con = [[i for i in map(int,input().split())] for j in range(N)]
rieki = [[i for i in map(int,input().split())] for j in range(N)]
ans = []
for i in range(1,2**10):
a = 0
count = [0]*10
for j in range(N):
for h in range(10):
if (i>>h) & st_con[j][h] and (i>>h)&1:
... |
s339033146 | p03503 | u498620941 | 1560301796 | Python | Python (3.4.3) | py | Runtime Error | 29 | 3064 | 429 | N = int(input())
st_con = [[i for i in map(int,input().split())] for j in range(N)]
rieki = [[i for i in map(int,input().split())] for j in range(N)]
ans = []
for i in range(1,2**10):
a = 0
count = [0]*10
for j in range(N):
for h in range(10):
if (i>>h) & st_con[j][h] and (i>>h)&1:
... |
s083928316 | p03503 | u502389123 | 1556771938 | Python | Python (3.4.3) | py | Runtime Error | 22 | 3064 | 562 | N = int(input())
F = [list(map(int, input().split())) for i in range(N)]
P = [list(map(int, input().split())) for i in range(N)]
ans = -10**9
v = [0] * 10
def culc():
global ans
score = 0
index = 0
if any(v) == False:
return
for i in range(N):
for j in range(10):
index +... |
s882306290 | p03503 | u514299323 | 1556405230 | Python | Python (3.4.3) | py | Runtime Error | 18 | 3064 | 765 | N=int(input())
F=[]
for i in range(N):
tem = list(map(int,input().split()))
F.append(tem)
P=[]
for i in range(N):
tem = list(map(int,input().split()))
P.append(tem)
max_benef =-float("inf")
for d in range(1,2**10):
op = ["-"] * 10 # あらかじめ ["-", "-", "-"] というリストを作っておく
for j in range(10):
... |
s562870169 | p03503 | u191829404 | 1554862868 | Python | PyPy3 (2.4.0) | py | Runtime Error | 180 | 38768 | 1546 | # https://qiita.com/_-_-_-_-_/items/34f933adc7be875e61d0
# abcde s=input() s='abcde'
# abcde s=list(input()) s=['a', 'b', 'c', 'd', 'e']
# 5(1つだけ) a=int(input()) a=5
# 1 2 | x,y = s_inpl() | x=1,y=2
# 1 2 3 4 5 ... n li = input().split() li=['1','2','3',...,'n']
# 1 2 3 4 5 ... n li = inpl() li=[1,2,3,4,5,...,n]
... |
s338212651 | p03503 | u538381753 | 1554596128 | Python | Python (3.4.3) | py | Runtime Error | 18 | 2940 | 313 | n = int(input())
f = [input().split(' ') for _ in range(n)]
p = [input().split(' ') for _ in range(n)]
res = -10**8
for num in range(1, 1024):
tmp = 0
for index in range(0, n):
tmp += int(p[index][len([True for x in range(0, 10) if f[index][x]==f'{num:010b}'[x]=='1'])])
res = max(tmp, res)
print(res)
|
s805621946 | p03503 | u350049649 | 1554354851 | Python | Python (3.4.3) | py | Runtime Error | 30 | 3064 | 398 | N=int(input())
F=[list(map(int,input().split())) for _ in range(N)] #0-9
P=[list(map(int,input().split())) for _ in range(N)] #0-10
INF=10**9
ans=-INF
for i in range(1,2**10):
tmp=[0]*10
tmpans=0
for j in range(0,10):
bit=i>>j&1
for n in range(N):
tmp[n]+=F[n][j]*bit
for n ... |
s315557425 | p03503 | u350049649 | 1554354019 | Python | Python (3.4.3) | py | Runtime Error | 30 | 3064 | 398 | N=int(input())
F=[list(map(int,input().split())) for _ in range(N)] #0-9
P=[list(map(int,input().split())) for _ in range(N)] #0-10
INF=10**9
ans=-INF
for i in range(1,2**10):
tmp=[0]*10
tmpans=0
for j in range(0,10):
bit=i>>j&1
for n in range(N):
tmp[n]+=F[n][j]*bit
for n ... |
s335053823 | p03503 | u046187684 | 1554234630 | Python | Python (3.4.3) | py | Runtime Error | 19 | 3064 | 895 | from itertools import product
import numpy as np
def solve(string):
n, *fp = map(int, string.split())
# f = np.asarray(fp[:10 * n]).reshape((n, 10))
f = fp[:10 * n]
p = fp[10 * n:]
ans = -n * 10**7
"""
for o in product([0, 1], repeat=10):
if sum(o) == 0:
continue
... |
s400220921 | p03503 | u046187684 | 1554234603 | Python | Python (3.4.3) | py | Runtime Error | 18 | 3064 | 914 | from itertools import product
import numpy as np
def solve(string):
n, *fp = map(int, string.split())
# f = np.asarray(fp[:10 * n]).reshape((n, 10))
f = fp[:10 * n]
p = fp[10 * n:]
ans = -n * 10**7
"""
for o in product([0, 1], repeat=10):
if sum(o) == 0:
continue
... |
s540814424 | p03503 | u798129018 | 1554167259 | Python | Python (3.4.3) | py | Runtime Error | 19 | 3064 | 383 | n = int(input())
F =[list(map(int,input().split())) for i in range(n)]
P =[list(map(int,input().split())) for i in range(n)]
ans = -INF
for i in range(1,1024):
profit = 0
for j in range(n):
cnt = 0
for x in range(10):
if (i >> x) %2 == 1 and F[j][x] == 1:
cnt += 1
... |
s781421267 | p03503 | u412563426 | 1553914083 | Python | Python (3.4.3) | py | Runtime Error | 18 | 3064 | 497 | import numpy as np
n = int(input())
f = np.array([list(map(int, input().split())) for i in range(n)])
p = np.array([list(map(int, input().split())) for i in range(n)])
ans = -99999999
openptn=np.array([[int(s) for s in list('{0:010b}'.format(i))] for i in range(1,2**10)])
for i in range(2**10 - 1):
subans = 0
for... |
s738823230 | p03503 | u412563426 | 1553912956 | Python | Python (3.4.3) | py | Runtime Error | 941 | 14336 | 432 | import numpy as np
n = int(input())
f = np.array([list(map(int, input().split())) for i in range(n)])
p = np.array([list(map(int, input().split())) for i in range(n)])
ans = -99
openptn=np.array([[int(s) for s in list('{0:010b}'.format(i))] for i in range(1,2**10)])
for i in range(2**10):
subans = 0
for j in rang... |
s055211974 | p03503 | u059210959 | 1553119675 | Python | Python (3.4.3) | py | Runtime Error | 485 | 14208 | 897 | # encoding:utf-8
import copy
import numpy as np
import random
n = int(input())
F = []
for i in range(n):
f = [int(i) for i in input().split()]
F.append(f)
P = []
for i in range(n):
P.append([int(i) for i in input().split()])
F = np.array(F)
P = np.array(P)
def cal_val(shop_num,open_time):
same_ti... |
s439427857 | p03503 | u707498674 | 1552702607 | Python | Python (3.4.3) | py | Runtime Error | 36 | 3064 | 675 | import sys
sys.setrecursionlimit(10000)
N = int(input())
F = [list(map(int, input().split())) for i in range(N)]
P = [list(map(int, input().split())) for i in range(N)]
INF = 10 ** 9
def dfs(s):
if len(s) == 10:
value = -INF
if "1" in s:
value = 0
c= [0 for i in range(10)]
... |
s616016201 | p03503 | u707498674 | 1552702373 | Python | Python (3.4.3) | py | Runtime Error | 36 | 3064 | 634 | N = int(input())
F = [list(map(int, input().split())) for i in range(N)]
P = [list(map(int, input().split())) for i in range(N)]
INF = 10 ** 9
def dfs(s):
if len(s) == 10:
value = -INF
if "1" in s:
value = 0
c= [0 for i in range(10)]
for i in range(5):
... |
s566057217 | p03503 | u099566485 | 1552616905 | Python | Python (3.4.3) | py | Runtime Error | 18 | 3064 | 377 | #080-C
def IL(): return list(map(int,input().split()))
def SL(): return input().split()
def I(): return int(input())
def S(): return list(input())
n=IL()
F=[int(input().replace(" ",""), 2) for _ in range(n)]
P=[IL() for i in range(n)]
ans=-pow(10,10)
for i in range(1,pow(2,10)):
t=0
for f,p in zip(F,P):
... |
s707453414 | p03503 | u030090262 | 1551759956 | Python | Python (3.4.3) | py | Runtime Error | 19 | 3064 | 493 | #from collections import Counter
N=int(input())
"""F=list(list(map(int,input().split())) for i in range(N))
P=list(list(map(int,input().split())) for i in range(N))"""
F=[int(input().replace(' ',''),2)for _ in[0]*N]
P=[list(map(int,input().split()))for _ in[0]*N]
ans=-(1<<40)
for bit in range(1,1<<10):
tmp = 0
... |
s468338929 | p03503 | u863841238 | 1551653496 | Python | Python (3.4.3) | py | Runtime Error | 22 | 3188 | 459 | MIN = -(10**7)-1
def solve():
cnt = 0
i = 0
for lst in f_lst:
chk_range = sum(lst)
cnt += max(p_lst[i][1:chk_range])
i += 1
if cnt < 0:
cnt = min(min(p_lst))
return cnt
n = int(input())
f_lst = [[] for _ in range(n)]
p_lst = [[] for _ in range(n)]
for i in range(n)... |
s537791059 | p03503 | u863841238 | 1551653458 | Python | Python (3.4.3) | py | Runtime Error | 19 | 3064 | 485 | MIN = -(10**7)-1
def solve():
cnt = 0
i = 0
for lst in f_lst:
chk_range = sum(lst)
cnt += max(p_lst[i][1:chk_range])
i += 1
if cnt < 0:
cnt = min(min(p_lst))
return cnt
n = int(input())
f_lst = [[] for _ in range(n)]
p_lst = [[] for _ in range(n)]
for i in range(n)... |
s797484748 | p03503 | u514383727 | 1551522164 | Python | Python (3.4.3) | py | Runtime Error | 31 | 3064 | 438 | n = int(input())
f = [list(map(int, input().split())) for _ in range(n)]
p = [list(map(int, input().split())) for _ in range(n)]
res = -10**10
for i in range(1, 1<<10):
count = [0 for _ in range(10)]
for j in range(10):
for k in range(n):
if (i>>j)&1 == 1 and f[k][j] == 1:
co... |
s414124301 | p03503 | u729133443 | 1550868618 | Python | Python (3.4.3) | py | Runtime Error | 18 | 3060 | 168 | I=input;n=int(I());print(max(sum(p[bin(i&f).count('1')]for f,p in zip([int(I()[::2],2)for _ in[0]*n],[list(map(int,I().split()))for _ in[0]*n]))for i in range(1,1024))) |
s282475459 | p03503 | u174394352 | 1549500376 | Python | PyPy3 (2.4.0) | py | Runtime Error | 183 | 38256 | 441 | N=int(input())
C=[]
S=[]
F=[]
from math import ceil
for _ in range(N-1):
c,s,f=map(int,input().split())
C.append(c)
S.append(s)
F.append(f)
ans=[]
for i in range(0,N-1):
t=S[i]+C[i]
sta=i+1
while sta<N-1:
if t<=S[sta]:
t=S[sta]+C[sta]
else:
k=ceil((t-S... |
s574723193 | p03503 | u077337864 | 1548560600 | Python | Python (3.4.3) | py | Runtime Error | 19 | 3064 | 437 | n = int(input())
f = []
p = []
for _ in range(n):
f.append(list(map(int, input().strip().split())))
for _ in range(n):
p.append(list(map(int, input().strip().split())))
maxt = None
for i in range(1, 2**10):
total = 0
for _f, _p in zip(f, p):
c = 0
for bi, fi in zip(bin(i)[2::-1], _f):
if fi==1 an... |
s155557191 | p03503 | u977389981 | 1548467797 | Python | Python (3.4.3) | py | Runtime Error | 19 | 3064 | 544 | n = int(input())
F = [[int(i) for i in input().split()] for i in range(n)]
P = [[int(i) for i in input().split()] for i in range(n)]
def f(x):
if x % 2 == 0:
return 1
else:
return 0
ans = -10 ** 10
for i in range(1, 2 ** 10):
for j in range(10):
A[j] = f(i // (2 ** (10 - i)))
... |
s891658588 | p03503 | u175034939 | 1547536076 | Python | Python (3.4.3) | py | Runtime Error | 18 | 3064 | 383 | p0 = []
maxp = []
for i in range(n):
p0.append(p[i][0])
sumf = sum(f[i])
maxp.append(max(p[i][1:(sumf+1)]))
cnt = 0
sum_max = 0
for i in range(n):
if p0[i] > maxp[i]:
cnt += 1
sum_max += max(p0[i],maxp[i])
if cnt == n:
a = []
for i in range(n):
a.append(p0[i] + sum(maxp[:i]... |
s794892996 | p03503 | u924406834 | 1546692650 | Python | Python (3.4.3) | py | Runtime Error | 406 | 3064 | 642 | ls = []
def onoff(n):
global ls
if len(n) == 10:
ls.append(n)
else:
onoff(n + '0')
onoff(n + '1')
onoff('0')
onoff('1')
del ls[0]
n = int(input())
f = [list(map(str,input().split())) for x in range(n)]
p = [list(map(int,input().split())) for x in range(n)]
ans = -99999999999999999999... |
s388802383 | p03503 | u677440371 | 1544483026 | Python | Python (3.4.3) | py | Runtime Error | 183 | 3064 | 641 | n = int(input())
f = []
for i in range(n):
f.append(list(map(int, input().split())))
p = []
for i in range(n):
p.append(list(map(int, input().split())))
count = {}
ans = []
for bits in range(1 << 10):
count = {}
for i in range(10):
if (bits >> i & 1) == 1:
for j in range(n):
... |
s134663110 | p03503 | u677440371 | 1544482965 | Python | Python (3.4.3) | py | Runtime Error | 163 | 3064 | 643 | n = int(input())
f = []
for i in range(n):
f.append(list(map(int, input().split())))
p = []
for i in range(n):
p.append(list(map(int, input().split())))
count = {}
ans = []
for bits in range(1 << 10):
count = {}
for i in range(10):
if (bits >> i & 1) == 1:
for j in range(n):
... |
s306404040 | p03503 | u826263061 | 1541373815 | Python | Python (3.4.3) | py | Runtime Error | 18 | 3064 | 653 | # -*- coding: utf-8 -*-
"""
Created on Sun Nov 4 17:22:42 2018
ABC080
@author: maezawa
"""
import itertools as itr
n = int(input())
f = []
for i in range(n):
f.append(list(map(int, input().split())))
p = []
for i in range(n):
p.append(list(map(int, input().split())))
#print(f)
#print(p)
profit = -10**8
f... |
s757230934 | p03503 | u064408584 | 1538096602 | Python | Python (3.4.3) | py | Runtime Error | 19 | 3188 | 434 | from itertools import product
al=list(product([0,1],repeat=10))
n=int(input())
a=[list(map(int, input().split())) for i in range(n)]
p=[list(map(int, input().split())) for i in range(n)]
ans-100000000000
for i in al:
if sum(i)==0:continue
q=0
for j in range(n):
count=0
for k in range(10):
... |
s162904268 | p03503 | u663101675 | 1535495346 | Python | Python (3.4.3) | py | Runtime Error | 19 | 3064 | 575 | import math
N = int(input())
F = [[] * 10 for i in range(N)]
for i in range(N):
F[i] = list(map(int, input().split()))
P = [[] * 11 for i in range(N)]
for i in range(N):
P[i] = list(map(int, input().split()))
L = [0] * 10
Sum_max = -float(math.inf)
for i in range(1, 1024):
for j in range(10):
L[j] =... |
s359705023 | p03503 | u759651152 | 1532723990 | Python | Python (3.4.3) | py | Runtime Error | 18 | 3064 | 959 | #-*-coding:utf-8-*-
def main():
n = int(input())
f_list = []
p_list = []
#f_list = [list(map(int, input().split())) for i in range(n)]
#p_list = [list(map(int, input().split())) for i in range(n)]
for i in range(N):
tmp=list(map(int, input().split()))
f_list.append(tmp)
f... |
s327135090 | p03503 | u419686324 | 1532315543 | Python | Python (3.4.3) | py | Runtime Error | 152 | 12164 | 384 | import math
import numpy as np
N = int(input())
F = [[int(x) for x in input().split()] for _ in range(N)]
P = [[int(x) for x in input().split()] for _ in range(N)]
f = np.array(F)
ans = -math.inf
for n in range(1, 2**10):
a = np.array([int(x) for x in bin(n)[2:].rjust(10, '0')])
p = sum([P[i][x] for i,x in enu... |
s705689466 | p03503 | u403301154 | 1532151128 | Python | Python (3.4.3) | py | Runtime Error | 301 | 3064 | 512 | n = int(input())
ans = float("-INF")
f = [[0 for i in range(10)] for i in range(n)]
p = [[0 for i in range(10)] for i in range(n)]
for i in range(n):
ft = list(map(int, input().split()))
for j in range(10):
f[i][j] = ft[j]
for i in range(n):
pt = list(map(int, input().split()))
for j in range(10):
p[i][... |
s553257960 | p03503 | u480847874 | 1523385161 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3064 | 611 | def ans():
tmp = -9999999999999
N = int(input())
F = [list(map(int, input().split())) for i in range(N)]
P = [list(map(int, input().split())) for i in range(N)]
def calculate(B):
v = []
for n in range(N):
mcnt = 0
for k in range(10):
if B[k] =... |
s569347796 | p03503 | u222841610 | 1519974598 | Python | Python (3.4.3) | py | Runtime Error | 375 | 3316 | 488 | n = int(input())
f = [list(map(int,input().split())) for _ in range(n)]
p = [list(map(int,input().split())) for _ in range(n)]
a = []
count = 0
point = []
PP = []
for _ in range(1025,2048):
a.append(list(map(int,list(bin(_)[3:]))))
for k in range(1024):
for i in range(n):
for j in range(10):
... |
s508369784 | p03503 | u812028791 | 1517941612 | Python | Python (2.7.6) | py | Runtime Error | 11 | 2692 | 597 | # -*- coding: utf-8 -*-
import sys
n = int(raw_input().split()[0])
tl = []
for i in range(n):
e = [int(e) for e in raw_input().split()]
tl.append(e)
#print tl
t = 0
x = 0
y = 0
ans = 'Yes'
for i in tl:
ti, xi, yi = i
dt = ti - t
dx = abs(xi - x)
dy = abs(yi - y)
# print [t,x,y], i, [dt,dx... |
s516231731 | p03503 | u598016178 | 1515942025 | Python | PyPy3 (2.4.0) | py | Runtime Error | 172 | 38768 | 524 | import numpy as np
n = int(input())
f = np.zeros((n, 10), dtype=np.int64)
p = np.zeros((n, 11), dtype=np.int64)
for i in range(n):
tmp = list(map(int, input().split()))
for j in range(10):
f[i][j] = tmp[j]
for i in range(n):
tmp = list(map(int, input().split()))
for j in range(11):
p[i][j] = tmp[j]
... |
s321558782 | p03503 | u803848678 | 1514188895 | Python | Python (3.4.3) | py | Runtime Error | 24 | 3188 | 537 | import itertools
n = int(input())
f = []
for i in range(n):
f.append(list(map(int, input().split())))
p = []
for i in range(n):
p.append(list(map(int, input().split())))
a = [i for i in range(10)]
combi = []
for i in range(10):
combi.extend(list(itertools.combinations(a,i+ 1)))
#print(combi)
ans = - floa... |
s450560015 | p03503 | u401093859 | 1513651375 | Python | Python (3.4.3) | py | Runtime Error | 19 | 3064 | 1159 | # -*- Coding: utf-8 -*-
n_shop = int(input())
i_schedule = []
i_benefit = []
max_profit = 0
#開店スケジュールを2進数→10進数に変換
for i in range(n_shop):
i_schedule.append(int(input().replace(" ",""),2))
for i in range(n_shop):
i_benefit.append(list(map(int,input().split())))
max_profit += min(i_benefit[i])
#全パ... |
s214180366 | p03503 | u870092796 | 1513006045 | Python | Python (3.4.3) | py | Runtime Error | 19 | 3064 | 310 | N = int(input())
F = [int(input().replace(" ",""),2) for _ in range(N)]
P = [list(map(int, input().split())) for _ in range(N)]
profit = float("-inf")
for i in range(1,1024):
tmp = 0
for j in range(N):
tmp = tmp + (bin(i & F[j]).count('1'))
tmp2 = P[j][tmp]
profit = max(profit, tmp2)
print(profit) |
s806360810 | p03503 | u870092796 | 1513005508 | Python | Python (3.4.3) | py | Runtime Error | 20 | 3188 | 300 | N = int(input())
F = [int(input().replace(" ",""),2) for _ in range(N)]
P = [list(map(int, input().split())) for _ in range(N)]
profit = float("-inf")
for i in range(1,1024):
tmp = 0
for j in range(N):
if i & F[j] :
tmp = tmp + 1
tmp2 = P[tmp]
profit = max(profit, tmp2)
print(profit) |
s834589870 | p03503 | u698567423 | 1512792218 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 360 | n = int(input())
f = [int(input().replace(" ", ""), 2) for _ in range(n)]
p = [list(map(int, input().split())) for _ in range(n)]
ans = float('-inf')
for i in range(1, 1024):
price = 0
for j in range(n):
price += p[j][bin(i & f[j]).count('1')]
an... |
s399579452 | p03503 | u818655004 | 1512641029 | Python | Python (3.4.3) | py | Runtime Error | 25 | 3064 | 686 | n = int(input())
shop_i = []
for i in range(n):
shop_i.append(list(map(int, input().split())))
gain_i = []
for i in range(n):
gain_i.append(list(map(int, input().split())))
gain_max = -100000000
for i in range(2**10):
if i ==0:
pass
else:
shop_sister = format(i, '010b')
... |
s958690762 | p03503 | u695429668 | 1512456748 | Python | Python (3.4.3) | py | Runtime Error | 20 | 3136 | 801 | # coding:utf-8
inp = input()
N = int(inp)
eigyo = []
b = []
Ci = []
for i in range(N):
N_ = list(map(int, input().split()))
eigyo.append(N_)
Ci.append(sum(N_))
P = []
for i in range(N):
P.append(list(map(int, input().split())))
ans = 0
a = list(map(lambda x: x*0, list(range(10))))
count = 0
def fu... |
s500454348 | p03503 | u789417951 | 1512446912 | Python | Python (3.4.3) | py | Runtime Error | 19 | 3064 | 519 | # coding :utf-8
N=int(input())
F=[]
P=[]
table = [2**i for i in range(10)]
#print(table)
for i in range(N):
lis = list(map(int, input().split()))
F.append(lis)
#print(F)
for i in range(N):
lis = list(map(int, input().split()))
P.append(lis)
#print(P)
max=-1000000000001
for i in range(1,1024):
t... |
s623586496 | p03503 | u596276291 | 1512411344 | Python | Python (3.4.3) | py | Runtime Error | 162 | 3824 | 1301 | import sys
from collections import defaultdict, Counter
from itertools import product, groupby, count, permutations, combinations
from math import pi, sqrt, ceil, floor
from collections import deque
from bisect import bisect, bisect_left, bisect_right
from string import ascii_lowercase
INF = float("inf")
sys.setrecursi... |
s831862791 | p03503 | u510295687 | 1512363485 | Python | Python (3.4.3) | py | Runtime Error | 22 | 3064 | 487 | # coding: utf-8
N = int(input())
F = []
P = []
table = [2**i for i in range(10)]
for i in range(N):
lis = list(map(int, input().split()))
F.append(lis)
for i in range(N):
lis = list(map(int, input().split()))
P.append(lis)
maxx = -1000000001
for i in range(1, 1025):
total = 0
for j in ra... |
s605006819 | p03503 | u909643606 | 1512357363 | Python | Python (3.4.3) | py | Runtime Error | 25 | 3192 | 2294 | n=int(input())
ans=-10**9
f=[[0 for i in range(10)] for j in range(n)]
p=[[0 for i in range(11)] for j in range(n)]
for i in range(n):
f[i]=[int(i) for i in input().split()]
for i in range(n):
p[i]=[int(i) for i in input().split()]
for i1 in range(2):
for i2 in range(2):
for i3 in range(2):
for i4 i... |
s393740380 | p03503 | u909643606 | 1512357328 | Python | Python (3.4.3) | py | Runtime Error | 26 | 3192 | 2294 | n=int(input())
ans=-10**9
f=[[0 for i in range(10)] for j in range(n)]
p=[[0 for i in range(11)] for j in range(n)]
for i in range(n):
f[i]=[int(i) for i in input().split()]
for i in range(n):
p[i]=[int(i) for i in input().split()]
for i1 in range(2):
for i2 in range(2):
for i3 in range(2):
for i4 i... |
s139805774 | p03503 | u909643606 | 1512356677 | Python | Python (3.4.3) | py | Runtime Error | 25 | 3316 | 2361 | n=int(input())
ans=-10**9
f=[[0 for i in range(10)] for j in range(n)]
p=[[0 for i in range(10)] for j in range(n)]
for i in range(n):
f[i]=[int(i) for i in input().split()]
for i in range(n):
p[i]=[int(i) for i in input().split()]
for i1 in range(2):
for i2 in range(2):
for i3 in range(2):
for i4 ... |
s142879119 | p03503 | u808427016 | 1512355039 | Python | Python (3.4.3) | py | Runtime Error | 46 | 3316 | 659 | import sys
line = sys.stdin.readline()
N = int(line.strip())
F = {}
for i in range(N):
line = sys.stdin.readline().strip()
xs = [int(x) for x in line.split()]
for j in range(10):
F[i, j] = xs[j]
f = [sum((1 << j) for j in range(10) if F[i,j]) for i in range(N)]
pt = [sum(((i >> j) & 1) for j in ... |
s949959871 | p03503 | u808427016 | 1512354759 | Python | Python (3.4.3) | py | Runtime Error | 47 | 3316 | 667 | import sys
line = sys.stdin.readline()
N = int(line.strip())
F = {}
for i in range(N):
line = sys.stdin.readline().strip()
xs = [int(x) for x in line.split()]
for j in range(10):
F[i, j] = xs[j]
f = [sum((1 << j) for j in range(10) if F[i,j]) for i in range(N)]
pt = [sum(((i >> j) & 1) for j in ... |
s385897747 | p03503 | u808427016 | 1512354634 | Python | Python (3.4.3) | py | Runtime Error | 48 | 3316 | 667 | import sys
line = sys.stdin.readline()
N = int(line.strip())
F = {}
for i in range(N):
line = sys.stdin.readline().strip()
xs = [int(x) for x in line.split()]
for j in range(10):
F[i, j] = xs[j]
f = [sum((1 << j) for j in range(10) if F[i,j]) for i in range(N)]
pt = [sum(((i >> j) & 1) for j in ... |
s659644963 | p03504 | u289288647 | 1601338130 | Python | Python (3.8.2) | py | Runtime Error | 28 | 9132 | 905 | def Recording():
n, c = map(int, input().split())
num = 30#2*10**5+1
# チャンネルごとにimos配列
imos = [[0]*num for _ in range(c)]
# imos
for _ in range(n):
s, t, c0 = map(int, input().split())
if imos[c0-1][s*2] < 0 and imos[c0-1][t*2-1] > 0:
imos[c0-1][s*2] = 0
... |
s109875551 | p03504 | u177411511 | 1600371176 | Python | PyPy3 (7.3.0) | py | Runtime Error | 325 | 85788 | 828 | import math,string,itertools,fractions,heapq,collections,re,array,bisect,sys,random,time, copy,bisect
from operator import itemgetter
#from heapq import heappush, heappop
#import numpy as np
#from scipy.sparse.csgraph import shortest_path, floyd_warshall, dijkstra, bellman_ford, johnson
#from scipy.sparse import csr_ma... |
s018347234 | p03504 | u391589398 | 1597074525 | Python | PyPy3 (7.3.0) | py | Runtime Error | 257 | 103816 | 492 | n, C = map(int, input().split())
cq = [[] for _ in range(C)]
for _ in range(n):
s, t, c = tuple(map(int, input().split()))
if cq[c-1]:
fs, ft = cq[c-1][-1]
if ft != s:
cq[c-1].append([s, t])
else:
cq[c-1][-1] = [fs, t]
else:
cq[c-1].append([s, t])
R ... |
s821829398 | p03504 | u786020649 | 1596578826 | Python | Python (3.8.2) | py | Runtime Error | 113 | 29444 | 255 | import sys
import numpy as np
readline=sys.stdin.readline
read=sys.stdin.read
n,c,*stc=map(int,read())
m=2*10**5
cht=np.zeros((c,m+1),dtype='int64')
for s,t,c in zip(*[iter(stc)]*3):
cht[c-1,2*t-1:2*s]=np.ones(2*t-2*s+1)
print(max(np.sum(cht,axis=0)))
|
s375747553 | p03504 | u786020649 | 1596577685 | Python | Python (3.8.2) | py | Runtime Error | 224 | 52184 | 445 | import sys
import numpy as np
readline=sys.stdin.readline
read=sys.stdin.read
n,c=map(int,readline().split())
m=2*10**5
stc=[list(map(int,l.split())) for l in read().splitlines()]
cht=np.array([])
for e in stc:
w=e[1]-e[0]
cht.vstack((cht,np.pad(np.ones(2*(e[1]-e[0])+1),(2*e[0]-1,m-2*e[1]),\
mode='... |
s581901315 | p03504 | u119148115 | 1596043011 | Python | PyPy3 (7.3.0) | py | Runtime Error | 292 | 160644 | 469 | import sys
def MI(): return map(int,sys.stdin.readline().rstrip().split())
N,C = MI()
A = [[0]*(10**5+1) for i in range(C+1)]
for i in range(N):
s,t,c = MI()
A[c][s] += 1
A[c][t+1] -= 1
from itertools import accumulate
for i in range(1,C+1):
A[i] = list(accumulate(A[i]))
# A[i][j] が正 ⇔ チャンネル i が時刻 j... |
s042757615 | p03504 | u113971909 | 1595677135 | Python | Python (3.8.2) | py | Runtime Error | 272 | 23420 | 692 | #!/usr/bin python3
# -*- coding: utf-8 -*-
from collections import deque
N, C = map(int,input().split())
Mx = 100#10**5+1
sch = [[0]*Mx for _ in range(C)]
scht = [0]*Mx
plist = [[] for _ in range(C)]
for _ in range(N):
s, t, c = map(int,input().split())
plist[c-1].append((s,t))
for c, p in enumerate(plist):
... |
s078228004 | p03504 | u113971909 | 1595636104 | Python | Python (3.8.2) | py | Runtime Error | 320 | 24008 | 537 | #!/usr/bin python3
# -*- coding: utf-8 -*-
from collections import deque
N, C = map(int,input().split())
Mx = 10**5
sch = [0]*Mx
plist = [[] for _ in range(C)]
for _ in range(N):
s, t, c = map(int,input().split())
plist[c-1].append((s,t))
for p in plist:
if len(p)==0:
continue
p.sort()
pre... |
s494841294 | p03504 | u113971909 | 1595627185 | Python | Python (3.8.2) | py | Runtime Error | 317 | 24120 | 546 | #!/usr/bin python3
# -*- coding: utf-8 -*-
from collections import deque
N, C = map(int,input().split())
Mx = 10**5+1
sch = [0]*Mx
plist = [[] for _ in range(C)]
for _ in range(N):
s, t, c = map(int,input().split())
plist[c-1].append((s,t))
for p in plist:
if len(p)==0:
continue
p.sort()
p... |
s809484514 | p03504 | u113971909 | 1595627115 | Python | Python (3.8.2) | py | Runtime Error | 342 | 24000 | 509 | #!/usr/bin python3
# -*- coding: utf-8 -*-
from collections import deque
N, C = map(int,input().split())
Mx = 10**5+1
sch = [0]*Mx
plist = [[] for _ in range(C)]
for _ in range(N):
s, t, c = map(int,input().split())
plist[c-1].append((s,t))
for p in plist:
p.sort()
prevt = 0
for s, t in p:
... |
s295408078 | p03504 | u113971909 | 1595625841 | Python | Python (3.8.2) | py | Runtime Error | 232 | 9668 | 253 | #!/usr/bin python3
# -*- coding: utf-8 -*-
N, C = map(int,input().split())
Mx = 10**5+1
sch = [0]*Mx
for _ in range(N):
s, t, c = map(int,input().split())
sch[s] += 1
sch[t+1] -= 1
for i in range(1,Mx):
sch[i]+=sch[i-1]
print(max(sch))
|
s179672224 | p03504 | u091051505 | 1595552649 | Python | PyPy3 (7.3.0) | py | Runtime Error | 399 | 210164 | 499 | N, C = map(int, input().split())
record = [[0 for _ in range(10 ** 5)] for _ in range(C)]
for _ in range(N):
s, t, c = map(int, input().split())
s -= 1
c -= 1
record[c][s] += 1
record[c][t] -= 1
cum = []
for i in range(C):
tmp = [record[i][0]]
for j in range(10 ** 5 - 1):
tmp.append(... |
s684633700 | p03504 | u091051505 | 1595552619 | Python | Python (3.8.2) | py | Runtime Error | 1238 | 56136 | 544 | import sys
sys.setrecursionlimit(1000000000)
N, C = map(int, input().split())
record = [[0 for _ in range(10 ** 5)] for _ in range(C)]
for _ in range(N):
s, t, c = map(int, input().split())
s -= 1
c -= 1
record[c][s] += 1
record[c][t] -= 1
cum = []
for i in range(C):
tmp = [record[i][0]]
for... |
s468016749 | p03504 | u091051505 | 1595552556 | Python | Python (3.8.2) | py | Runtime Error | 1337 | 56044 | 499 | N, C = map(int, input().split())
record = [[0 for _ in range(10 ** 5)] for _ in range(C)]
for _ in range(N):
s, t, c = map(int, input().split())
s -= 1
c -= 1
record[c][s] += 1
record[c][t] -= 1
cum = []
for i in range(C):
tmp = [record[i][0]]
for j in range(10 ** 5 - 1):
tmp.append(... |
s880809160 | p03504 | u323045245 | 1594430652 | Python | Python (3.8.2) | py | Runtime Error | 279 | 28060 | 280 | n,C = map(int, input().split())
stc=[list(map(int,input().split())) for _ in range(n)]
time = [0]*(10**5+1)
for s,t,c in stc:
time[s-1]+=1
time[t]-=1
ans = time[0]
for i in range(10**5+1):
time[i+1] += time[i]
if time[i+1] > ans:
ans = time[i+1]
print(ans) |
s644760613 | p03504 | u323045245 | 1594430596 | Python | Python (3.8.2) | py | Runtime Error | 273 | 28016 | 278 | n,C = map(int, input().split())
stc=[list(map(int,input().split())) for _ in range(n)]
time = [0]*(10**5+1)
for s,t,c in stc:
time[s]+=1
time[t+1]-=1
ans = time[0]
for i in range(10**5):
time[i+1] += time[i]
if time[i+1] > ans:
ans = time[i+1]
print(ans) |
s527584292 | p03504 | u072717685 | 1594076665 | Python | Python (3.8.2) | py | Runtime Error | 28 | 9260 | 397 | import sys
read = sys.stdin.read
def main():
n, c = map(int, input().split())
# cs[0]とcs[-1]はindex error除け。
cs = [0] * 10002
for _ in range(n):
s, t, c = map(int, input().split())
cs[s - 1] += 1
cs[t + 1] -= 1
cur = 0
r = 0
for cse in cs:
cur += cse
r... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.