problem_id
stringlengths
6
6
user_id
stringlengths
10
10
time_limit
float64
1k
8k
memory_limit
float64
262k
1.05M
problem_description
stringlengths
48
1.55k
codes
stringlengths
35
98.9k
status
stringlengths
28
1.7k
submission_ids
stringlengths
28
1.41k
memories
stringlengths
13
808
cpu_times
stringlengths
11
610
code_sizes
stringlengths
7
505
p02623
u033566567
2,000
1,048,576
We have two desks: A and B. Desk A has a vertical stack of N books on it, and Desk B similarly has M books on it. It takes us A_i minutes to read the i-th book from the top on Desk A (1 \leq i \leq N), and B_i minutes to read the i-th book from the top on Desk B (1 \leq i \leq M). Consider the following action: * ...
["# f = open('test.txt')\nf = open('b11.txt')\nn, m, k = map(int, f.readline().split())\na = list(map(int, f.readline().split()))\nb = list(map(int, f.readline().split()))\n\na_sum = [0]\nb_sum = [0]\ncnt = 0\nbest_b = m\nconfirm = ()\n\nfor i in a:\n a_sum.append(i + a_sum[-1])\n\nfor i in b:\n b_sum.append(i + ...
['Runtime Error', 'Accepted']
['s627350326', 's110547119']
[9176.0, 47644.0]
[26.0, 353.0]
[608, 550]
p02623
u035445296
2,000
1,048,576
We have two desks: A and B. Desk A has a vertical stack of N books on it, and Desk B similarly has M books on it. It takes us A_i minutes to read the i-th book from the top on Desk A (1 \leq i \leq N), and B_i minutes to read the i-th book from the top on Desk B (1 \leq i \leq M). Consider the following action: * ...
['n, m, k = map(int, input().split())\na = list(map(int, input().split()))\nb = list(map(int, input().split()))\na_sum, b_sum = [0], [0]\nfor i in range(n):\n a_sum.append(a_sum[i]+a[i])\nfor i in range(m):\n b_sum.append(b_sum[i]+b[i])\nans, j = 0, m\nfor i in range(n+1):\n if a_sum[i] > k:\n break\n while b_s...
['Time Limit Exceeded', 'Accepted']
['s824258922', 's570880766']
[47652.0, 47476.0]
[2207.0, 285.0]
[371, 371]
p02623
u050584166
2,000
1,048,576
We have two desks: A and B. Desk A has a vertical stack of N books on it, and Desk B similarly has M books on it. It takes us A_i minutes to read the i-th book from the top on Desk A (1 \leq i \leq N), and B_i minutes to read the i-th book from the top on Desk B (1 \leq i \leq M). Consider the following action: * ...
['n, m, k = map(int, input().split())\na = list(map(int, input().split()))\nb = list(map(int, input().split()))\n \nA, B = [0], [0]\nfor i in range(n):\n A.append(A[i] + a[i])\nfor i in range(m):\n B.append(B[i] + b[i])\n\nprint(A)\nprint(B)\n \nans, j = 0, m\nfor i in range(n+1):\n if A[i] > k:\n br...
['Wrong Answer', 'Accepted']
['s151367400', 's831324927']
[54484.0, 47484.0]
[326.0, 301.0]
[382, 363]
p02623
u052244548
2,000
1,048,576
We have two desks: A and B. Desk A has a vertical stack of N books on it, and Desk B similarly has M books on it. It takes us A_i minutes to read the i-th book from the top on Desk A (1 \leq i \leq N), and B_i minutes to read the i-th book from the top on Desk B (1 \leq i \leq M). Consider the following action: * ...
['import itertools\nimport functools\nimport math\nfrom collections import Counter\nfrom itertools import combinations\nimport re\n\n\n\ndef main_sum():\n N,M,K=map(int,input().split())\n A = list(map(int,input().split()))\n B = list(map(int,input().split()))\n\n A_len = len(A)\n maxB = len(B)\n\n Asu...
['Wrong Answer', 'Runtime Error', 'Accepted']
['s475066863', 's541444060', 's330230800']
[42064.0, 9092.0, 48400.0]
[2206.0, 23.0, 285.0]
[1025, 953, 950]
p02623
u052248839
2,000
1,048,576
We have two desks: A and B. Desk A has a vertical stack of N books on it, and Desk B similarly has M books on it. It takes us A_i minutes to read the i-th book from the top on Desk A (1 \leq i \leq N), and B_i minutes to read the i-th book from the top on Desk B (1 \leq i \leq M). Consider the following action: * ...
['N, M, K = map(int, input().split())\nA = list(map(int, input().split()))\nB = list(map(int, input().split()))\na, b = [0], [0]\nfor i in range(N):\n a.append(a[i] + A[i])\nfor i in range(M): \n b.append(b[i] + B[i])\nprint(a)\nprint(b)\nans, j = 0, M\nfor i in range(N + 1):\n if a[i] > K:\n break\n ...
['Wrong Answer', 'Accepted']
['s371743773', 's921675668']
[54444.0, 47472.0]
[319.0, 294.0]
[379, 361]
p02623
u052833850
2,000
1,048,576
We have two desks: A and B. Desk A has a vertical stack of N books on it, and Desk B similarly has M books on it. It takes us A_i minutes to read the i-th book from the top on Desk A (1 \leq i \leq N), and B_i minutes to read the i-th book from the top on Desk B (1 \leq i \leq M). Consider the following action: * ...
["n,m,k=map(int,input().split())\nA=[0]+list(map(int,input().split()))\nB=[0]+list(map(int,input().split()))\ni=0\nj=0\ncount=0\nans=0\nfor i in range(1,n):\n A[i]=A[i]+A[i-1]\n\n\nfor j in range(1,m):\n B[i]=B[i]+B[i-1]\n\na_cnt=0\nb_cnt=m\nfor a_cnt in range(n+1):\n if A[a_cnt]>k:\n continue\n #print('A',A[a_c...
['Runtime Error', 'Wrong Answer', 'Runtime Error', 'Accepted']
['s027260541', 's730402683', 's735894913', 's683159295']
[40016.0, 42296.0, 39928.0, 39868.0]
[300.0, 2206.0, 288.0, 303.0]
[411, 513, 365, 336]
p02623
u054556734
2,000
1,048,576
We have two desks: A and B. Desk A has a vertical stack of N books on it, and Desk B similarly has M books on it. It takes us A_i minutes to read the i-th book from the top on Desk A (1 \leq i \leq N), and B_i minutes to read the i-th book from the top on Desk B (1 \leq i \leq M). Consider the following action: * ...
['import numpy as np\nimport scipy.sparse as sps\nimport scipy.misc as spm\nimport collections as col\nimport functools as func\nimport itertools as ite\nimport fractions as frac\nimport math as ma\nfrom math import cos,sin,tan,sqrt\nimport cmath as cma\nimport copy as cp\nimport sys\nimport re\nimport bisect as bs\nsy...
['Runtime Error', 'Accepted']
['s941349340', 's453620998']
[68276.0, 69912.0]
[819.0, 1645.0]
[1425, 1437]
p02623
u060582659
2,000
1,048,576
We have two desks: A and B. Desk A has a vertical stack of N books on it, and Desk B similarly has M books on it. It takes us A_i minutes to read the i-th book from the top on Desk A (1 \leq i \leq N), and B_i minutes to read the i-th book from the top on Desk B (1 \leq i \leq M). Consider the following action: * ...
['N, M, K = map(int, input().split())\nA = list(map(int, input().split()))\nB = list(map(int, input().split()))\n\nA_sum = 0\nA_max = 0\nB_sum = 0\nB_max = 0\nbest_num = 0\nA_max = N\nflag = True \n\n\nfor i in range(N):\n A_sum += A[i]\n if A_sum > K:\n A_sum -= A[i]\n A_max = i\n flag = Fal...
['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted']
['s354173876', 's821280148', 's834700299', 's749610831']
[41120.0, 40876.0, 40976.0, 40932.0]
[436.0, 355.0, 410.0, 343.0]
[1114, 1145, 1121, 1130]
p02623
u060752882
2,000
1,048,576
We have two desks: A and B. Desk A has a vertical stack of N books on it, and Desk B similarly has M books on it. It takes us A_i minutes to read the i-th book from the top on Desk A (1 \leq i \leq N), and B_i minutes to read the i-th book from the top on Desk B (1 \leq i \leq M). Consider the following action: * ...
['N,M,K = map(int,input().split())\nA = [int(i) for i in input().split()]\nB = [int(i) for i in input().split()]\nAA = [0]\nBB = [0]\nr = 0\nfor i in A:\n r += i\n AA.append(r)\nr = 0\nfor i in B:\n r += i\n BB.append(r)\nans = 0\na = N\nb = 0\nwhile AA[a]+BB[b] > K:\n a -= 1\nans = a+b\n\nwhile a > 0:\n...
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s116398795', 's283592561', 's452650783']
[47380.0, 47644.0, 46768.0]
[477.0, 480.0, 311.0]
[510, 512, 485]
p02623
u060793972
2,000
1,048,576
We have two desks: A and B. Desk A has a vertical stack of N books on it, and Desk B similarly has M books on it. It takes us A_i minutes to read the i-th book from the top on Desk A (1 \leq i \leq N), and B_i minutes to read the i-th book from the top on Desk B (1 \leq i \leq M). Consider the following action: * ...
['n,m,k=map(int,input().split())\na=list(map(int,input().split()))\nb=list(map(int,input().split()))\nea=[0]\nfor i in range(n):\n ea.append(ea[i]+a[i])\neb=[0]\nfor i in range(m):\n eb.append(eb[i]+b[i])\ntb=m\np=0\nif n<m:\n ea,eb=eb,ea\n n,m=m,n\nfor i in range(n+1):\n while ea[i]+eb[tb]>k:\n i...
['Runtime Error', 'Accepted']
['s761830390', 's991675480']
[47496.0, 47348.0]
[297.0, 331.0]
[397, 397]
p02623
u068844030
2,000
1,048,576
We have two desks: A and B. Desk A has a vertical stack of N books on it, and Desk B similarly has M books on it. It takes us A_i minutes to read the i-th book from the top on Desk A (1 \leq i \leq N), and B_i minutes to read the i-th book from the top on Desk B (1 \leq i \leq M). Consider the following action: * ...
['from itertools import accumulate\nfrom bisect import bisect_right\n\nn, m, k = map(int, input().split())\na = [int(i) for i in input().split()]\nb = [int(i) for i in input().split()]\n\n\na_cum = list(accumulate(a))\nb_cum = list(accumulate(b))\n\nans = [0]\nfor i in range(n+1): \n c = bisect_right(b, k-a[i]) -...
['Runtime Error', 'Runtime Error', 'Accepted']
['s460359866', 's659158583', 's177636701']
[50732.0, 49368.0, 52004.0]
[250.0, 251.0, 269.0]
[403, 712, 742]
p02623
u072717685
2,000
1,048,576
We have two desks: A and B. Desk A has a vertical stack of N books on it, and Desk B similarly has M books on it. It takes us A_i minutes to read the i-th book from the top on Desk A (1 \leq i \leq N), and B_i minutes to read the i-th book from the top on Desk B (1 \leq i \leq M). Consider the following action: * ...
["import sys\nread = sys.stdin.read\nreadline = sys.stdin.readline\nreadlines = sys.stdin.readlines\nimport numpy as np\ndef main():\n n, m, k = map(int, input().split())\n a = np.array(readline().split(), np.int64)\n b = np.array(readline().split(), np.int64)\n aa = a.cumsum()\n ba = b.cumsum()\n r =...
['Wrong Answer', 'Runtime Error', 'Accepted']
['s803728163', 's876547981', 's994918214']
[56188.0, 56300.0, 56192.0]
[759.0, 210.0, 219.0]
[515, 547, 572]
p02623
u075304271
2,000
1,048,576
We have two desks: A and B. Desk A has a vertical stack of N books on it, and Desk B similarly has M books on it. It takes us A_i minutes to read the i-th book from the top on Desk A (1 \leq i \leq N), and B_i minutes to read the i-th book from the top on Desk B (1 \leq i \leq M). Consider the following action: * ...
['import math\nimport collections\nimport fractions\nimport itertools\nimport functools\nimport operator\nimport bisect\n\ndef solve():\n n, m, k = map(int, input().split())\n a = list(map(int, input().split()))\n b = list(map(int, input().split()))\n ruia, ruib = [0], [0]\n for i in range(n): ruia.appen...
['Runtime Error', 'Runtime Error', 'Accepted']
['s479526922', 's835574912', 's377283566']
[48860.0, 48836.0, 48872.0]
[199.0, 252.0, 224.0]
[609, 613, 607]
p02623
u075364767
2,000
1,048,576
We have two desks: A and B. Desk A has a vertical stack of N books on it, and Desk B similarly has M books on it. It takes us A_i minutes to read the i-th book from the top on Desk A (1 \leq i \leq N), and B_i minutes to read the i-th book from the top on Desk B (1 \leq i \leq M). Consider the following action: * ...
['\n\n\n\n\nN,M,K=map(int,input().split())\nA=list(map(int, input().split()))\nB=list(map(int, input().split()))\n\n\n\n\n\n\nA_wa = [0]\nfor i in range(N) :\n A_wa.append(A_wa[i]+A[i])\n\nB_wa = [0]\nfor i in range(M) :\n B_wa.append(B_wa[i]+B[i])\n\n\n\n\nans = 0\nend = N \n\nfor i in range(M+1):\n A_use = K...
['Runtime Error', 'Accepted']
['s305320503', 's449328897']
[8916.0, 47244.0]
[28.0, 1752.0]
[1303, 1228]
p02623
u077291787
2,000
1,048,576
We have two desks: A and B. Desk A has a vertical stack of N books on it, and Desk B similarly has M books on it. It takes us A_i minutes to read the i-th book from the top on Desk A (1 \leq i \leq N), and B_i minutes to read the i-th book from the top on Desk B (1 \leq i \leq M). Consider the following action: * ...
['# D - Sum of Divisors\nfrom numba import njit\n\n\n@njit\ndef solve(N):\n res = 0\n for a in range(1, N + 1):\n for b in range(1, N // a + 1):\n res += a * b\n return res\n\n\ndef main():\n N = int(input())\n print(solve(N))\n\n\nif __name__ == "__main__":\n main()\n', 'from bisect...
['Runtime Error', 'Accepted']
['s856584170', 's797438621']
[91928.0, 55268.0]
[369.0, 222.0]
[283, 178]
p02623
u085772923
2,000
1,048,576
We have two desks: A and B. Desk A has a vertical stack of N books on it, and Desk B similarly has M books on it. It takes us A_i minutes to read the i-th book from the top on Desk A (1 \leq i \leq N), and B_i minutes to read the i-th book from the top on Desk B (1 \leq i \leq M). Consider the following action: * ...
['N, M, K = map(int,input().split())\n\nA = list(map(int,input().split()))\nA.insert(0, 0)\nB = list(map(int,input().split()))\na = []\nb = []\n\ndef nibun(L,l,r,target):\n\n wrk = -(-(l+r)//2)\n \n# print(l,r,target,wrk)\n \n if r == l:\n if r == len(L):\n return 0\n else:\n return wrk + 1\n \n ...
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s395433780', 's799160822', 's899292267']
[41084.0, 41168.0, 41020.0]
[1396.0, 1396.0, 1403.0]
[813, 813, 811]
p02623
u086138398
2,000
1,048,576
We have two desks: A and B. Desk A has a vertical stack of N books on it, and Desk B similarly has M books on it. It takes us A_i minutes to read the i-th book from the top on Desk A (1 \leq i \leq N), and B_i minutes to read the i-th book from the top on Desk B (1 \leq i \leq M). Consider the following action: * ...
['N,M,K = map(int,input().split())\nA = list(map(int,input().split()))\nB = list(map(int,input().split()))\nA.append(10**9+1)\nB.append(10**9+1)\na = 0\nb = 0\nans = 0\nt = 0\nwhile t < K :\n if A[a] < B[b]:\n if t+A[a] <= K:\n ans += 1\n t += A[a]\n a += 1\n else:\n ...
['Wrong Answer', 'Accepted']
['s593072091', 's187043481']
[41652.0, 40444.0]
[347.0, 333.0]
[774, 454]
p02623
u089376182
2,000
1,048,576
We have two desks: A and B. Desk A has a vertical stack of N books on it, and Desk B similarly has M books on it. It takes us A_i minutes to read the i-th book from the top on Desk A (1 \leq i \leq N), and B_i minutes to read the i-th book from the top on Desk B (1 \leq i \leq M). Consider the following action: * ...
['counter = 0\nans = 0\n\nfor i in range(n+1):\n if sum(A[:i])>k:\n break\n for j in range(m+1):\n if sum(A[:i])+sum(B[:j])<=k:\n ans = max(ans, i+j)\n else:\n break\n \nprint(ans)', 'import bisect\n\nn,m,k = map(int, input().split())\nA = list(map(int, input(...
['Runtime Error', 'Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted']
['s032290122', 's400914074', 's850210006', 's890882485', 's221948114']
[9072.0, 47272.0, 47328.0, 47320.0, 47552.0]
[28.0, 343.0, 330.0, 332.0, 318.0]
[226, 398, 394, 396, 397]
p02623
u091051505
2,000
1,048,576
We have two desks: A and B. Desk A has a vertical stack of N books on it, and Desk B similarly has M books on it. It takes us A_i minutes to read the i-th book from the top on Desk A (1 \leq i \leq N), and B_i minutes to read the i-th book from the top on Desk B (1 \leq i \leq M). Consider the following action: * ...
['from bisect import bisect_right\n\nn, m, k = map(int, input().split())\na = [int(i) for i in input().split()]\nb = [int(i) for i in input().split()]\nA = [0]\nB = [0]\nfor i in range(n):\n A.append(A[-1] + a[i])\nfor j in range(1, m):\n B.append(B[-1] + b[j])\n \nans = 0\nfor i in range(n):\n time = A[i]\...
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s503986042', 's904609483', 's900812498']
[48464.0, 40616.0, 47500.0]
[345.0, 353.0, 298.0]
[463, 614, 404]
p02623
u092061507
2,000
1,048,576
We have two desks: A and B. Desk A has a vertical stack of N books on it, and Desk B similarly has M books on it. It takes us A_i minutes to read the i-th book from the top on Desk A (1 \leq i \leq N), and B_i minutes to read the i-th book from the top on Desk B (1 \leq i \leq M). Consider the following action: * ...
['import bisect\n\nN, M, K = input().split()\n\ndesk1 = list(map(int, input().split()))\ndesk2 = list(map(int, input().split()))\n\nmax_time = int(K)\nitem1 = [0]\nitem2 = [0]\nfor i in desk1:\n item1.append(item1[-1] + i)\nfor i in desk2:\n item2.append(item2[-1] + i)\n\nret = 0\nfor i, t in enumerate(item1):\n ...
['Runtime Error', 'Accepted']
['s900228361', 's344857300']
[9012.0, 47520.0]
[20.0, 307.0]
[1034, 447]
p02623
u092387689
2,000
1,048,576
We have two desks: A and B. Desk A has a vertical stack of N books on it, and Desk B similarly has M books on it. It takes us A_i minutes to read the i-th book from the top on Desk A (1 \leq i \leq N), and B_i minutes to read the i-th book from the top on Desk B (1 \leq i \leq M). Consider the following action: * ...
['n,m,k = map(int,input().split())\nA = [int(x) for x in input().split()]\nB = [int(x) for x in input().split()]\ncnt = 0\nt = 0\nwhile(k > t):\n if(len(A)==0):\n now = B.pop(0)\n t += now\n cnt += 1\n elif(len(B)==0):\n now = A.pop(0)\n t += now\n cnt += 1\n else:\n ...
['Wrong Answer', 'Accepted']
['s654940777', 's519644049']
[42352.0, 48496.0]
[2206.0, 358.0]
[473, 530]
p02623
u094191970
2,000
1,048,576
We have two desks: A and B. Desk A has a vertical stack of N books on it, and Desk B similarly has M books on it. It takes us A_i minutes to read the i-th book from the top on Desk A (1 \leq i \leq N), and B_i minutes to read the i-th book from the top on Desk B (1 \leq i \leq M). Consider the following action: * ...
['from sys import stdin\nnii=lambda:map(int,stdin.readline().split())\nlnii=lambda:list(map(int,stdin.readline().split()))\n\nn=int(input())\n\ndef eratosthenes(lim):\n is_p=[2]*lim\n\n is_p[0]=0\n is_p[1]=1\n\n for i in range(2,lim):\n for j in range(i*2,lim,i):\n is_p[j] += 1\n\n return is_p\n\nlim=n+1\n...
['Runtime Error', 'Accepted']
['s511829967', 's143000306']
[9144.0, 49332.0]
[29.0, 283.0]
[379, 413]
p02623
u100641536
2,000
1,048,576
We have two desks: A and B. Desk A has a vertical stack of N books on it, and Desk B similarly has M books on it. It takes us A_i minutes to read the i-th book from the top on Desk A (1 \leq i \leq N), and B_i minutes to read the i-th book from the top on Desk B (1 \leq i \leq M). Consider the following action: * ...
["import sys\nimport numpy as np\ninput = lambda: sys.stdin.readline().rstrip()\n\ndef main():\n n,m,k = map(int, input().split())\n a = list(map(int, input().split()))\n b = list(map(int, input().split()))\n sa = np.cumsum([0]+a)\n sb = np.cumsum([0]+b)\n print (sa,sb)\n exit()\n for i in range(n):\n sa[i+1...
['Wrong Answer', 'Accepted']
['s681701763', 's454716909']
[58556.0, 118664.0]
[231.0, 738.0]
[576, 517]
p02623
u107269063
2,000
1,048,576
We have two desks: A and B. Desk A has a vertical stack of N books on it, and Desk B similarly has M books on it. It takes us A_i minutes to read the i-th book from the top on Desk A (1 \leq i \leq N), and B_i minutes to read the i-th book from the top on Desk B (1 \leq i \leq M). Consider the following action: * ...
['N, M, K = map(int, input().split())\nA = list(map(int, input().split()))\nB = list(map(int, input().split()))\n\na, b = [0], [0]\nfor i in range(N):\n a.append(a[i] + A[i])\nfor i in range(M):\n b.append(b[i] + B[i])\nprint(a,b)\n\nans, j = 0, M\nfor i in range(N + 1):\n if a[i] > K:\n break\n whil...
['Wrong Answer', 'Accepted']
['s983907370', 's876729033']
[54844.0, 47336.0]
[324.0, 281.0]
[373, 364]
p02623
u110311725
2,000
1,048,576
We have two desks: A and B. Desk A has a vertical stack of N books on it, and Desk B similarly has M books on it. It takes us A_i minutes to read the i-th book from the top on Desk A (1 \leq i \leq N), and B_i minutes to read the i-th book from the top on Desk B (1 \leq i \leq M). Consider the following action: * ...
['n,m,k = map(int, input().split())\na = list(map(int, input().split()))\nb = list(map(int, input().split()))\n \nans = 0\ntime = 0\n \n \nfor i in range(len(a)):\n time += a[i]\n if time > k:\n time -=a[i]\n break\n ans += 1\n \ntmp = 0\ncount_a = ans\n \nfor j in range(len(b)):\n time += ...
['Wrong Answer', 'Runtime Error', 'Wrong Answer', 'Runtime Error', 'Runtime Error', 'Wrong Answer', 'Accepted']
['s200183497', 's481299614', 's533883038', 's573414443', 's772770331', 's840018103', 's844762493']
[40768.0, 40620.0, 42460.0, 40484.0, 40532.0, 47404.0, 47544.0]
[197.0, 2206.0, 339.0, 205.0, 2206.0, 262.0, 264.0]
[683, 627, 704, 544, 596, 543, 542]
p02623
u113028239
2,000
1,048,576
We have two desks: A and B. Desk A has a vertical stack of N books on it, and Desk B similarly has M books on it. It takes us A_i minutes to read the i-th book from the top on Desk A (1 \leq i \leq N), and B_i minutes to read the i-th book from the top on Desk B (1 \leq i \leq M). Consider the following action: * ...
["def main():\n n, m, k = map(int, input().split())\n a = [int(x) for x in input().split()]\n b = [int(x) for x in input().split()]\n\n a_sum = [0 for x in range(n)]\n b_sum = [0 for x in range(m)]\n\n a_sum[0] = a[0]\n b_sum[0] = b[0]\n\n max_counter = 0\n\n for i in range(1, n):\n a_...
['Runtime Error', 'Wrong Answer', 'Accepted']
['s162462209', 's793284868', 's452763741']
[47784.0, 54792.0, 47480.0]
[2207.0, 2212.0, 228.0]
[629, 743, 573]
p02623
u113107956
2,000
1,048,576
We have two desks: A and B. Desk A has a vertical stack of N books on it, and Desk B similarly has M books on it. It takes us A_i minutes to read the i-th book from the top on Desk A (1 \leq i \leq N), and B_i minutes to read the i-th book from the top on Desk B (1 \leq i \leq M). Consider the following action: * ...
['n,m,k=map(int,input().split())\na=list(map(int,input().split()))\nb=list(map(int,input().split()))\nA,B=[0],[0]\nfor i in range(n):\n A.append(A[i]+a[i])\nfor i in range(m):\n B.append(B[i]+b[i])\nans,j=0,m\nfor i in range(n+1):\n if a[i]>k:\n break\n while b[j]>k-a[i]:\n j-=1\n ans=max(a...
['Runtime Error', 'Wrong Answer', 'Accepted']
['s114935489', 's234522060', 's167409663']
[47476.0, 40676.0, 47472.0]
[192.0, 273.0, 284.0]
[331, 948, 331]
p02623
u113255362
2,000
1,048,576
We have two desks: A and B. Desk A has a vertical stack of N books on it, and Desk B similarly has M books on it. It takes us A_i minutes to read the i-th book from the top on Desk A (1 \leq i \leq N), and B_i minutes to read the i-th book from the top on Desk B (1 \leq i \leq M). Consider the following action: * ...
['A,B, K=map(int,input().split())\nList_A = list(map(int, input().split()))\nList_B = list(map(int, input().split()))\nSumListA=[]\nSumListA.append(List_A[0])\nres =0\na=0\nfor i in range(1,A):\n a = SumListA[i-1]+List_A[i]\n if a < K:\n SumListA.append(a)\n else:\n break\nSumListB=[]\nSumListB.append(List_B[0...
['Wrong Answer', 'Accepted']
['s857797816', 's613038546']
[46244.0, 47540.0]
[2212.0, 299.0]
[599, 444]
p02623
u114099505
2,000
1,048,576
We have two desks: A and B. Desk A has a vertical stack of N books on it, and Desk B similarly has M books on it. It takes us A_i minutes to read the i-th book from the top on Desk A (1 \leq i \leq N), and B_i minutes to read the i-th book from the top on Desk B (1 \leq i \leq M). Consider the following action: * ...
['\n\n\n\n\n\nn, m, k = map(int, input().split())\narr1 = list(map(int, input().split()))\narr2 = list(map(int, input().split()))\n\nacum1 = [0]\nfor i in range(n):\n acum1.append( arr1[-1] + arr1[i] )\n\nacum2 = [0]\nfor i in range(m):\n acum2.append( arr2[-1] + arr2[i])\n\nans = 0\nj = m\nfor i in range(n+1): \...
['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted']
['s111329883', 's231178381', 's297547317', 's702207093', 's719433150', 's748626241', 's962542419', 's306048827']
[41216.0, 47532.0, 41196.0, 41036.0, 40008.0, 42488.0, 41148.0, 47448.0]
[186.0, 285.0, 188.0, 176.0, 178.0, 187.0, 183.0, 292.0]
[577, 415, 579, 575, 840, 948, 581, 406]
p02623
u114641312
2,000
1,048,576
We have two desks: A and B. Desk A has a vertical stack of N books on it, and Desk B similarly has M books on it. It takes us A_i minutes to read the i-th book from the top on Desk A (1 \leq i \leq N), and B_i minutes to read the i-th book from the top on Desk B (1 \leq i \leq M). Consider the following action: * ...
['# from math import factorial,sqrt,ceil #,gcd\n# from itertools import permutations,combinations,combinations_with_replacement\n# from collections import deque,Counter\n# from bisect import bisect_left\n# from heapq import heappush,heappop\n# from numba import njit\n\n# from fractions import gcd\n\n# from decimal impo...
['Runtime Error', 'Accepted']
['s782823983', 's840789340']
[53816.0, 53760.0]
[249.0, 468.0]
[1434, 1410]
p02623
u116484168
2,000
1,048,576
We have two desks: A and B. Desk A has a vertical stack of N books on it, and Desk B similarly has M books on it. It takes us A_i minutes to read the i-th book from the top on Desk A (1 \leq i \leq N), and B_i minutes to read the i-th book from the top on Desk B (1 \leq i \leq M). Consider the following action: * ...
['N, M, K = map(int, input().split())\nA = [int(i) for i in input().split()]\nB = [int(j) for j in input().split()]\n\na, b = [0], [0]\nfor i in range(N):\n a.append[a[i] + A[i]]\nfor i in range(M):\n b.append[b[i] + B[i]]\n\nans, j = 0, M\nfor i in range(N+1):\n if a[i] > K:\n break\n while b[j] > K...
['Runtime Error', 'Accepted']
['s098868253', 's172576771']
[40508.0, 47340.0]
[124.0, 305.0]
[371, 371]
p02623
u125365353
2,000
1,048,576
We have two desks: A and B. Desk A has a vertical stack of N books on it, and Desk B similarly has M books on it. It takes us A_i minutes to read the i-th book from the top on Desk A (1 \leq i \leq N), and B_i minutes to read the i-th book from the top on Desk B (1 \leq i \leq M). Consider the following action: * ...
['n,m,k = map(int, input().split())\na = list(map(int, input().split()))\nb = list(map(int, input().split()))\n\nprint(a)\nprint(b)\n\nread = 0\ntime_ = 0\nai = 0\nbi = 0\n\nmax_read = 0\n\ndef readbook(time, read, ai, bi, isa):\n \n if isa:\n if ai < n:\n time += a[ai]\n else:\n ...
['Runtime Error', 'Accepted']
['s436255177', 's178302592']
[39988.0, 47268.0]
[168.0, 303.0]
[810, 452]
p02623
u129749062
2,000
1,048,576
We have two desks: A and B. Desk A has a vertical stack of N books on it, and Desk B similarly has M books on it. It takes us A_i minutes to read the i-th book from the top on Desk A (1 \leq i \leq N), and B_i minutes to read the i-th book from the top on Desk B (1 \leq i \leq M). Consider the following action: * ...
['import sys\nN,M,K = map(int,input().split())\nA = list(map(int,input().split()))\nB = list(map(int,input().split()))\nAB = list()\nai = 0\nbi = 0\ntime = 0\nnum = 0\nleng = N + M\nprint(leng)\nfor _ in range(leng):\n if ai == len(A) and bi == len(B):\n break\n elif ai == len(A):\n AB.append(B[bi])\n bi += ...
['Wrong Answer', 'Accepted']
['s330764532', 's376102131']
[40000.0, 49040.0]
[378.0, 399.0]
[594, 571]
p02623
u131881594
2,000
1,048,576
We have two desks: A and B. Desk A has a vertical stack of N books on it, and Desk B similarly has M books on it. It takes us A_i minutes to read the i-th book from the top on Desk A (1 \leq i \leq N), and B_i minutes to read the i-th book from the top on Desk B (1 \leq i \leq M). Consider the following action: * ...
['n,m,k=map(int,input().split())\na=list(map(int,input().split()))\nb=list(map(int,input().split()))\ntemp,temp2=0,0\nSa,Sb=[0]*n,[0]*m\nfor i in range(n):\n temp+=a[i]\n Sa[i]=temp\nfor i in range(m):\n temp2+=b[i]\n Sb[i]=temp2\nans,j=0,m-1\nfor i in range(n):\n if a[i]>k: break\n while a[i]+b[j]>k:...
['Runtime Error', 'Wrong Answer', 'Accepted']
['s377446780', 's599560709', 's751209930']
[47324.0, 47640.0, 39828.0]
[257.0, 202.0, 283.0]
[341, 480, 303]
p02623
u135847648
2,000
1,048,576
We have two desks: A and B. Desk A has a vertical stack of N books on it, and Desk B similarly has M books on it. It takes us A_i minutes to read the i-th book from the top on Desk A (1 \leq i \leq N), and B_i minutes to read the i-th book from the top on Desk B (1 \leq i \leq M). Consider the following action: * ...
['from collections import deque\ndef main():\n n, m, k = map(int, input().split())\n A = list(map(int, input().split()))\n B = list(map(int, input().split()))\n # A.reverse()\n # B.reverse()\n\n q_a = deque(A)\n q_b = deque(B)\n cnt = 0\n time = 0\n for _ in range(n + m):\n if q_a:\...
['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted']
['s023229313', 's051478699', 's879444504', 's748644723']
[40464.0, 53616.0, 54052.0, 53840.0]
[379.0, 231.0, 2252.0, 429.0]
[1031, 775, 623, 528]
p02623
u137038354
2,000
1,048,576
We have two desks: A and B. Desk A has a vertical stack of N books on it, and Desk B similarly has M books on it. It takes us A_i minutes to read the i-th book from the top on Desk A (1 \leq i \leq N), and B_i minutes to read the i-th book from the top on Desk B (1 \leq i \leq M). Consider the following action: * ...
['N,M,K = map(int,input().split())\na = list(map(int,input().split()))\nb = list(map(int,input().split()))\n\nA = [0]\nB = [0]\n\nfor i in range(N):\n A.append(A[i]+a[i])\n\nfor i in range(M):\n B.append(B[i]+b[i])\nans = 0\n\nt = 0\nfor i in range(0,N+1):\n p = min(t,M)\n if A[i] > K:\n break\n w...
['Wrong Answer', 'Accepted']
['s092821414', 's146714717']
[47324.0, 47324.0]
[300.0, 283.0]
[380, 353]
p02623
u139441419
2,000
1,048,576
We have two desks: A and B. Desk A has a vertical stack of N books on it, and Desk B similarly has M books on it. It takes us A_i minutes to read the i-th book from the top on Desk A (1 \leq i \leq N), and B_i minutes to read the i-th book from the top on Desk B (1 \leq i \leq M). Consider the following action: * ...
['n,m,k=map(int,input().split())\na=list(map(int,input().split()))\nb=list(map(int,input().split()))\n\ns=0\nac=0\nbc=0\n\nfor i in range(n):\n s=s+a[i]\n ac=ac+1\n if s > k:\n s=s-a[i]\n ac=ac-1\n break\nfor i in range(m):\n s=s+b[i]\n bc=bc+1\n if s > k:\n s=s-b[i]\n bc=bc-1\n break\n\nprint(a...
['Wrong Answer', 'Runtime Error', 'Accepted']
['s031924766', 's423172824', 's449574655']
[40752.0, 8832.0, 42216.0]
[189.0, 27.0, 318.0]
[308, 532, 532]
p02623
u141596821
2,000
1,048,576
We have two desks: A and B. Desk A has a vertical stack of N books on it, and Desk B similarly has M books on it. It takes us A_i minutes to read the i-th book from the top on Desk A (1 \leq i \leq N), and B_i minutes to read the i-th book from the top on Desk B (1 \leq i \leq M). Consider the following action: * ...
["INF = float('inf')\nN, M, K = list(map(int, input().split()))\nA = list(map(int, input().split()))\nB = list(map(int, input().split()))\n\na = [0] * (N+1)\nb = [0] * (M+1)\nfor i,x in enumerate(A):\n a[i+1] = a[i] + x\n\nfor i,x in enumerate(B):\n b[i+1] = b[i] + x\n\nans = 0\nfor i, va in enumerate(a):\n if...
['Wrong Answer', 'Accepted']
['s470141599', 's790138503']
[48744.0, 47660.0]
[2206.0, 963.0]
[477, 602]
p02623
u143441425
2,000
1,048,576
We have two desks: A and B. Desk A has a vertical stack of N books on it, and Desk B similarly has M books on it. It takes us A_i minutes to read the i-th book from the top on Desk A (1 \leq i \leq N), and B_i minutes to read the i-th book from the top on Desk B (1 \leq i \leq M). Consider the following action: * ...
['n, m, k = list(map(int, input().split()))\nns = list(map(int, input().split()))\nms = list(map(int, input().split()))\n\nnss = [0]\nfor i, v in enumerate(ns):\n nss.append(nss[i] + ns[i])\n\nmss = [0]\nfor i, v in enumerate(ms):\n mss.append(mss[i] + ms[i])\n\nmx = 0\nj = m\nfor i in range(n + 1):\n if nss[i...
['Wrong Answer', 'Runtime Error', 'Accepted']
['s373381058', 's401334619', 's914760381']
[47296.0, 174768.0, 47308.0]
[395.0, 1634.0, 797.0]
[428, 499, 390]
p02623
u143903328
2,000
1,048,576
We have two desks: A and B. Desk A has a vertical stack of N books on it, and Desk B similarly has M books on it. It takes us A_i minutes to read the i-th book from the top on Desk A (1 \leq i \leq N), and B_i minutes to read the i-th book from the top on Desk B (1 \leq i \leq M). Consider the following action: * ...
['N, M, K = map(int,input().split())\nA = list(map(int,input().split()))\nB = list(map(int,input().split()))\n\nsumA = []\nsumB = []\ntmp = 0\nanswer = 0\nst = 1\n\nfor i in range(N):\n tmp = tmp + A[i]\n sumA.append(tmp)\n\ntmp = 0\nfor i in range(M):\n tmp = tmp + B[i]\n sumB.append(tmp)\n\nfor i in range...
['Runtime Error', 'Accepted']
['s902485671', 's155756042']
[48572.0, 48488.0]
[407.0, 373.0]
[560, 558]
p02623
u150788544
2,000
1,048,576
We have two desks: A and B. Desk A has a vertical stack of N books on it, and Desk B similarly has M books on it. It takes us A_i minutes to read the i-th book from the top on Desk A (1 \leq i \leq N), and B_i minutes to read the i-th book from the top on Desk B (1 \leq i \leq M). Consider the following action: * ...
['import sys\nn,m,k = map(int,input().split())\na = list(map(int,input().split()))\nb = list(map(int,input().split()))\nt = k\nstart = 0\nwhile True:\n if start == len(b):\n break\n else:\n if t - b[start] < 0:\n break\n else: \n t -= b[start]\n start += 1\n\nnum = start\nlst = [0]\nM = 0\npr...
['Runtime Error', 'Accepted']
['s188326607', 's494799254']
[40500.0, 40600.0]
[398.0, 324.0]
[511, 627]
p02623
u152614052
2,000
1,048,576
We have two desks: A and B. Desk A has a vertical stack of N books on it, and Desk B similarly has M books on it. It takes us A_i minutes to read the i-th book from the top on Desk A (1 \leq i \leq N), and B_i minutes to read the i-th book from the top on Desk B (1 \leq i \leq M). Consider the following action: * ...
['import numpy\n\nn,m,k = map(int,input().split())\nli_a = list(map(int,input().split()))\nli_b = list(map(int,input().split()))\n\nli_A = numpy.cumsum(li_a)\nli_B = numpy.cumsum(li_b)\n\nans, j = 0,m\nfor i in range(n + 1):\n if li_A[i] > k:\n break\n while li_B[j] + li_A[i]> k:\n j -= 1\n ans =...
['Runtime Error', 'Accepted']
['s456399687', 's943027635']
[58296.0, 60780.0]
[241.0, 517.0]
[330, 352]
p02623
u157020659
2,000
1,048,576
We have two desks: A and B. Desk A has a vertical stack of N books on it, and Desk B similarly has M books on it. It takes us A_i minutes to read the i-th book from the top on Desk A (1 \leq i \leq N), and B_i minutes to read the i-th book from the top on Desk B (1 \leq i \leq M). Consider the following action: * ...
['n, m, k = map(int, input().split())\na = list(map(int, input().split()))\nb = list(map(int, input().split()))\n\nans = 0\ncnt = 0\ncost = 0\nfor i, x in enumerate(a):\n cost += x\n if cost > k:\n cnt = i\n cost -= x\n break\nelse:\n for j, y in enumerate(b):\n cost += y\n i...
['Runtime Error', 'Accepted']
['s176630661', 's854024772']
[39760.0, 40480.0]
[259.0, 241.0]
[698, 369]
p02623
u157232135
2,000
1,048,576
We have two desks: A and B. Desk A has a vertical stack of N books on it, and Desk B similarly has M books on it. It takes us A_i minutes to read the i-th book from the top on Desk A (1 \leq i \leq N), and B_i minutes to read the i-th book from the top on Desk B (1 \leq i \leq M). Consider the following action: * ...
['import itertools as it\ndef main():\n n,m,k=map(int,input().split())\n a = list(it.accumulate(map(int, input().split())))\n b = list(it.accumulate(map(int, input().split())))\n ans = []\n for A in range(n-1,-1,-1):\n print("A", A)\n aa = a[A]\n Kaa = k-aa\n for B in range(m-...
['Wrong Answer', 'Accepted']
['s603864578', 's974874113']
[70924.0, 45696.0]
[2285.0, 232.0]
[513, 525]
p02623
u159144188
2,000
1,048,576
We have two desks: A and B. Desk A has a vertical stack of N books on it, and Desk B similarly has M books on it. It takes us A_i minutes to read the i-th book from the top on Desk A (1 \leq i \leq N), and B_i minutes to read the i-th book from the top on Desk B (1 \leq i \leq M). Consider the following action: * ...
['N, M, K = map(int, input().split())\na_timelist = int(input().split())\nb_timelist = int(input().split())\ncounta = len(a_timelist)\ncountb = len(b_timelist)\ntime = 0\na, b = [0], [0]\nfor i in range(N):\n a.append(a[i] + a_timelist[i])\nfor i in range(M):\n b.append(b[i] + b_timelist[i])\nans, j = 0, M\nfor i in ...
['Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted']
['s091423717', 's114635098', 's458484095', 's968538753', 's411004576']
[25532.0, 8792.0, 25596.0, 8940.0, 47544.0]
[43.0, 26.0, 43.0, 27.0, 283.0]
[833, 340, 822, 407, 342]
p02623
u159723084
2,000
1,048,576
We have two desks: A and B. Desk A has a vertical stack of N books on it, and Desk B similarly has M books on it. It takes us A_i minutes to read the i-th book from the top on Desk A (1 \leq i \leq N), and B_i minutes to read the i-th book from the top on Desk B (1 \leq i \leq M). Consider the following action: * ...
['# -*- coding: utf-8 -*-\nN,M,K=map(int,input().split())\nA=list(map(int,input().split()))\nB=list(map(int,input().split()))\n\nans=0\nT=0\nfor i in range(N):\n T+=A[i]\n if T > K:\n T-=A[i]\n ans-=1\n break\n else:\n ans+=1\nR=[]\nR.append(ans)\nn=ans\nm=0\nwhile(1):\n while(1)...
['Wrong Answer', 'Accepted']
['s489072065', 's115112024']
[40572.0, 42192.0]
[290.0, 317.0]
[562, 547]
p02623
u161164709
2,000
1,048,576
We have two desks: A and B. Desk A has a vertical stack of N books on it, and Desk B similarly has M books on it. It takes us A_i minutes to read the i-th book from the top on Desk A (1 \leq i \leq N), and B_i minutes to read the i-th book from the top on Desk B (1 \leq i \leq M). Consider the following action: * ...
['N, M, K = list(map(int, input().split()))\nA = list(map(int, input().split()))\nB = list(map(int, input().split()))\n\nA_sum = [0]\nB_sum = [0]\nfor i in range(N):\n A_sum.append(A_sum[i]+A[i])\nfor i in range(M):\n B_sum.append(B_sum[i]+B[i])\n\n\nnum = 0\nJ = M\nfor i in range(N+1):\n if A_sum[i] > K:\n ...
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s249026014', 's293591243', 's132578110']
[47468.0, 47512.0, 47672.0]
[264.0, 274.0, 342.0]
[472, 474, 484]
p02623
u163501259
2,000
1,048,576
We have two desks: A and B. Desk A has a vertical stack of N books on it, and Desk B similarly has M books on it. It takes us A_i minutes to read the i-th book from the top on Desk A (1 \leq i \leq N), and B_i minutes to read the i-th book from the top on Desk B (1 \leq i \leq M). Consider the following action: * ...
["import sys\ninput = sys.stdin.readline\nfrom collections import deque\ndef main():\n N, M, K = map(int, input().split())\n A = list(map(int, input().split()))\n B = list(map(int, input().split()))\n i, j = 0, 0\n while K > 0:\n print(i,j)\n if i == N:\n if j != M:\n ...
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s240121036', 's514389196', 's680240386']
[41920.0, 41964.0, 47488.0]
[354.0, 205.0, 290.0]
[1273, 567, 344]
p02623
u163543660
2,000
1,048,576
We have two desks: A and B. Desk A has a vertical stack of N books on it, and Desk B similarly has M books on it. It takes us A_i minutes to read the i-th book from the top on Desk A (1 \leq i \leq N), and B_i minutes to read the i-th book from the top on Desk B (1 \leq i \leq M). Consider the following action: * ...
['#C\nn,m,k=map(int,input().split())\na=list(map(int,input().split()))\nb=list(map(int,input().split()))\nasum=[0]\nbsum=[0]\nfor i in range(n):\n asum.append(asum[-1]+a[i])\nfor i in range(m):\n bsum.append(bsum[-1+b[i]])\nans=0\nfor i in range(n+1):\n if asum[i]>0:\n break\n while asum[i]+bsum[m]>0...
['Runtime Error', 'Accepted']
['s354449106', 's091887159']
[40588.0, 47344.0]
[141.0, 302.0]
[355, 355]
p02623
u165368960
2,000
1,048,576
We have two desks: A and B. Desk A has a vertical stack of N books on it, and Desk B similarly has M books on it. It takes us A_i minutes to read the i-th book from the top on Desk A (1 \leq i \leq N), and B_i minutes to read the i-th book from the top on Desk B (1 \leq i \leq M). Consider the following action: * ...
['n, m, k = map(int, input().split())\na = list(map(int, input().split()))\nb = list(map(int, input().split()))\n\na_sum = [0]\nfor i in range(n):\n a_sum.append(a[i] + a_sum[i])\nb_sum = [0]\nfor i in range(m):\n b_sum.append(b[i] + b_sum[i])\n\nans = 0\nfor i in range(n+1):\n if a[i] > k:\n break\n for j in ra...
['Runtime Error', 'Accepted']
['s942250660', 's378141489']
[47660.0, 47328.0]
[2207.0, 286.0]
[406, 380]
p02623
u165394332
2,000
1,048,576
We have two desks: A and B. Desk A has a vertical stack of N books on it, and Desk B similarly has M books on it. It takes us A_i minutes to read the i-th book from the top on Desk A (1 \leq i \leq N), and B_i minutes to read the i-th book from the top on Desk B (1 \leq i \leq M). Consider the following action: * ...
['from itertools import accumulate\n\nN, M, K = map(int, input().split())\na = list(accumulate(int(i) for i in input().split(), initial=0))\nb = list(accumulate(int(i) for i in input().split(), initial=0))\n\ncnt = 0\nbest0 = M\nfor i in range(N+1):\n ai = a[i]\n for j in range(best0, -1, -1):\n bj = b[j]\...
['Runtime Error', 'Accepted']
['s634897279', 's717104582']
[9124.0, 45752.0]
[24.0, 309.0]
[417, 407]
p02623
u167908302
2,000
1,048,576
We have two desks: A and B. Desk A has a vertical stack of N books on it, and Desk B similarly has M books on it. It takes us A_i minutes to read the i-th book from the top on Desk A (1 \leq i \leq N), and B_i minutes to read the i-th book from the top on Desk B (1 \leq i \leq M). Consider the following action: * ...
['# coding:utf-8\nimport itertools\nn, m, k = map(int, input().split())\na = list(map(int, input().split()))\nb = list(map(int, input().split()))\nans = 0\nj = m\n\naa = [0] + list(itertools.accumulate(a))\nbb = [0] + list(itertools.accumulate(b))\n#print(aa)\n#print(bb)\n\n\n\nfor i, a_item in enumerate(a):\n if a_...
['Runtime Error', 'Accepted']
['s103178919', 's761237773']
[50532.0, 50564.0]
[147.0, 236.0]
[510, 514]
p02623
u169165784
2,000
1,048,576
We have two desks: A and B. Desk A has a vertical stack of N books on it, and Desk B similarly has M books on it. It takes us A_i minutes to read the i-th book from the top on Desk A (1 \leq i \leq N), and B_i minutes to read the i-th book from the top on Desk B (1 \leq i \leq M). Consider the following action: * ...
["import numpy\n\nN, M, K = map(int, input().split())\nA = list(map(int, input().split()))\nB = list(map(int, input().split()))\n\nacc_a = [0]\nfor i in range(N):\n acc_a.append(acc_a[i] + A[i])\n\nacc_b = [0]\nfor i in range(M):\n acc_b.append(acc_b[i] + B[i])\n\nacc_a = numpy.array(acc_a)\nacc_b = numpy.array(a...
['Wrong Answer', 'Accepted']
['s751465637', 's920338798']
[66864.0, 66612.0]
[2207.0, 607.0]
[985, 584]
p02623
u171654347
2,000
1,048,576
We have two desks: A and B. Desk A has a vertical stack of N books on it, and Desk B similarly has M books on it. It takes us A_i minutes to read the i-th book from the top on Desk A (1 \leq i \leq N), and B_i minutes to read the i-th book from the top on Desk B (1 \leq i \leq M). Consider the following action: * ...
['# -*- coding: utf-8 -*-\nn, m, k = map(int, input().split())\n\nalist = input().split()\nblist = input().split()\n\nprint(alist)\nprint(blist)\n\nwork = k\nacount = 0\nwhile (acount < n) and (work >= int(alist[acount])):\n work -= int(alist[acount])\n acount += 1\n\nmaxCount = acount\nbCount = 0\nfor num in ran...
['Wrong Answer', 'Accepted']
['s273830160', 's006381860']
[45488.0, 40472.0]
[457.0, 499.0]
[554, 651]
p02623
u174181999
2,000
1,048,576
We have two desks: A and B. Desk A has a vertical stack of N books on it, and Desk B similarly has M books on it. It takes us A_i minutes to read the i-th book from the top on Desk A (1 \leq i \leq N), and B_i minutes to read the i-th book from the top on Desk B (1 \leq i \leq M). Consider the following action: * ...
['n, m, k = map(int, input().split())\na = list(map(int, input().split()))\nb = list(map(int, input().split()))\n\nfor i in range(n-1):\n a[i+1] = a[i] + a[i+1]\na.insert(0, 0)\nfor i in range(m-1):\n b[i+1] = b[i] + b[i+1]\nb.insert(0, 0)\nprint(a)\nprint(b)\nx = 0\nfor i in range(n+1):\n for j in range(m+1):...
['Wrong Answer', 'Accepted']
['s750439994', 's967660122']
[41492.0, 40680.0]
[2214.0, 315.0]
[451, 468]
p02623
u178946688
2,000
1,048,576
We have two desks: A and B. Desk A has a vertical stack of N books on it, and Desk B similarly has M books on it. It takes us A_i minutes to read the i-th book from the top on Desk A (1 \leq i \leq N), and B_i minutes to read the i-th book from the top on Desk B (1 \leq i \leq M). Consider the following action: * ...
['N, M, K = map(int, input().split())\na = list(map(int, input().split()))\nb = list(map(int, input().split()))\n\nA = [0]\nB = [0]\nfor i in range(N):\n A.append(A[i] + a[i])\nfor i in range(M):\n B.append(B[i] + b[i])\n \nans = 0\nm = M\nfor n in range(N + 1):\n while True:\n time = A[n] + B[m]\n if time <=...
['Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted']
['s058974132', 's136655557', 's709131673', 's562731202']
[47572.0, 47668.0, 47460.0, 47376.0]
[250.0, 326.0, 308.0, 303.0]
[379, 378, 323, 348]
p02623
u182178426
2,000
1,048,576
We have two desks: A and B. Desk A has a vertical stack of N books on it, and Desk B similarly has M books on it. It takes us A_i minutes to read the i-th book from the top on Desk A (1 \leq i \leq N), and B_i minutes to read the i-th book from the top on Desk B (1 \leq i \leq M). Consider the following action: * ...
['n,m,k = map(int,input().split())\na = list(map(int,input().split()))\nb = list(map(int,input().split()))\n\nfrom itertools import accumulate\na = list(accumulate(a))\nb = list(accumulate(b))\n\nfrom collections import deque\nu = deque([0])\na.append(0)\n\nimport bisect\nfor i in range(n+1):\n if k-a[i]>=0:\n ...
['Wrong Answer', 'Accepted']
['s009743237', 's133315706']
[40440.0, 40356.0]
[280.0, 291.0]
[406, 408]
p02623
u185948224
2,000
1,048,576
We have two desks: A and B. Desk A has a vertical stack of N books on it, and Desk B similarly has M books on it. It takes us A_i minutes to read the i-th book from the top on Desk A (1 \leq i \leq N), and B_i minutes to read the i-th book from the top on Desk B (1 \leq i \leq M). Consider the following action: * ...
['N, M ,K = map(int, input().split())\nA = list(map(int, input().split()))\nB = list(map(int, input().split()))\nA.append(2*10**10)\nB.append(2*10**10)\nA.append(2*10**10)\nB.append(2*10**10)\n \nans = 0\nt = 0\nia, ib = 0, 0\nwhile t < K and (ia < N or ib < M):\n if A[ia] + A[ia+1] <= B[ib] + B[ib+1]:\n if t...
['Wrong Answer', 'Accepted']
['s863560533', 's586227891']
[40444.0, 50244.0]
[735.0, 320.0]
[563, 608]
p02623
u189487046
2,000
1,048,576
We have two desks: A and B. Desk A has a vertical stack of N books on it, and Desk B similarly has M books on it. It takes us A_i minutes to read the i-th book from the top on Desk A (1 \leq i \leq N), and B_i minutes to read the i-th book from the top on Desk B (1 \leq i \leq M). Consider the following action: * ...
['N, M, K = map(int, input().split())\nA = list(map(int, input().split()))\nB = list(map(int, input().split()))\n\naa = [0]*(N+1)\nfor i in range(1, N+1):\n aa[i] = aa[i-1]+A[i-1]\n\nbb = [0]*(M+1)\nfor i in range(1, M+1):\n bb[i] = bb[i-1]+B[i-1]\n\nans = 0\nfor i in range(N+1):\n tmp_K = K-aa[i]\n if tmp_...
['Wrong Answer', 'Accepted']
['s257642187', 's931129728']
[48920.0, 50652.0]
[2207.0, 318.0]
[845, 611]
p02623
u190850294
2,000
1,048,576
We have two desks: A and B. Desk A has a vertical stack of N books on it, and Desk B similarly has M books on it. It takes us A_i minutes to read the i-th book from the top on Desk A (1 \leq i \leq N), and B_i minutes to read the i-th book from the top on Desk B (1 \leq i \leq M). Consider the following action: * ...
["import sys\ndef LI(): return list(map(int, sys.stdin.buffer.readline().split()))\ndef I(): return int(sys.stdin.buffer.readline())\ndef LS(): return sys.stdin.buffer.readline().rstrip().decode('utf-8').split()\ndef S(): return sys.stdin.buffer.readline().rstrip().decode('utf-8')\ndef IR(n): return [I() for i in range...
['Runtime Error', 'Accepted']
['s657136273', 's570078117']
[42112.0, 47540.0]
[74.0, 292.0]
[1145, 1148]
p02623
u193880030
2,000
1,048,576
We have two desks: A and B. Desk A has a vertical stack of N books on it, and Desk B similarly has M books on it. It takes us A_i minutes to read the i-th book from the top on Desk A (1 \leq i \leq N), and B_i minutes to read the i-th book from the top on Desk B (1 \leq i \leq M). Consider the following action: * ...
['n, m, k = map(int, input().split())\n\na = list(map(int, input().split()))\nb = list(map(int, input().split()))\n\ntime = 0\ncount = 0\nfor _ in range(n + m):\n if len(a) > 0and len(b)>0:\n if a[-1] < b[-1]:\n time += a[-1]\n a = a[:-1]\n else:\n time += b[-i-1]\n ...
['Runtime Error', 'Runtime Error', 'Wrong Answer', 'Runtime Error', 'Runtime Error', 'Accepted']
['s061596050', 's273507718', 's301800926', 's527105831', 's851596440', 's155139876']
[41772.0, 9000.0, 40760.0, 40752.0, 40444.0, 47408.0]
[2206.0, 29.0, 2206.0, 2206.0, 116.0, 306.0]
[569, 557, 567, 539, 349, 356]
p02623
u201986772
2,000
1,048,576
We have two desks: A and B. Desk A has a vertical stack of N books on it, and Desk B similarly has M books on it. It takes us A_i minutes to read the i-th book from the top on Desk A (1 \leq i \leq N), and B_i minutes to read the i-th book from the top on Desk B (1 \leq i \leq M). Consider the following action: * ...
['from itertools import accumulate\nfrom bisect import bisect_left\n \nn,m,k=map(int,input().split())\na=list(accumulate([0]+list(map(int,input().split()))))\nb=list(accumulate([0]+list(map(int,input().split()))))\nmx=0\nfor i in range(n+1):\n idx=bisect_left(b,max(k-a[i],0))\n mx=max(mx,i+idx)\nprint(mx)\n ', "from...
['Wrong Answer', 'Accepted']
['s148639157', 's031737516']
[42920.0, 42912.0]
[294.0, 365.0]
[299, 426]
p02623
u202634017
2,000
1,048,576
We have two desks: A and B. Desk A has a vertical stack of N books on it, and Desk B similarly has M books on it. It takes us A_i minutes to read the i-th book from the top on Desk A (1 \leq i \leq N), and B_i minutes to read the i-th book from the top on Desk B (1 \leq i \leq M). Consider the following action: * ...
['n, m, k = map(int, input().split())\na = list(map(int, input().split()))\nb = list(map(int, input().split()))\n\nfor i in range(1, n):\n a[i] += a[i - 1]\n\nfor i in range(1, m):\n b[i] += b[i - 1]\n\nptr = 0\nans = 0\n\nfor i in range(n):\n if a[i] > k:\n break\n while ptr < m:\n if a[i] + ...
['Wrong Answer', 'Accepted']
['s722544676', 's686894825']
[40556.0, 47536.0]
[418.0, 285.0]
[419, 371]
p02623
u203239974
2,000
1,048,576
We have two desks: A and B. Desk A has a vertical stack of N books on it, and Desk B similarly has M books on it. It takes us A_i minutes to read the i-th book from the top on Desk A (1 \leq i \leq N), and B_i minutes to read the i-th book from the top on Desk B (1 \leq i \leq M). Consider the following action: * ...
['def get_sum_arr(arr):\n sum_arr = [0]\n N = len(arr)\n for i in range(1,N+1):\n sum_arr.append(sum_arr[i-1] + arr[i-1])\n return sum_arr\ndef get_max_book_num(A,B,K):\n A_sum_arr,B_sum_arr = get_sum_arr(A),get_sum_arr(B)\n count,i,j = 0,0,0\n for i in range(0,len(A_sum_arr)):\n if K...
['Runtime Error', 'Wrong Answer', 'Wrong Answer', 'Runtime Error', 'Wrong Answer', 'Wrong Answer', 'Accepted']
['s479278094', 's491457441', 's669705282', 's719569315', 's721001930', 's967510968', 's852433423']
[188300.0, 40508.0, 41164.0, 40628.0, 69784.0, 40464.0, 47540.0]
[1510.0, 326.0, 2206.0, 312.0, 2207.0, 2206.0, 275.0]
[912, 699, 1201, 1005, 867, 1160, 601]
p02623
u212786022
2,000
1,048,576
We have two desks: A and B. Desk A has a vertical stack of N books on it, and Desk B similarly has M books on it. It takes us A_i minutes to read the i-th book from the top on Desk A (1 \leq i \leq N), and B_i minutes to read the i-th book from the top on Desk B (1 \leq i \leq M). Consider the following action: * ...
['N,M,K = map(int,input().split())\nA = list(map(int, input().split()))\nB = list(map(int, input().split()))\n\n\ndef Cum(X):\n temp = 0\n Cum = [0]*len(X)\n for i in range(len(X)):\n temp += X[i]\n Cum[i] += temp\n return Cum\n\na = Cum(A)\na.insert(0,0)\nb = Cum(B)\nb.insert(0,0)\n\nna = 0\n...
['Runtime Error', 'Accepted']
['s950246409', 's600932002']
[50476.0, 47356.0]
[2207.0, 392.0]
[647, 714]
p02623
u216015528
2,000
1,048,576
We have two desks: A and B. Desk A has a vertical stack of N books on it, and Desk B similarly has M books on it. It takes us A_i minutes to read the i-th book from the top on Desk A (1 \leq i \leq N), and B_i minutes to read the i-th book from the top on Desk B (1 \leq i \leq M). Consider the following action: * ...
['def dfs(a, b, k):\n nonlocal cnt\n seen[a][b] = True\n na = a + 1\n nb = b + 1\n if na <= N and seen[na][b] is False and k >= book_a[na]:\n k -= book_a[na]\n cnt = max(cnt, na + b)\n dfs(na, b, k)\n if nb <= M and seen[a][nb] is False and k >= book_b[nb]:\n k -= book_b[nb...
['Runtime Error', 'Accepted']
['s930836849', 's774431332']
[9084.0, 47424.0]
[26.0, 228.0]
[614, 668]
p02623
u219226973
2,000
1,048,576
We have two desks: A and B. Desk A has a vertical stack of N books on it, and Desk B similarly has M books on it. It takes us A_i minutes to read the i-th book from the top on Desk A (1 \leq i \leq N), and B_i minutes to read the i-th book from the top on Desk B (1 \leq i \leq M). Consider the following action: * ...
['# -*- coding: utf-8 -*-\na = list(map(int, input().split()))\nA = list(map(int, input().split()))\nB = list(map(int, input().split()))\n\nN = a[0]\nM = a[1]\nK = a[2]\n\ncount = 0 \ncount_time = 0 \n\nif K<A[0] and K<B[0]:\n print(count)\n \nelse:\n while K >= count_time:\n if len(A)!=0 and len(B)!=0:\n ...
['Wrong Answer', 'Runtime Error', 'Runtime Error', 'Accepted']
['s197297140', 's648954096', 's702771450', 's754545007']
[41632.0, 42288.0, 47316.0, 47176.0]
[2206.0, 2206.0, 252.0, 285.0]
[1145, 869, 488, 488]
p02623
u221061152
2,000
1,048,576
We have two desks: A and B. Desk A has a vertical stack of N books on it, and Desk B similarly has M books on it. It takes us A_i minutes to read the i-th book from the top on Desk A (1 \leq i \leq N), and B_i minutes to read the i-th book from the top on Desk B (1 \leq i \leq M). Consider the following action: * ...
['from collections import deque\nn,m,k=map(int,input().split())\nA = list(map(int,input().split()))\nB = list(map(int,input().split()))\n\namax = 0\ntime = 0\nfor a in A:\n if time + a > k: break\n time += a\n amax += 1\nbmax,time = 0,0\nfor b in B:\n if time + b > k: break\n time += b\n bmax += 1\nif amax == 0:\...
['Wrong Answer', 'Runtime Error', 'Accepted']
['s411315391', 's726304172', 's043206573']
[40780.0, 49496.0, 45332.0]
[2206.0, 204.0, 257.0]
[645, 344, 307]
p02623
u224554402
2,000
1,048,576
We have two desks: A and B. Desk A has a vertical stack of N books on it, and Desk B similarly has M books on it. It takes us A_i minutes to read the i-th book from the top on Desk A (1 \leq i \leq N), and B_i minutes to read the i-th book from the top on Desk B (1 \leq i \leq M). Consider the following action: * ...
['n, m,k = list(map(int, input().split()))\na_list = list(map(int, input().split()))\nb_list = list(map(int, input().split()))\ncount = 0\nfor i in range(n + m):\n print(k)\n if a_list[0] >= b_list[0] and len(a_list) >= 1:\n k -= a_list.pop(0)\n else:\n k -= b_list.pop(0)\n \n if k > 0:...
['Runtime Error', 'Runtime Error', 'Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted']
['s078354462', 's130089106', 's361075941', 's368153709', 's633018917', 's720541219', 's338642213']
[40696.0, 9000.0, 40432.0, 60300.0, 60556.0, 60716.0, 60444.0]
[2206.0, 25.0, 2206.0, 2207.0, 2206.0, 2207.0, 630.0]
[374, 320, 498, 397, 401, 561, 562]
p02623
u227085629
2,000
1,048,576
We have two desks: A and B. Desk A has a vertical stack of N books on it, and Desk B similarly has M books on it. It takes us A_i minutes to read the i-th book from the top on Desk A (1 \leq i \leq N), and B_i minutes to read the i-th book from the top on Desk B (1 \leq i \leq M). Consider the following action: * ...
['n,m,k = map(int,input().split())\na = list(map(int,input().split()))\nb = list(map(int,input().split()))\nna = []\nc = 0\nfor booka in a:\n c += booka\n na.append(c)\nnb = []\nd = 0\nfor bookb in b:\n d += bookb\n nb.append(d)\nmaxa = 0\nfor i in range(n):\n for j in range(maxa-i,m):\n if na[i] + nb[j] <= k:\...
['Runtime Error', 'Accepted']
['s787610152', 's908183459']
[47468.0, 47480.0]
[2207.0, 292.0]
[342, 335]
p02623
u228303592
2,000
1,048,576
We have two desks: A and B. Desk A has a vertical stack of N books on it, and Desk B similarly has M books on it. It takes us A_i minutes to read the i-th book from the top on Desk A (1 \leq i \leq N), and B_i minutes to read the i-th book from the top on Desk B (1 \leq i \leq M). Consider the following action: * ...
['n,m,k = map(int,input().split())\narr0 = list(map(int,input().split()))\narr1 = list(map(int,input().split()))\nacc0 = []\n\nfor i in range(n):\n acc0.append(acc0[-1] + arr0[i])\nacc1 = []\nfor i in range(m):\n acc1.append(acc1[-1] + arr1[i])\nans = 0\nj = m\nfor i in range(n+1):\n if acc0[i] > k:\n break\n wh...
['Runtime Error', 'Runtime Error', 'Accepted']
['s317821028', 's691143117', 's711670549']
[40616.0, 47360.0, 47560.0]
[107.0, 220.0, 290.0]
[387, 384, 388]
p02623
u231570044
2,000
1,048,576
We have two desks: A and B. Desk A has a vertical stack of N books on it, and Desk B similarly has M books on it. It takes us A_i minutes to read the i-th book from the top on Desk A (1 \leq i \leq N), and B_i minutes to read the i-th book from the top on Desk B (1 \leq i \leq M). Consider the following action: * ...
['import sys\nimport random\nimport bisect\nfrom collections import deque\n\nx = input().split()\na = list(map(int, input().split()))\nb = list(map(int, input().split()))\nn, m, time = int(x[0]), int(x[1]), int(x[2])\n\n#n, m = 100000, 100000\n#time = 100000000\n#a = list(random.choices(range(10000), k=n))\n#b = list(r...
['Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted']
['s017878956', 's242839144', 's316286376', 's406479358', 's640629902', 's983700739']
[40824.0, 9880.0, 48524.0, 48276.0, 48180.0, 47376.0]
[106.0, 27.0, 417.0, 180.0, 179.0, 287.0]
[717, 666, 680, 659, 662, 356]
p02623
u234454594
2,000
1,048,576
We have two desks: A and B. Desk A has a vertical stack of N books on it, and Desk B similarly has M books on it. It takes us A_i minutes to read the i-th book from the top on Desk A (1 \leq i \leq N), and B_i minutes to read the i-th book from the top on Desk B (1 \leq i \leq M). Consider the following action: * ...
['n,m,k=map(int,input().split())\nal=[int(i) for i in input().split()]\nbl=[int(i) for i in input().split()]\nfor i in range(1,n):\n al[i]+=al[i-1]\nfor i in range(1,m):\n bl[i]+=bl[i-1]\nans=0\nj=m-1\nfor i in in range(n):\n if al[i]>k:\n break\n while bl[j]>al[i]-k:\n j-=1\n ans=max(ans,i...
['Runtime Error', 'Runtime Error', 'Accepted']
['s817669991', 's856723158', 's534500857']
[9056.0, 9060.0, 47648.0]
[26.0, 24.0, 301.0]
[319, 317, 342]
p02623
u235210692
2,000
1,048,576
We have two desks: A and B. Desk A has a vertical stack of N books on it, and Desk B similarly has M books on it. It takes us A_i minutes to read the i-th book from the top on Desk A (1 \leq i \leq N), and B_i minutes to read the i-th book from the top on Desk B (1 \leq i \leq M). Consider the following action: * ...
['# ==================================================-\n\n\n\nimport math\nimport sys\n\nsys.setrecursionlimit(10 ** 9)\n\n\ndef binary_research(start, end,function):\n if start == end:\n return start\n middle = math.ceil((start + end) / 2)\n if function(middle, k, a_sum, b_sum):\n start = middl...
['Runtime Error', 'Accepted']
['s569072517', 's231828057']
[9012.0, 47416.0]
[24.0, 909.0]
[1276, 1264]
p02623
u238084414
2,000
1,048,576
We have two desks: A and B. Desk A has a vertical stack of N books on it, and Desk B similarly has M books on it. It takes us A_i minutes to read the i-th book from the top on Desk A (1 \leq i \leq N), and B_i minutes to read the i-th book from the top on Desk B (1 \leq i \leq M). Consider the following action: * ...
['N, M, K = map(int, input().split())\nA = list(map(int, input().split()))\nB = list(map(int, input().split()))\n\nt = sum(A)\ni = N\nans = 0\n\nfor j in range(M + 1):\n while i > 0 and t > K:\n i -= 1\n t -= A[i] \n print(t)\n if t > K:\n break\n ans = max(ans, i + j)\n if j == M:\n break\n t += B[j]...
['Wrong Answer', 'Accepted']
['s691142885', 's380098294']
[40580.0, 40352.0]
[296.0, 241.0]
[311, 299]
p02623
u238438917
2,000
1,048,576
We have two desks: A and B. Desk A has a vertical stack of N books on it, and Desk B similarly has M books on it. It takes us A_i minutes to read the i-th book from the top on Desk A (1 \leq i \leq N), and B_i minutes to read the i-th book from the top on Desk B (1 \leq i \leq M). Consider the following action: * ...
['n,m,k=list(map(int,input().split()))\nA=list(map(int,input().split()))\nB=list(map(int,input().split()))\n\na,b=[0],[0]\nfor i in range(n):\n a.apppend(a[i]+A[i])\n \nfor i in range(m):\n b.append(b[i] + B[i])\n \nans,j=0,m\n\nfor i in range(n+1):\n if a[i] >k:\n break\n while b[j] > k-a[i]:\n j -=1\n \n...
['Runtime Error', 'Wrong Answer', 'Accepted']
['s423608983', 's953553294', 's793303868']
[8856.0, 40512.0, 47344.0]
[26.0, 233.0, 288.0]
[349, 205, 350]
p02623
u243312682
2,000
1,048,576
We have two desks: A and B. Desk A has a vertical stack of N books on it, and Desk B similarly has M books on it. It takes us A_i minutes to read the i-th book from the top on Desk A (1 \leq i \leq N), and B_i minutes to read the i-th book from the top on Desk B (1 \leq i \leq M). Consider the following action: * ...
["def main():\n n, m, k = map(int, input().split())\n a = [int(x) for x in input().split()]\n b = [int(x) for x in input().split()]\n\n maxv = 0\n acum = [0] * (n + 1)\n bcum = [0] * (m + 1)\n for i in range(n):\n acum[i + 1] = acum[i] + a[i]\n for i in range(m):\n bcum[i + 1] = bc...
['Runtime Error', 'Accepted']
['s328517500', 's485721782']
[47572.0, 47504.0]
[175.0, 277.0]
[513, 547]
p02623
u247830763
2,000
1,048,576
We have two desks: A and B. Desk A has a vertical stack of N books on it, and Desk B similarly has M books on it. It takes us A_i minutes to read the i-th book from the top on Desk A (1 \leq i \leq N), and B_i minutes to read the i-th book from the top on Desk B (1 \leq i \leq M). Consider the following action: * ...
['n,m,k = map(int,input().split())\nlsa = list(map(int,input().split()))\nlsb = list(map(int,input().split()))\nimport numpy \nla = [0]+[e for e in numpy.cumsum(numpy.array(lsa)) if e <= k]\nlb = [0]+[e for e in numpy.cumsum(numpy.array(lsb)) if e <= k]\nprint(la)\nprint(lb)\nmx = 0\nfor i in range(len(la)):\n for j...
['Wrong Answer', 'Runtime Error', 'Accepted']
['s190962507', 's586365663', 's738546757']
[62868.0, 32748.0, 40564.0]
[2213.0, 70.0, 313.0]
[430, 489, 474]
p02623
u248364740
2,000
1,048,576
We have two desks: A and B. Desk A has a vertical stack of N books on it, and Desk B similarly has M books on it. It takes us A_i minutes to read the i-th book from the top on Desk A (1 \leq i \leq N), and B_i minutes to read the i-th book from the top on Desk B (1 \leq i \leq M). Consider the following action: * ...
["#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\nN, M, K = map(int, input().split())\nresult = 0 # max\na_time = list(map(int, input().split()))\nb_time = list(map(int, input().split()))\n\nsum = 0\n\na_num = 0\nfor i in range(N):\n sum += a_time[i]\n a_num += 1\n if sum > K:\n sum -= a_time[i]\n ...
['Runtime Error', 'Accepted']
['s696807246', 's361552442']
[42336.0, 42312.0]
[476.0, 295.0]
[617, 579]
p02623
u248967559
2,000
1,048,576
We have two desks: A and B. Desk A has a vertical stack of N books on it, and Desk B similarly has M books on it. It takes us A_i minutes to read the i-th book from the top on Desk A (1 \leq i \leq N), and B_i minutes to read the i-th book from the top on Desk B (1 \leq i \leq M). Consider the following action: * ...
['import bisect\n\nN, M, K = list(map(int, input().split(" ")))\nA = list(map(int, input().split(" ")))\nB = list(map(int, input().split(" ")))\n\nasum = [0]\nfor a in A:\n asum.append(asum[-1] + a)\n\nbsum = [0]\nfor b in B:\n bsum.append(bsum[-1] + b)\n\nans = 0\nfor i, a in enumerate(asum):\n btime = K - a\...
['Wrong Answer', 'Accepted']
['s797124056', 's881590981']
[47372.0, 47608.0]
[184.0, 315.0]
[427, 427]
p02623
u252405453
2,000
1,048,576
We have two desks: A and B. Desk A has a vertical stack of N books on it, and Desk B similarly has M books on it. It takes us A_i minutes to read the i-th book from the top on Desk A (1 \leq i \leq N), and B_i minutes to read the i-th book from the top on Desk B (1 \leq i \leq M). Consider the following action: * ...
['def abc172c_tsundoku():\n n, m, k = map(int, input().split())\n a = list(map(int, input().split()))\n b = list(map(int, input().split()))\n A = [0] * (n + 1)\n B = [0] * (m + 1)\n\n for i in range(1, n + 1):\n A[i] = A[i - 1] + a[i - 1]\n if A[i] > k:\n n = i - 1\n ...
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s690905456', 's924465141', 's081036359']
[42492.0, 41232.0, 42696.0]
[292.0, 278.0, 327.0]
[739, 718, 761]
p02623
u252828980
2,000
1,048,576
We have two desks: A and B. Desk A has a vertical stack of N books on it, and Desk B similarly has M books on it. It takes us A_i minutes to read the i-th book from the top on Desk A (1 \leq i \leq N), and B_i minutes to read the i-th book from the top on Desk B (1 \leq i \leq M). Consider the following action: * ...
['n,m,k = map(int,input().split())\na = list(map(int,input().split()))\nb = list(map(int,input().split()))\nfor i in range(1,n):\n a[i] += a[i-1]\nfor i in range(1,m):\n b[i] += b[i-1]\na = [0]+a\nb = [0]+b\n\nans = 0\nALL = 0\nfrom bisect import bisect\nfor i in range(n+1):\n ALL = a[i]\n if ALL > k:\n ...
['Runtime Error', 'Wrong Answer', 'Accepted']
['s258728998', 's427113855', 's266673299']
[8936.0, 40568.0, 40392.0]
[27.0, 937.0, 250.0]
[409, 593, 424]
p02623
u259190728
2,000
1,048,576
We have two desks: A and B. Desk A has a vertical stack of N books on it, and Desk B similarly has M books on it. It takes us A_i minutes to read the i-th book from the top on Desk A (1 \leq i \leq N), and B_i minutes to read the i-th book from the top on Desk B (1 \leq i \leq M). Consider the following action: * ...
['n=int(input())\nl=[0]*(n+1)\nfor i in range(1,n+1):\n\n for j in range(i,n+1,i):\n\n l[j]+=1\nc=0\nfor i in range(1,n+1):\n c+=i*l[i]\n\nprint(c)\n', 'n=int(input())\nl=[0 for i in range(n+1)]\nfor i in range(1,n+1):\n \n for j in range(i,n+1,i):\n \n l[j]+=1\nc=0\nfor i in range(1,n+1):\n c...
['Runtime Error', 'Runtime Error', 'Accepted']
['s203205104', 's763573503', 's368393447']
[9188.0, 9196.0, 47348.0]
[31.0, 26.0, 282.0]
[148, 164, 318]
p02623
u260036763
2,000
1,048,576
We have two desks: A and B. Desk A has a vertical stack of N books on it, and Desk B similarly has M books on it. It takes us A_i minutes to read the i-th book from the top on Desk A (1 \leq i \leq N), and B_i minutes to read the i-th book from the top on Desk B (1 \leq i \leq M). Consider the following action: * ...
['N, M, K = map(int, input().split())\nA = list(map(int, input().split()))\nB = list(map(int, input().split()))\nans = 0\nsum_a = 0\nfor i in range(-1, len(A)):\n if i == -1:\n sum_a = 0\n else:\n sum_a += A[i]\n if sum_a > K:\n break\n sum_b = 0\n for j in range(len(B)):...
['Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted']
['s285593573', 's715957831', 's847812258', 's999530601', 's738884412']
[40440.0, 40444.0, 40420.0, 40560.0, 47432.0]
[120.0, 120.0, 119.0, 118.0, 357.0]
[620, 548, 477, 545, 727]
p02623
u262525101
2,000
1,048,576
We have two desks: A and B. Desk A has a vertical stack of N books on it, and Desk B similarly has M books on it. It takes us A_i minutes to read the i-th book from the top on Desk A (1 \leq i \leq N), and B_i minutes to read the i-th book from the top on Desk B (1 \leq i \leq M). Consider the following action: * ...
['\nind_b = 0\nmax_b = 0\nfor i in range(1, N + 1):\n if cumsum_a[i] <= K:\n max_a = i\n else:\n break\n\nfor i in range(1, M + 1):\n if cumsum_b[i] <= K:\n max_b = i\n else:\n break\n\nfor i in range(max_a, -1, -1):\n for j in range(ind_b, max_b+1):\n if cumsum_b[j] + ...
['Runtime Error', 'Accepted']
['s752533803', 's340929958']
[9064.0, 59564.0]
[29.0, 842.0]
[458, 685]
p02623
u262597910
2,000
1,048,576
We have two desks: A and B. Desk A has a vertical stack of N books on it, and Desk B similarly has M books on it. It takes us A_i minutes to read the i-th book from the top on Desk A (1 \leq i \leq N), and B_i minutes to read the i-th book from the top on Desk B (1 \leq i \leq M). Consider the following action: * ...
['n,m,k = map(int, input().split())\na = list(map(int, input().split()))\nb = list(map(int, input().split()))\nA = n\nB = 0\nif (a[0]>k):\n A = 0\nfor i in range(1,n):\n a[i] += a[i-1]\n if (a[i]>k):\n A = i\nfor i in range(1,m):\n b[i] += b[i-1]\nif (a[0]>k):\n A = 0\nans = A\nwhile True:\n if...
['Wrong Answer', 'Accepted']
['s835414855', 's501793776']
[40404.0, 40628.0]
[360.0, 335.0]
[627, 622]
p02623
u265525892
2,000
1,048,576
We have two desks: A and B. Desk A has a vertical stack of N books on it, and Desk B similarly has M books on it. It takes us A_i minutes to read the i-th book from the top on Desk A (1 \leq i \leq N), and B_i minutes to read the i-th book from the top on Desk B (1 \leq i \leq M). Consider the following action: * ...
['#include <bits/stdc++.h>\nusing namespace std;\n\nint main()\n{\n\tll n,m,k;\n\tcin>>n>>m>>k;\n\tll a[n+1];\n\tll b[m+1];\n\ta[0]=0;\n\tb[0]=0;\n\tfor(ll i=1;i<=n;i++)\n\t{\n\t\tcin>>a[i];\n\t\ta[i]+=a[i-1];\n\t}\n\tfor(ll i=1;i<=m;i++)\n\t{\n\t\tcin>>b[i];\n\t\tb[i]+=b[i-1];\n\t}\n\tll j=m;\n\tll ans=0;\n\tfor(ll i=...
['Runtime Error', 'Accepted']
['s485587203', 's650848672']
[8948.0, 47316.0]
[24.0, 303.0]
[429, 336]
p02623
u268318377
2,000
1,048,576
We have two desks: A and B. Desk A has a vertical stack of N books on it, and Desk B similarly has M books on it. It takes us A_i minutes to read the i-th book from the top on Desk A (1 \leq i \leq N), and B_i minutes to read the i-th book from the top on Desk B (1 \leq i \leq M). Consider the following action: * ...
['import numpy as np\nimport sys\nread = sys.stdin.buffer.read\n\n\nN, M, K = map(int, input().split())\nAB = np.array(read().split(), np.int32)\nA = [0] + np.cumsum(AB[:N]).tolist()\nB = [0] + np.cumsum(AB[N:]).tolist()\nassert (N == len(A) - 1) and (M == len(B) - 1)\n\nleft = 0\nfor i, b in enumerate(B):\n if b > ...
['Runtime Error', 'Runtime Error', 'Accepted']
['s077680884', 's525629346', 's153571586']
[53324.0, 53120.0, 53436.0]
[207.0, 208.0, 315.0]
[566, 479, 465]
p02623
u276975953
2,000
1,048,576
We have two desks: A and B. Desk A has a vertical stack of N books on it, and Desk B similarly has M books on it. It takes us A_i minutes to read the i-th book from the top on Desk A (1 \leq i \leq N), and B_i minutes to read the i-th book from the top on Desk B (1 \leq i \leq M). Consider the following action: * ...
['N, M, K = [int(x) for x in input().split()]\n\nstackA = [int(x) for x in input().split()]\nstackB = [int(x) for x in input().split()]\n\nindexB = 0\nindexA = 0\n\nbooks = 0\nmostBooks = 0\ntime = 0\n\nfor x in stackB:\n if time + x > K:\n indexB -= 1\n break\n\n else:\n time += x\n ...
['Wrong Answer', 'Accepted']
['s600028234', 's057577636']
[40548.0, 40556.0]
[303.0, 284.0]
[619, 599]
p02623
u283719735
2,000
1,048,576
We have two desks: A and B. Desk A has a vertical stack of N books on it, and Desk B similarly has M books on it. It takes us A_i minutes to read the i-th book from the top on Desk A (1 \leq i \leq N), and B_i minutes to read the i-th book from the top on Desk B (1 \leq i \leq M). Consider the following action: * ...
['N, M, K = map(int, input().split())\nA = list(map(int, input().split()))\nB = list(map(int, input().split()))\n\ncount = 0\nar = [0] * (N)\nbr = [0] * (M)\n\nar[0] = A[0]\nfor i, v in enumerate(A):\n ar[i+1] = ar[i] + v\n\nbr[0] = B[0]\nfor i, v in enumerate(B):\n br[i+1] = br[i] + v\n\nmax_read = 0\nj = M\nfor...
['Runtime Error', 'Accepted']
['s560992256', 's935263156']
[40548.0, 47408.0]
[167.0, 306.0]
[467, 427]
p02623
u284045566
2,000
1,048,576
We have two desks: A and B. Desk A has a vertical stack of N books on it, and Desk B similarly has M books on it. It takes us A_i minutes to read the i-th book from the top on Desk A (1 \leq i \leq N), and B_i minutes to read the i-th book from the top on Desk B (1 \leq i \leq M). Consider the following action: * ...
['import bisect\nfrom itertools import accumulate\n\nN , M , K = map(int , input().split())\na = list(map(int , input().split()))\nb = list(map(int , input().split()))\na = list(accumulate(a))\nb = list(accumulate(b))\na.insert(0,0)\n\nans = 0\nfor i in range(N + 1):\n if a[i] > K:\n break\n ans = max(ans ...
['Wrong Answer', 'Accepted']
['s300164228', 's565905281']
[41120.0, 41016.0]
[244.0, 265.0]
[351, 355]
p02623
u288430479
2,000
1,048,576
We have two desks: A and B. Desk A has a vertical stack of N books on it, and Desk B similarly has M books on it. It takes us A_i minutes to read the i-th book from the top on Desk A (1 \leq i \leq N), and B_i minutes to read the i-th book from the top on Desk B (1 \leq i \leq M). Consider the following action: * ...
['from itertools import accumulate\nfrom bisect import bisect_right\nn,m,k = map(int,input().split())\na = list(map(int,input().split()))\nsum_a = list(accumulate(a))\nb = list(map(int,input().split()))\nsum_b = list(accumulate(b))\nma = 0\nprint(sum_a,sum_b)\nfor i in range(len(sum_a)):\n x = sum_a[i]\n if k<x:\...
['Wrong Answer', 'Accepted']
['s194478949', 's058251473']
[56312.0, 52224.0]
[321.0, 289.0]
[441, 513]
p02623
u290014241
2,000
1,048,576
We have two desks: A and B. Desk A has a vertical stack of N books on it, and Desk B similarly has M books on it. It takes us A_i minutes to read the i-th book from the top on Desk A (1 \leq i \leq N), and B_i minutes to read the i-th book from the top on Desk B (1 \leq i \leq M). Consider the following action: * ...
['N, M, K=map(int,input().split())\nA = list(map(int, input().split()))\nB = list(map(int, input().split()))\nLA = [0]\nLB = [0]\nfor i in range(N):\n C=LA[i]+A[i]\n if C>K:\n N=i\n break\n else:\n LA.append(C)\nfor j in range(M):\n C=LB[j]+B[j]\n if C>K:\n M=j\n break\...
['Wrong Answer', 'Accepted']
['s663394918', 's915677564']
[42384.0, 42208.0]
[399.0, 380.0]
[616, 623]
p02623
u294703554
2,000
1,048,576
We have two desks: A and B. Desk A has a vertical stack of N books on it, and Desk B similarly has M books on it. It takes us A_i minutes to read the i-th book from the top on Desk A (1 \leq i \leq N), and B_i minutes to read the i-th book from the top on Desk B (1 \leq i \leq M). Consider the following action: * ...
['from sys import stdin, stdout\ninput = stdin.readline\nprint = stdout.write\nn, m, k = map(int, input().split())\na, b = [0], [0]\na += list(map(int, input().split())),\nb += list(map(int, input().split())),\nfor i in range(1, n + 1):\n a[i] += a[i - 1]\nfor i in range(1, m + 1):\n b[i] += b[i - 1]\ni, j, z = 0...
['Runtime Error', 'Accepted']
['s341598883', 's634761600']
[39992.0, 39880.0]
[111.0, 284.0]
[430, 348]
p02623
u296150111
2,000
1,048,576
We have two desks: A and B. Desk A has a vertical stack of N books on it, and Desk B similarly has M books on it. It takes us A_i minutes to read the i-th book from the top on Desk A (1 \leq i \leq N), and B_i minutes to read the i-th book from the top on Desk B (1 \leq i \leq M). Consider the following action: * ...
['n,m,k=map(int,input().split())\na=[0]+list(map(int,input().split()))\nb=[0]+list(map(int,input().split()))\nfor i in range(n):\n\ta[i+1]+=a[i]\nfor i in range(m):\n\tb[i+1]+=b[i]\nprint(a,b)\nfrom bisect import bisect_right\nans=0\nfor i in range(n+1):\n\tif k-a[i]>0:\n\t\tr=bisect_right(b,k-a[i])\n\t\tans=max(r+i-1,...
['Wrong Answer', 'Accepted']
['s773669819', 's937650832']
[40352.0, 39968.0]
[392.0, 325.0]
[328, 304]
p02623
u301624971
2,000
1,048,576
We have two desks: A and B. Desk A has a vertical stack of N books on it, and Desk B similarly has M books on it. It takes us A_i minutes to read the i-th book from the top on Desk A (1 \leq i \leq N), and B_i minutes to read the i-th book from the top on Desk B (1 \leq i \leq M). Consider the following action: * ...
['\n\nimport sys\nimport math\nimport itertools\nimport collections\n\ndef solve(N,M,K,A,B):\n accumA = [0,A.pop(0)]\n accumB = [0,B.pop(0)]\n for a in A:\n accumA.append(accumA[-1] + a)\n for b in B:\n accumB.append(accumB[-1] + b)\n ans = 0\n j = M\n for i in range(N + 1):\n ...
['Runtime Error', 'Accepted']
['s353498372', 's211815628']
[47720.0, 47832.0]
[173.0, 221.0]
[637, 652]
p02623
u303058371
2,000
1,048,576
We have two desks: A and B. Desk A has a vertical stack of N books on it, and Desk B similarly has M books on it. It takes us A_i minutes to read the i-th book from the top on Desk A (1 \leq i \leq N), and B_i minutes to read the i-th book from the top on Desk B (1 \leq i \leq M). Consider the following action: * ...
['N, M, K = map(int, input().split())\nA = list(map(int, input().split()))\nB = list(map(int, input().split()))\nfor i in range(1, N): A[i] += A[i - 1]\nfor i in range(1, M): B[i] += B[i - 1]\nprint(A)\nprint(B)\nans, j = 0, M - 1\nfor i in range(N):\n if A[i] > K: break\n while B[j] > K - A[i]: j -= 1\n ans =...
['Runtime Error', 'Accepted']
['s250882534', 's959274919']
[40676.0, 40132.0]
[2213.0, 286.0]
[353, 345]
p02623
u303344598
2,000
1,048,576
We have two desks: A and B. Desk A has a vertical stack of N books on it, and Desk B similarly has M books on it. It takes us A_i minutes to read the i-th book from the top on Desk A (1 \leq i \leq N), and B_i minutes to read the i-th book from the top on Desk B (1 \leq i \leq M). Consider the following action: * ...
['n,m,k = map(int,input().split())\nnlist = list(map(int,input().split()))\nmlist = list(map(int,input().split()))\nresult = 0\n\n\nmrest = sum(mlist)\n\nmcount = m\n\n\nfor ncount in range(0, len(nlist) + 1):\n \n \n while mrest > 0 and mcount > 0 and mrest > k:\n mcount -= 1\n mrest -= mlist[mcount - 1]\n \...
['Runtime Error', 'Accepted']
['s465442452', 's618191744']
[40576.0, 40416.0]
[212.0, 277.0]
[1127, 1506]
p02623
u307516601
2,000
1,048,576
We have two desks: A and B. Desk A has a vertical stack of N books on it, and Desk B similarly has M books on it. It takes us A_i minutes to read the i-th book from the top on Desk A (1 \leq i \leq N), and B_i minutes to read the i-th book from the top on Desk B (1 \leq i \leq M). Consider the following action: * ...
['import sys\nsys.setrecursionlimit(10**6)\n\nn, m, k = map(int, input().split())\na = list(map(int, input().split()))\nb = list(map(int, input().split()))\n\nfrom collections import deque\n\na = deque(a)\nb = deque(b)\n\nans = 0\ntime = k\n\nwhile time >= 0:\n if a and b:\n tmp_a = time-a[0]\n tmp_b =...
['Runtime Error', 'Accepted']
['s019425237', 's763959893']
[160040.0, 47268.0]
[3533.0, 303.0]
[1164, 507]
p02623
u307622233
2,000
1,048,576
We have two desks: A and B. Desk A has a vertical stack of N books on it, and Desk B similarly has M books on it. It takes us A_i minutes to read the i-th book from the top on Desk A (1 \leq i \leq N), and B_i minutes to read the i-th book from the top on Desk B (1 \leq i \leq M). Consider the following action: * ...
['1 N, M, K = map(int, input().split())\n2 A = list(map(int, input().split()))\n3 B = list(map(int, input().split()))\n4\n5 a, b = [0], [0]\n6 for i in range(N):\n7 \ta.append(a[i] + A[i])\n8 for i in range(M):\n9 \tb.append(b[i] + B[i])\n10\n11 ans, j = 0, M\n12 for i in range(N + 1):\n13 \u3000\u3000if a[i] > K:\n14 ...
['Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted']
['s476252112', 's514779212', 's519774933', 's925526483']
[8904.0, 9008.0, 9036.0, 47388.0]
[23.0, 25.0, 26.0, 221.0]
[395, 424, 380, 479]