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
u804711544
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\n\nN, M, K = map(int, input().split())\n\nbookA = deque(list(map(int, input().split())), N)\nbookB = deque(list(map(int, input().split())), M)\n\ncnt = 0\nwhile K >= 0:\n if len(bookA) == 0 and len(bookB) == 0:\n break\n elif len(bookA) > 0 and len(bookB) == 0:\n K -=...
['Wrong Answer', 'Accepted']
['s609785454', 's359207950']
[42852.0, 48332.0]
[353.0, 218.0]
[597, 1599]
p02623
u805392425
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>\n#define _GLIBCXX_DEBUG\n\n\nusing namespace std;\ntypedef long long ll;\n\nint N, M;\nll K;\nvector<ll> A;\nvector<ll> B;\n\nbool is_ok(vector<ll> B, int cnt_a, int mid){\n return A[cnt_a] + B[mid] <= K;\n}\n\nint binary_search(vector<ll> B, int cnt_a) {\n int left = -1; // 配列の左端\n in...
['Runtime Error', 'Accepted']
['s841428973', 's494627996']
[9012.0, 49180.0]
[25.0, 1200.0]
[1380, 884]
p02623
u806976856
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.append("1000000001")\nb.append("1000000001")\na[n]=int(a[n])\nb[m]=int(b[m])\n\nx=0\ny=0\nans=0\ntime=0\n\nfor i in range(n+m):\n if a[x]<=b[y]:\n time+=a[x]\n if time>k:\n time-=a[x]\n print(ans)\n sys.exit()\n x+=1\n ans+=1\n else:\n time+=...
['Runtime Error', 'Accepted']
['s306584407', 's912012334']
[9144.0, 47512.0]
[25.0, 1254.0]
[438, 614]
p02623
u810356688
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 input(): return sys.stdin.readline().rstrip()\nfrom itertools import accumulate\ndef main():\n n, m, k = map(int,input().split())\n A = [0] + list(map(int,input().split()))\n B = [0] + list(map(int,input().split()))\n A = list(accumulate(A))\n B = list(accumulate(B))\n ans = 0\n j...
['Wrong Answer', 'Accepted']
['s956104433', 's193893280']
[41868.0, 42060.0]
[327.0, 189.0]
[536, 511]
p02623
u814271993
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\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 ...
['Runtime Error', 'Runtime Error', 'Accepted']
['s306585048', 's626179976', 's770660114']
[9052.0, 9044.0, 48724.0]
[24.0, 21.0, 155.0]
[352, 352, 449]
p02623
u821393459
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())\nAs = [int(n) for n in input().split()]\nBs = [int(n) for n in input().split()]\n\na_sum = [0] * (len(As) + 1)\nb_sum = [0] * (len(Bs) + 1)\n\nfor i in range(1, len(As)):\n a_sum[i] = a_sum[i-1] + As[i]\n\nfor j in range(1, len(Bs)):\n b_sum[i] = b_sum[i-1] + Bs[i]\n\nmax_book_...
['Runtime Error', 'Accepted']
['s724210755', 's549133323']
[40524.0, 47352.0]
[261.0, 302.0]
[513, 481]
p02623
u823585596
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()))\nx,y=[0],[0]\nfor i in range(n):\n x.append(a[i]+x[i])\nfor j in range(m):\n y.append(b[j]+y[j])\n\nans=0\nj=m\nfor i in range(n+1):\n if x[i]>k:\n break\n while y[j]>k-x[i]:\n j-=1\n ans=ma...
['Wrong Answer', 'Runtime Error', 'Runtime Error', 'Accepted']
['s046349934', 's341652737', 's683573045', 's991458001']
[47480.0, 47436.0, 56016.0, 47400.0]
[265.0, 190.0, 402.0, 303.0]
[314, 314, 372, 323]
p02623
u823885866
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 math\nimport itertools\nimport collections\nimport heapq\nimport re\nimport numpy as np\nfrom functools import reduce\n\nrr = lambda: sys.stdin.readline().rstrip()\nrs = lambda: sys.stdin.readline().split()\nri = lambda: int(sys.stdin.readline())\nrm = lambda: map(int, sys.stdin.readline().split())...
['Wrong Answer', 'Accepted']
['s141118684', 's917234112']
[59460.0, 59388.0]
[281.0, 1206.0]
[1055, 1055]
p02623
u823926181
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 j in range(M):\n b.append(b[i] + B[i])\n\nans = 0\nj = M\n\nfor i in range(N + 1):\n if a[i] > K:\n break\n while b[j]...
['Runtime Error', 'Accepted']
['s173824780', 's095490390']
[9164.0, 47648.0]
[24.0, 302.0]
[364, 366]
p02623
u829391045
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 bins(a, x):\n l = -1\n h = len(a)\n while (h-l) > 1:\n m = (l+h)//2\n if x > a[m]:\n l = m\n else:\n h = m\n return l + 1\nn, m, k = list(map(int, input().split()))\na = list(map(int, input().split()))\nb = list(map(int, input().split()))\npa, pb = [0] * (n+1...
['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Runtime Error', 'Accepted']
['s674917499', 's762575061', 's893833028', 's954251201', 's758990297']
[48640.0, 47364.0, 48656.0, 47368.0, 48544.0]
[723.0, 2207.0, 755.0, 288.0, 704.0]
[568, 443, 554, 401, 550]
p02623
u830054172
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: * ...
['\nN, M, K = map(int, input().split())\nA = list(map(int, input().split()))\nB = list(map(int, input().split()))\n\ntime = 0\ncnt = 0\nb = []\n\nfor i in B:\n if i+time>K:\n break\n time += i\n cnt += 1\n b.append(i)\n\nb.reverse()\n# print(b)\n# print(cnt)\nbi = 0\nfor i in range(N):\n if time+A...
['Runtime Error', 'Accepted']
['s786976084', 's806958541']
[9000.0, 42848.0]
[31.0, 239.0]
[1127, 335]
p02623
u830588156
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 = list(map(int,input().split()))\n B = list(map(int,input().split()))\n \n a,b = [0],[0]\n for i in range(N):\n a.append(a[i] + A[i])\n for i in range(N):\n b.append(b[i] + B[i])\n \n ans,j = 0,M\n for i in range(N+1):\...
['Runtime Error', 'Wrong Answer', 'Accepted']
['s408104981', 's408699679', 's207903029']
[47292.0, 39960.0, 47460.0]
[231.0, 244.0, 234.0]
[489, 1192, 489]
p02623
u833492079
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 io\nimport sys\n\n_INPUT = """\\\n1 4 120\n100 1 1 1 1 1 1 1 1 1 1\n80 10 10 10 10\n"""\nsys.stdin = io.StringIO(_INPUT)\n\n####################################################################\nimport sys\ndef p(*_a):\n # return\n _s=" ".join(map(str,_a))\n #print(_s)\n sys.stderr.write(_s+"\\n")\n########...
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s036562222', 's938802703', 's183776151']
[9072.0, 9080.0, 50768.0]
[32.0, 33.0, 277.0]
[814, 809, 1154]
p02623
u835283937
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 = deque([int(a) for a in input().split()])\n B = deque([int(b) for b in input().split()])\n Bsum = sum(B)\n ans = Asum = 0\n idx_b = len(B) - 1\n\n A.appendleft(0)\n\n for i in range(len(A)):\n Asum += A[i]\n\n for j in range(...
['Runtime Error', 'Accepted']
['s585473133', 's545699113']
[9208.0, 40660.0]
[26.0, 205.0]
[665, 596]
p02623
u840310460
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: * ...
['5 4 1\n1000000000 1000000000 1000000000 1000000000 1000000000\n1000000000 1000000000 1000000000 1000000000', '# %%\n\nN, M, K = [int(i) for i in input().split()]\nA = [int(i) for i in input().split()]\nB = [int(i) for i in input().split()]\n\n# %%\nAA = [0] * (N + 1)\nBB = [0] * (M + 1)\nfor i, v in enumerate(A):\n ...
['Runtime Error', 'Accepted']
['s297725672', 's802577348']
[8940.0, 47688.0]
[29.0, 328.0]
[104, 466]
p02623
u842388336
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 = list(map(int, input().split(' ')))\nb_list = list(map(int, input().split(' ')))\na_sum = 0\nb_sum = sum(b_list)\n\nj = m\nbest=0\nfor i, a in enumerate(a_list):\n a_sum+=a\n if a_sum>k:\n break\n while ((a_sum + b_sum) > k) & (j>=0):\n b_sum-=b_list[j]\n j-...
['Runtime Error', 'Runtime Error', 'Wrong Answer', 'Accepted']
['s114101152', 's362846234', 's993339756', 's582338673']
[40688.0, 42144.0, 47504.0, 47692.0]
[186.0, 291.0, 302.0, 311.0]
[363, 687, 412, 420]
p02623
u842878495
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 *\n\nN, M, K = [int(n) for n in input().split()]\nA = [x for x in accumulate([int(n) for n in input().split()])]\nB = [x for x in accumulate([int(n) for n in input().split()])]\nans = 0\na = bisect(A, K)\nfor i in range(a-1, -1, -1):\n b = bisect(B, K-A[i])\n ans...
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s351073226', 's522438542', 's872318240']
[45148.0, 46736.0, 44708.0]
[268.0, 268.0, 266.0]
[336, 344, 398]
p02623
u843135954
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\nstdin = sys.stdin\nsys.setrecursionlimit(10**6)\nni = lambda: int(ns())\nna = lambda: list(map(int, stdin.readline().split()))\nnn = lambda: list(stdin.readline().split())\nns = lambda: stdin.readline().rstrip()\n\nn,m,k = na()\na = na()\nb = na()\naa = [0]\nbb = [0]\n\nfor i in a:\n aa.append(aa[-1]+i...
['Wrong Answer', 'Accepted']
['s701752956', 's723644158']
[47520.0, 47840.0]
[322.0, 332.0]
[493, 496]
p02623
u844646164
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\nN, M, K = map(int, input().split())\nA = list(map(int, input().split()))\nB = list(map(int, input().split()))\nca = A[:]\ncb = B[:]\n\nfor i in range(N-1):\n ca[i+1] += ca[i]\nfor i in range(M-1):\n cb[i+1] += cb[i]\nprint(ca, cb)\nans = 0\nfor i in range(N):\n if ca[i] <= K:\n idx = bisect.bisec...
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s354255131', 's903893646', 's633617938']
[54840.0, 47484.0, 47392.0]
[540.0, 377.0, 505.0]
[516, 461, 502]
p02623
u845650912
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\nimport numpy as np\n\na =[]\n\nif K \n\nflag = True\nwhile flag:\n if A[0] >= K or B[0] >= K:\n flag = False\n elif not A and not B:\n flag = False\n elif not A:\n a.append(B[0...
['Runtime Error', 'Runtime Error', 'Accepted']
['s436393144', 's561481623', 's222390868']
[8960.0, 45084.0, 47688.0]
[32.0, 2207.0, 282.0]
[638, 607, 352]
p02623
u861886710
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())\narr1 = list(map(int, input().split()))\narr2 = list(map(int, input().split()))\n\nacum1=[0]\n\n\nfor i in range(n):\n\t\n \n\tacum1.append(acum[-1]+arr1[i])\n \nacum2 = [0]\n\nfor i in range(m):\n\t\n \n\tacum2.append(acum2[-1]+arr2[i])\n\nans = 0\nfor i in range(n+1):\n\t\...
['Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted']
['s454750838', 's647799342', 's746570241', 's389509415']
[9052.0, 8940.0, 43628.0, 47524.0]
[27.0, 24.0, 120.0, 286.0]
[999, 444, 793, 986]
p02623
u865119809
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()))\n\nb = list(map(int,input().split()))\n\nc = [0]\nd = 0\nfor i in range(n):\n d += a[i]\n c.append(d)\n\ne = [0]\nf = 0\nfor i in range(n):\n f += b[i]\n e.append(f)\n\n\nans = 0\nj = q-1\nfor i in range(n):\n if c[i] > k:\n ...
['Runtime Error', 'Runtime Error', 'Accepted']
['s514345424', 's911986623', 's872388401']
[47348.0, 47388.0, 47372.0]
[187.0, 204.0, 308.0]
[397, 400, 398]
p02623
u869519920
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 = list(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]\nfor i in range(1,m):\n b[i] += b[i-1]\na_max = 0\nfor i in range(n, 0, -1)\n if a[i-1] <= k:\n a_max = i\n break\nb_max = 0\nfor i in range...
['Runtime Error', 'Accepted']
['s359726571', 's341790835']
[8952.0, 47140.0]
[24.0, 286.0]
[557, 368]
p02623
u869731337
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()))\ntime=0\ncount=0\nl=len(a)+len(b)\nfor i in range(l)\n if len(b)>0:\n if len(a)>0:\n if a[0]<b[0]:\n if time+a[0]<=k:\n time+=a[0]\n a.pop(0)\n ...
['Runtime Error', 'Runtime Error', 'Accepted']
['s266778544', 's744345901', 's335145088']
[9032.0, 8972.0, 47548.0]
[22.0, 25.0, 296.0]
[814, 324, 329]
p02623
u870518235
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: * ...
['M,N,K = map(int, input().split())\nA = list(map(int, input().split()))\nB = list(map(int, input().split()))\n\nres = 0\ntime = 0\n\nwhile time <= K:\n if A[0] <= B[0]:\n time = time + A.pop(0)\n else:\n time = time + B.pop(0)\n res += 1\n\nprint(res)', 'N, M, K = map(int, input().split())\nA = ...
['Runtime Error', 'Runtime Error', 'Wrong Answer', 'Accepted']
['s215022076', 's306408016', 's849046086', 's107487388']
[40440.0, 9040.0, 40624.0, 47520.0]
[2206.0, 26.0, 2206.0, 297.0]
[259, 713, 368, 353]
p02623
u871841829
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(1000000)\nN, M, K = map(int, input().split())\nA = list(map(int, input().split()))\nB = list(map(int, input().split()))\n\nrest = K\nans = 0\n\ndef dfs(cost, aindex, bindex, score):\n\n if K == cost:\n print("1:", score, cost)\n return score\n elif K < cost:\n ...
['Wrong Answer', 'Runtime Error', 'Runtime Error', 'Accepted']
['s139045554', 's242107945', 's315471442', 's890931137']
[403832.0, 41008.0, 9192.0, 47560.0]
[2337.0, 147.0, 27.0, 373.0]
[821, 850, 889, 431]
p02623
u871934301
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=A[0]\nb=sum(B)\np=0\nfor i in range(N):\n count=a+b\n while count>K:\n count-=B[M-1]\n M-=1\n if i!=N-1:\n a+=A[i+1]\n p=max(p,i+M+1)\n if a>K:\n break\nprint(p)', 'from col...
['Runtime Error', 'Runtime Error', 'Wrong Answer', 'Accepted']
['s587947276', 's691467360', 's883260827', 's105310986']
[40536.0, 39380.0, 39636.0, 40364.0]
[259.0, 119.0, 300.0, 269.0]
[290, 830, 883, 600]
p02623
u872923967
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())\narA = list(map(int, input().split()))\narB = list(map(int, input().split()))\n\nidxA = idxB = 0\nreadTime :int = 0\nreadBooks :int = 0\nwhile readTime < k:\n if arA[idxA] <= arA[idxB] and idxA < n:\n readTime += arA[idxA]\n idxA += 1\n else:\n readTime +...
['Runtime Error', 'Accepted']
['s869134987', 's072823408']
[40620.0, 47492.0]
[184.0, 307.0]
[419, 362]
p02623
u884323674
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_temp = [int(i) for i in input().split()]\nB_temp = [int(i) for i in input().split()]\n\nA, B = [0]*(N+1), [0]*(M+1)\nfor i in range(1, N):\n A[i] = A[i-1] + A_temp[i-1]\n \nfor j in range(1, M):\n B[j] = B[j-1] + B_temp[j-1]\n \nans = 0\nfor a in range(N+1):\n if ...
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s522918585', 's659121222', 's638937117']
[48576.0, 48420.0, 48760.0]
[405.0, 2207.0, 311.0]
[456, 447, 447]
p02623
u891516200
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\nfrom sys import exit\n\nN, M, K = [int(x) for x in input().split()]\n\na_book = [0]\nfor index, i in enumerate(input().split(), 1):\n a_book.append(a_book[index-1] + int(i))\n\nb_book = [0]\nfor index, i in enumerate(input().split(), 1):\n b_book.append(b_book[index-1] + int(i))\n...
['Wrong Answer', 'Runtime Error', 'Accepted']
['s026255883', 's560423980', 's723347484']
[340868.0, 329340.0, 44324.0]
[2214.0, 2216.0, 270.0]
[1084, 1080, 460]
p02623
u892340697
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\ntmp = []\ns = 0\nfor i in a:\n if s + i <= k:\n tmp.append(i)\n s += i\n else:\n break\na = tmp\ntmp = []\ns = 0\nfor i in b:\n if s + i <= k:\n tmp.append(i)\n ...
['Wrong Answer', 'Accepted']
['s897281795', 's476306810']
[39868.0, 41120.0]
[499.0, 462.0]
[659, 648]
p02623
u895231258
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\nN,M,K = map(int,input().split())\nA = list(map(int,input().split()))\nB = list(map(int,input().split()))\n\nA_np = np.array(A)\nB_np = np.array(B)\n\nC_np = np.append(A_np,B_np)\nC_np = np.sort(C_np)\n\nx = 0\nfor i in range(len(C_np)):\n if K > x + C_np[i]:\n x += 1\n else:\n ...
['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Runtime Error', 'Wrong Answer', 'Wrong Answer', 'Accepted']
['s014229069', 's069637238', 's077770856', 's136905870', 's477870491', 's808575050', 's288935598']
[58604.0, 58624.0, 47544.0, 58620.0, 58548.0, 58792.0, 47528.0]
[474.0, 490.0, 196.0, 271.0, 2207.0, 488.0, 282.0]
[316, 344, 374, 349, 417, 317, 366]
p02623
u896741788
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()))\nfrom itertools import accumulate\nar=[0]+list(accumulate(a))\nbru=[0]+list(accumulate(b))\nfrom bisect import bisect_left as bl,bisect_right as br\nans=0\nprint(ar,bru)\nfor i in range(n+1):\n g=ar[i]\n if g>k:br...
['Wrong Answer', 'Accepted']
['s514031466', 's601358239']
[58588.0, 50940.0]
[346.0, 313.0]
[409, 414]
p02623
u900968659
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()))\nsumbook,sumt,i,j=0,0,0,0\nwhile True:\n if i<=(n-1) and j<=(m-1):\n if a[i]>b[j]:\n sumt+=b[j]\n j+=1\n else:\n sumt+=a[i]\n i+=1\n elif i>(n-1) and j<=(m-1):\n s...
['Wrong Answer', 'Accepted']
['s820039575', 's871143300']
[42396.0, 47592.0]
[267.0, 283.0]
[592, 533]
p02623
u902544771
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\nC = [0]\nD = [0]\nfor a in A:\n C.append(C[-1] + a)\nfor b in B:\n D.append(D[-1] + b)\n\np = n\nfor i in range(n + 1):\n if C[i] > k:\n p = i - 1\n break\n\n_max = 0\nkeep = 0...
['Wrong Answer', 'Accepted']
['s615075159', 's972776264']
[48668.0, 47668.0]
[2206.0, 367.0]
[468, 524]
p02623
u903005414
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_left\nimport numpy as np\nN, M, K = map(int, input().split())\nA = np.array(list(map(int, input().split())))\nB = np.array(list(map(int, input().split())))\n\nif A.sum() + B.sum() <= K:\n print(N + M)\n exit()\n\ncumsum_A = [0] + A.cumsum()\ncumsum_B = [0] + B.cumsum()\nprint('cusmum_A...
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s456892741', 's816604077', 's983315534']
[53420.0, 53500.0, 53668.0]
[864.0, 849.0, 681.0]
[728, 725, 543]
p02623
u910632349
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()))\naa,bb=[0],[0]\nfor i in range(n):\n aa.append(aa[-1]+a[i])\nfor i in range(m):\n bb.append(bb[-1]+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 a...
['Runtime Error', 'Accepted']
['s507913507', 's212106093']
[47372.0, 47480.0]
[186.0, 282.0]
[330, 333]
p02623
u915764321
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=[0]\nfor i in range(n):\n A.append(a[i])\nB=[0]\nfor i in range(m):\n B.append(b[i])\nans=0\nj=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(ans,i+j)\nprint(ans)', ...
['Wrong Answer', 'Runtime Error', 'Accepted']
['s199721316', 's230957749', 's241194312']
[40512.0, 40604.0, 47480.0]
[254.0, 253.0, 288.0]
[298, 273, 308]
p02623
u918770092
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.insert(0, 0)\nb.insert(0, 0)\n\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(ans, i+j)\nprint(ans)', 'n, m, k = map(int, input().split...
['Wrong Answer', 'Accepted']
['s905728975', 's948344438']
[40616.0, 47412.0]
[207.0, 289.0]
[268, 341]
p02623
u920463220
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\ndef ss(s,a):\n nn=len(a)\n for i in range(nn):\n if a[i]>s:return i\n return nn\nn,m,s=map(int, stdin.readline().split());M=10**9+2\ndn=list(map(int, stdin.readline().split()))#+[M]\ndm=list(map(int, stdin.readline().split()))#+[M]\npn=[dn[0]];pm=[dm[0]]\nfor v in dn[1:]:...
['Wrong Answer', 'Accepted']
['s821024908', 's579273996']
[49420.0, 39944.0]
[233.0, 299.0]
[974, 354]
p02623
u921156673
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()))\nassert len(A) == N\nassert len(B) == M\n\nimport numpy as np\ncumA = np.cumsum([0] + A)\ncumB = np.cumsum([0] + B)\nmaximum = 0\nfor maxA,timeA in enumerate(cumA):\n if timeA > K:\n break\n timeB = K -...
['Wrong Answer', 'Runtime Error', 'Runtime Error', 'Accepted']
['s059298531', 's731698379', 's917780836', 's440669216']
[48952.0, 47328.0, 47292.0, 47504.0]
[2207.0, 283.0, 279.0, 295.0]
[435, 326, 328, 325]
p02623
u923662841
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 = list(map(int, input().split()))\n B = list(map(int, input().split()))\n \n indb = M-1\n now = sum(B)\n count = M\n while now > K:\n now -= B[indb]\n count -= 1\n indb -= 1\n \n ans = count\n \n for a in A:\n...
['Runtime Error', 'Wrong Answer', 'Accepted']
['s219312244', 's536933682', 's091313935']
[9000.0, 41272.0, 50760.0]
[28.0, 2206.0, 273.0]
[600, 370, 384]
p02623
u924182136
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 copy\nN,M,K = map(int,input().split())\nA = [0]*N\nB = [0]*M\nA = list(map(int,input().split()))\nB = list(map(int,input().split()))\na = 0\nb = 0\n\ntmp = 0\nans = 0\n\n# if A[a] < B[b]:\n# if tmp <= K:\n# tmp += A[a]\n# ans += 1\n# a += 1\n# elif A[a] > B[b...
['Runtime Error', 'Accepted']
['s008333906', 's203954977']
[161480.0, 47436.0]
[2392.0, 301.0]
[1187, 526]
p02623
u929217794
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(map(int, input().split()))\nb = list(map(int, input().split()))\nans = 0\n\na_accum = [0] + list(accumulate(a))\nb_accum = [0] + list(accumulate(b))\n\nfor j in range(len(a_accum)):\n for i in range(len(b_accum)):\n t = a_accum[-(j+...
['Wrong Answer', 'Wrong Answer', 'Time Limit Exceeded', 'Accepted']
['s354701203', 's518608212', 's675672001', 's455270848']
[82828.0, 9292.0, 39380.0, 49120.0]
[2261.0, 32.0, 2206.0, 238.0]
[470, 971, 848, 388]
p02623
u933929042
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 random\nn, m, k = map(int, input().split())\n\na_list = list(map(int, input().split()))\nb_list = list(map(int, input().split()))\n\n\n# print(n,m,k)\n# print(a_list[0], b_list[0])\na_sum = [0]\nb_sum = [0]\nmax_a = 0\nmax_b = 0\nfor i in range(1, max(n+1, m+1)):\n if i < n+1:\n a_sum.append(a_sum[i-...
['Wrong Answer', 'Runtime Error', 'Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted']
['s283107672', 's381070070', 's409106958', 's664588286', 's752208534', 's817374970']
[49172.0, 48860.0, 33360.0, 48864.0, 40584.0, 48916.0]
[349.0, 328.0, 1046.0, 382.0, 341.0, 326.0]
[883, 771, 863, 881, 546, 760]
p02623
u934529721
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\nt = 0\n\nfor i in range(m):\n t += b[i]\n\n\nj = m\nans = 0\n\nfor i in range(n+1):\n \n while j > 0 and t > k:\n j -= 1\n t -= b[i]\n \n \n if t > k:\n break\n\n ...
['Runtime Error', 'Accepted']
['s912191449', 's321704452']
[40548.0, 47312.0]
[240.0, 287.0]
[582, 449]
p02623
u934788990
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 j 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 - a...
['Runtime Error', 'Accepted']
['s930437280', 's169432220']
[32732.0, 47332.0]
[69.0, 279.0]
[360, 362]
p02623
u940426302
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\ta.append(a[i] + A[i])\nfor i in range(M):\n\tb.append(b[i] + B[i])\n \nans, j = 0, M\nfor i in range(N + 1):\n\tif a[i] > K:\n\t\tbreak\n\twhile b[j] > K - a[i]:\n ...
['Runtime Error', 'Runtime Error', 'Accepted']
['s482652826', 's999835170', 's059428365']
[9048.0, 9060.0, 47540.0]
[24.0, 25.0, 285.0]
[351, 334, 359]
p02623
u944731949
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())\ntimes_a = list(map(int, input().split()))\ntimes_b = list(map(int, input().split()))\nread_time = 0\nread_time_a = [0]\nread_time_b = [0]\nfor i in range(len(times_a)):\n read_time_a.append(read_time_a[i]+times_a[i])\nfor i in range(len(times_b)):\n read_time_b.append(read_t...
['Runtime Error', 'Accepted']
['s664900245', 's170214444']
[47556.0, 47308.0]
[194.0, 1143.0]
[637, 1178]
p02623
u946517952
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: * ...
['alen,blen,k = map(int,input().split())\nalist = list(map(int,input().split()))\nblist = list(map(int,input().split()))\nmax = 0\n\nbcount = blen\nwhile sum(blist[:bcount]) > k:\n bcount -= 1\n\nfor a in range(alen+1):\n acount = alen-a\n asum = sum(alist[:acount])\n while asum + sum(blist[:bcount+1]) > k:...
['Wrong Answer', 'Runtime Error', 'Accepted']
['s167649650', 's183623378', 's013049929']
[40380.0, 42352.0, 47488.0]
[2206.0, 2206.0, 287.0]
[433, 526, 416]
p02623
u952968889
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()))\ncnt=0\n\nif k - min([a[0], b[0]]) < 0:\n print(0)\n exit()\n\nwhile k>0:\n if a[0] < b[0]:\n k -= a.pop(0)\n elif a[0] > b[0]:\n k -= b.pop(0)\n else:\n if a[1] < b[1]:\n k -= a.pop(0)\n ...
['Runtime Error', 'Accepted']
['s244141457', 's107111935']
[40448.0, 45284.0]
[2206.0, 256.0]
[351, 414]
p02623
u953379577
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: * ...
['\nn,m,k = map(int,input().split())\n\na = list(map(int,input().split()))\n\nb = list(map(int,input().split()))\n\nx = [0]\n\ny = [0]\n\nfor i in range(n):\n x.append(x[i]+a[i])\n\nfor i in range(m):\n y.append(y[i]+b[i])\n\nans = 0\n\ncnt = m\n\nfor i in range(n+1):\n \n if x[i]<0:\n break\n \n ...
['Runtime Error', 'Accepted']
['s562633322', 's712956871']
[47692.0, 47676.0]
[325.0, 307.0]
[382, 383]
p02623
u954170646
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\ta.append(a[i]+A[i])\nfor i in range(M):\n\tb.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 - a[j]:\n \tj -= 1\n...
['Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted']
['s221924154', 's336263023', 's648684905', 's918414180', 's492954127']
[47448.0, 8944.0, 9076.0, 8972.0, 47536.0]
[297.0, 23.0, 25.0, 30.0, 285.0]
[331, 668, 680, 681, 346]
p02623
u955125992
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 c(x):\n if sb[x] + S <= k: return True\n else: return False\n\n\nn ,m ,k = map(int, input().split())\na = list(map(int, input().split()))\nb = list(map(int, input().split()))\n\nsa = []\nsb = []\n\nif a[0] <= k:\n sa.append(a[0])\n for i in range(1, n):\n if sa[i-1]+a[i] > k:\n break...
['Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted']
['s077870488', 's583783488', 's585148689', 's657106026', 's722569229']
[41348.0, 42700.0, 9056.0, 42688.0, 47484.0]
[257.0, 242.0, 25.0, 266.0, 287.0]
[834, 833, 385, 841, 382]
p02623
u959340534
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 = [int(i) for i in input().split()]\nB = [int(i) for i in input().split()]\n\nans = 0\nai = 0\nbi = 0\nt = 0\nwhile t < k and (ai < len(A) or bi < len(B)):\n if ai < len(A) and bi < len(B):\n a = A[ai]\n b = B[bi]\n if a < b:\n ai += 1\n t += a\n if t =<...
['Runtime Error', 'Wrong Answer', 'Accepted']
['s069817383', 's797531011', 's142567371']
[9044.0, 40440.0, 47588.0]
[23.0, 2206.0, 293.0]
[557, 418, 343]
p02623
u961595602
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 -*-\nfrom sys import stdin\n\n# import numpy as np\nfrom itertools import accumulate\nfrom bisect import bisect_right\n\n# import sys\n\n\n\ndef _li():\n return list(map(int, stdin.readline().split()))\n\n\ndef _li_():\n return list(map(lambda x: int(x) - 1, stdin.readline().split()))\n\n\nd...
['Runtime Error', 'Accepted']
['s364683935', 's741483441']
[47772.0, 59440.0]
[141.0, 819.0]
[1029, 1138]
p02623
u965377001
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):\na.append(a[i] + A[i])\nfor i in range(M):\nb.append(b[i] + B[i])\n\nans, j = 0, M\nfor i in range(N + 1):\na[i] > K:\nbreak\nwhile b[j] > K - a[i]:\nj -= 1\nans = max(a...
['Runtime Error', 'Runtime Error', 'Accepted']
['s304591527', 's498493520', 's035886710']
[9044.0, 8876.0, 47420.0]
[24.0, 31.0, 300.0]
[323, 332, 336]
p02623
u967822229
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#include<algorithm>\n#include<iomanip>\n#include<utility>\n#include<iomanip>\n#include<map>\n\n#include<cmath>\n#include<cstdio>\n\n#define rep(i,n) for(int i=0; i<(n); ++i)\n#define pai 3.1415926535897932384\n\nusing namespace std;\nusing ll =long long;\nusing P = pair<int,int>;\n\n#define MAX_N 200001\n#define ...
['Runtime Error', 'Runtime Error', 'Accepted']
['s402567188', 's734591572', 's085140607']
[8968.0, 47540.0, 47644.0]
[28.0, 349.0, 1107.0]
[1039, 354, 978]
p02623
u967864815
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\nai = 0\nbi = 0\nans = 0\n\nfor _ in range(n+m):\n if ai < n and bi < m:\n break\n if ai < n:\n a = A[ai]\n else: \n a = 10e10\n if bi < m:\n b = B[bi]\n else:\n ...
['Wrong Answer', 'Accepted']
['s241460966', 's350572593']
[40560.0, 47372.0]
[120.0, 283.0]
[461, 362]
p02623
u968404618
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(map(int, input().split()))\nB = list(map(int, input().split()))\n\nA = [0] + A\nA = list(accumulate(A))\n\nB = [0] + B\nB = list(accumulate(B))\n\nans = 0\nb_cnt = m\nfor a_cnt in range(n+1):\n if a_cnt > k: continue\n\n while A[a...
['Runtime Error', 'Accepted']
['s200504150', 's712372953']
[42396.0, 42336.0]
[251.0, 228.0]
[383, 386]
p02623
u969081133
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()))\nc=0\nd=0\ne=0\nans=0\nwhile c<k:\n if c<n and (a[d]>b[e] or (a[d]==b[e] and a[d+1]>=b[e+1])):\n c+=b[e]\n e+=1\n ans+=1\n elif d<m:\n c+=a[d]\n d+=1\n ans+=1\n else:\n break\nif c==k:\n print(a...
['Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted']
['s196990967', 's320510798', 's514970531', 's646734397', 's036583782']
[40600.0, 9120.0, 9204.0, 40616.0, 47360.0]
[159.0, 27.0, 28.0, 162.0, 306.0]
[323, 246, 246, 324, 388]
p02623
u971124021
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\nfrom collections import deque\na = deque([x for x in a])\nb = deque([x for x in b])\na.append(10**9+1)\nb.append(10**9+1)\nans = 0\ndef cnt(a,b,time):\n global ans\n #print(ans, time,a,b)\n if (time <=...
['Runtime Error', 'Wrong Answer', 'Runtime Error', 'Wrong Answer', 'Runtime Error', 'Runtime Error', 'Wrong Answer', 'Runtime Error', 'Runtime Error', 'Wrong Answer', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted']
['s050752840', 's206216029', 's248640477', 's338418668', 's428429083', 's469428239', 's481211903', 's555629702', 's627224499', 's627867142', 's632505440', 's649489969', 's671229215', 's700877327', 's895683364', 's947730734', 's600481173']
[40480.0, 40472.0, 9080.0, 40604.0, 45624.0, 45688.0, 42384.0, 40504.0, 159864.0, 40512.0, 40512.0, 40616.0, 45820.0, 40564.0, 40484.0, 40632.0, 47440.0]
[129.0, 124.0, 22.0, 123.0, 226.0, 229.0, 121.0, 133.0, 2139.0, 257.0, 126.0, 130.0, 265.0, 134.0, 142.0, 124.0, 549.0]
[385, 523, 586, 523, 369, 306, 227, 524, 510, 364, 423, 524, 306, 524, 530, 524, 322]
p02623
u971811058
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_left, bisect_right, bisect\nn, m, k = map(int, input().split())\na = list(map(int, input().split()))\nb = list(map(int, input().split()))\na = [0]+a\nb = [0]+b+[1e9+10]\nans = 0\nfor i in range(1, len(a)):\n a[i]+=a[i-1]\nfor i in range(1, len(b)):\n b[i]+=b[i-1]\nfor i in range(n+1):\...
['Wrong Answer', 'Accepted']
['s838893830', 's471435546']
[40432.0, 46112.0]
[411.0, 251.0]
[500, 704]
p02623
u972036293
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]\n\nfor i in range(N):\n a.append(a[i] + A[i])\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 - a[i]:\n j -= 1\n ans = max(...
['Runtime Error', 'Runtime Error', 'Accepted']
['s450051372', 's726011953', 's901745186']
[47508.0, 47704.0, 47616.0]
[283.0, 2207.0, 287.0]
[327, 327, 344]
p02623
u972991614
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()))\nif len(A)>len(B):\n A += [0]*(len(A)-len(B))\nelif len(B)>len(A):\n B += [0]*(len(B)-len(A))\nprint(A)\nprint(B)\ntime = 0\ncount = 0\ni = 0\nj = 0\ngoukei = 0\nwhile time <= K:\n if A[i]>=B[j]:\n ...
['Runtime Error', 'Accepted']
['s908139331', 's214067019']
[40432.0, 48700.0]
[214.0, 315.0]
[497, 457]
p02623
u978313283
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())\n2 A = list(map(int, input().split()))\n3 B = list(map(int, input().split()))\n4\n5 a,b=[0],[0]\n 6 for 7\n8 for 9\ni in range(N): a.append(a[i] + A[i]) i in range(M): b.append(b[i] + B[i])\n10\n11 ans,j=0,M\n12 for 13\n14\n15\ni in range(N + 1): ifa[i]>K:\nbreak\nwhile b[j] > K -...
['Runtime Error', 'Accepted']
['s718140024', 's878269614']
[9004.0, 48660.0]
[26.0, 1044.0]
[358, 731]
p02623
u979591106
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\nn,m,k = map(int, stdin.readline().rstrip().split())\na = list(map(int, stdin.readline().rstrip().split()))\nb = list(map(int, stdin.readline().rstrip().split()))\n\nA = [0]\nB = [0]\nans,res = 0,0\nfor i in range(0, n):\n A.append(A[i]+a[i])\nfor i in range(0, m):\n B.append(B[i]+b[i])\n\...
['Runtime Error', 'Accepted']
['s328970689', 's370090702']
[47376.0, 48576.0]
[220.0, 293.0]
[600, 437]
p02623
u981747421
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 getmax(x,y):\n if x>y:\n return x\n else:\n return y\nN,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\nans,j = 0,M\nfor i i...
['Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Wrong Answer', 'Runtime Error', 'Runtime Error', 'Accepted']
['s025949032', 's153972657', 's220931364', 's340408694', 's543192868', 's645303818', 's676446379', 's485695830']
[47676.0, 47316.0, 41796.0, 8996.0, 40516.0, 40388.0, 9204.0, 47444.0]
[286.0, 193.0, 333.0, 27.0, 212.0, 345.0, 26.0, 299.0]
[656, 657, 1218, 701, 678, 1342, 378, 657]
p02623
u981758672
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\nans, j = 0, M\nfor i in range(N + 1):\n if a[i] > K:\n break\nwhile b[j] > K - a[i...
['Runtime Error', 'Wrong Answer', 'Accepted']
['s105212038', 's851059348', 's391677112']
[47372.0, 47684.0, 47528.0]
[263.0, 257.0, 299.0]
[350, 358, 362]
p02623
u981760053
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: * ...
['\nN,M,K = map(int,input().split())\nA = list(map(int,input().split()))\nB = list(map(int,input().split()))\n\nmax=0\n\nA.insert(0, 0)\nA = numpy.cumsum(A)\nB.insert(0,0)\nB = numpy.cumsum(B)\n\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\n ans=max(an...
['Runtime Error', 'Accepted']
['s157631132', 's075243541']
[40644.0, 47680.0]
[111.0, 293.0]
[317, 340]
p02623
u984276646
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())\nINF = int(1e18)\nA = list(map(int, input().split()))\nB = list(map(int, input().split()))\nA = A[:]\nB = B[:]\ni, j = 0, 0\nmcnt = 0\ntmp = M+1\nccnt = 0\nwhile tmp != 0:\n ccnt += 1\n tmp //= 2\nLA = [0 for _ in range(N+1)]\nLB = [0 for _ in range(M+1)]\nfor i in range(N):\n L...
['Wrong Answer', 'Accepted']
['s634240963', 's727463025']
[47592.0, 47316.0]
[1281.0, 1190.0]
[745, 713]
p02623
u992541367
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.reverse()\nB.reverse()\n\nt = 0\ncnt = 0\nc1, c2 = A.pop(), B.pop()\nwhile True:\n \n if t >= K or (t + c1 > K and t + c2 > K):\n break\n\n\n if (t + c1 <= K and t + c2 <= K):\n l1 = [c...
['Runtime Error', 'Accepted']
['s626201485', 's941430043']
[39920.0, 47340.0]
[116.0, 308.0]
[1295, 366]
p02623
u995062424
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 = list(map(int, input().split()))\nB = list(map(int, input().split()))\n\na = [0]\nb = [0]\naa = 0\nbb = 0\nfor i in A:\n aa += i\n a.append(aa)\nfor j in B:\n bb += j\n b.append(bb)\n\nans = 0\ncnt = 0\nlb = len(b)-1\nfor i in range(len(a)):\n cnt = a[i]\n if(cnt > K):\n break\n for j i...
['Runtime Error', 'Accepted']
['s845844927', 's320093691']
[32956.0, 47508.0]
[104.0, 267.0]
[460, 387]
p02623
u995163736
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: * ...
[' \na = [0]\nb = [0]\nfor i in range(n):\n a.append(a[i]+A[i])\nfor j in range(m):\n b.append(b[j]+B[j])\n#print(a,b)\n \nans = 0\nj = m\nfor i in range(n+1):\n if a[i] > k:\n break\n while (k - a[i]) < b[j]:\n j -= 1\n if j == -1:\n break\n \n ans = max(ans, i+j)\n \nprint(ans)', 'n, m, k = ma...
['Runtime Error', 'Accepted']
['s280257187', 's951555473']
[8924.0, 47612.0]
[24.0, 284.0]
[281, 389]
p02623
u995308690
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 math\nimport copy\n\n\n\n# n = int(input())\n\ntarget_1 = [int(x) for x in input().split()]\n\nN = target_1[0]\nM = target_1[1]\nK = target_1[2]\n\ntarget_2 = [int(x) for x in input().split()]\ntarget_2.reverse()\ntarget_3 = [int(x) for x in input().split()]\ntarget_3.reverse()\nresult...
['Wrong Answer', 'Accepted']
['s430414046', 's439491286']
[39924.0, 47548.0]
[2206.0, 297.0]
[710, 365]
p02623
u996506712
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=[map(int,input().split())]\nb=[map(int,input().split())]\n\naa,bb=[0],[0]\nfor i in range(n):\n aa.append(aa[i]+a[i])\nfor i in range(m):\n bb.append(bb[i]+b[i])\nans,j=0,m\nfor i in range(n+1):\n if aa[i]>k:\n break\n while b[j]>k-aa[i]:\n j -= 1\n ans=max(ans,i+j)\nprint...
['Runtime Error', 'Accepted']
['s196983641', 's301070494']
[40460.0, 47600.0]
[65.0, 281.0]
[307, 318]
p02623
u999503965
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\ncount=0\ni,j=0,0\nwhile ans<k:\n if i > n-1:\n num=b[j]\n if j > m-1:\n num=a[i]\n else:\n num=min(a[i],b[j])\n if num==a[i]:\n i+=1\n count+=1\n ans+=num\n else:\n j+=1\n...
['Runtime Error', 'Wrong Answer', 'Runtime Error', 'Wrong Answer', 'Runtime Error', 'Accepted']
['s077193804', 's486594282', 's632478125', 's819152188', 's879612212', 's115906395']
[40680.0, 8928.0, 39812.0, 47444.0, 39956.0, 47508.0]
[2206.0, 31.0, 188.0, 308.0, 250.0, 311.0]
[343, 475, 289, 353, 265, 345]
p02623
u999799597
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(v) for v in input().split()]\nb = [int(v) for v in input().split()]\nans = []\nfor _ in range(n + m):\n if len(a) > 0 and len(b) > 0 and a[0] <= b[0] and a[0] <= k:\n k -= a[0]\n ans.append(a[0])\n a.pop(0)\n elif len(a) > 0 and len(b) > 0 and b...
['Wrong Answer', 'Accepted']
['s414372516', 's450494415']
[40544.0, 47364.0]
[2206.0, 284.0]
[617, 362]
p02624
u000037600
3,000
1,048,576
For a positive integer X, let f(X) be the number of positive divisors of X. Given a positive integer N, find \sum_{K=1}^N K\times f(K).
['print(www)', 'a=int(input())\nans=0\nfor i in range(a):\n x=a//i\n ans+=((a+1)a)/2\nprint(ans)', 'import math\na=int(input())\nb=list(i+1 for i in range(a))\nwww=0\nfor j in b:\n c=[x+1 for x in range(int(math.sqrt(j)//1))]\n for y in c:\n if j%y==0:\n if not j==y*y:\n www=+j*2\n else:\n ...
['Runtime Error', 'Runtime Error', 'Wrong Answer', 'Wrong Answer', 'Accepted']
['s105864483', 's137631050', 's469735135', 's747393352', 's237972900']
[8880.0, 9012.0, 404696.0, 404752.0, 9108.0]
[29.0, 27.0, 3327.0, 3326.0, 2238.0]
[10, 77, 226, 226, 121]
p02624
u007074599
3,000
1,048,576
For a positive integer X, let f(X) be the number of positive divisors of X. Given a positive integer N, find \sum_{K=1}^N K\times f(K).
['n=int(imput())\n\nans=0\nfor i in range(n):\n i=i+1\n a=i\n y=n//i\n\n ans+=(i*y*(y+1)/2)\n\n\n\nprint(ans)', 'n=int(input())\n \nans=0\nfor i in range(n):\n i=i+1\n a=i\n y=n//i\n \n ans+=(i*y*(y+1)/2)\n \n \n \nprint(int(ans))']
['Runtime Error', 'Accepted']
['s496715997', 's816913548']
[9088.0, 9164.0]
[23.0, 2823.0]
[99, 109]
p02624
u021114240
3,000
1,048,576
For a positive integer X, let f(X) be the number of positive divisors of X. Given a positive integer N, find \sum_{K=1}^N K\times f(K).
['import math\nimport time\nfrom collections import defaultdict,deque\nfrom sys import stdin,stdout\nfrom bisect import bisect_left,bisect_right\nn=int(input())\ns=time.time()\nfactors=defaultdict(lambda:[])\nfor i in range(2,3300):\n if(i not in factors):\n for j in range(i,10000001,i):\n factors[...
['Time Limit Exceeded', 'Accepted']
['s314242101', 's761082327']
[735680.0, 9484.0]
[3336.0, 2711.0]
[613, 256]
p02624
u047197186
3,000
1,048,576
For a positive integer X, let f(X) be the number of positive divisors of X. Given a positive integer N, find \sum_{K=1}^N K\times f(K).
['def solve(n):\n ans = 0\n for i in range(1,n+1):\n y = n//i\n print(y)\n ans += (y*(y+1)*i)/2\n return ans\n\ndef main():\n n = int(input())\n print(int(solve(n)))\n\nif __name__ == "__main__":\n main()\n', 'def solve(n):\n ans = 0\n for i in range(1,n+1):\n y = n//...
['Wrong Answer', 'Accepted']
['s885880918', 's767512191']
[21920.0, 9116.0]
[3332.0, 1122.0]
[229, 211]
p02624
u052244548
3,000
1,048,576
For a positive integer X, let f(X) be the number of positive divisors of X. Given a positive integer N, find \sum_{K=1}^N K\times f(K).
['import itertools\nimport functools\nimport math\nfrom collections import Counter\nfrom itertools import combinations\nimport re\n\n\ndef main_chk():\n N = int(input())\n\n ans = 0\n for i in range(1,N+1):\n m = N // i\n ans += ( m + 1 ) * m * i / 2\n\n print(ans)\nmain_chk()\n', 'import iter...
['Wrong Answer', 'Accepted']
['s962554935', 's773553790']
[9884.0, 9884.0]
[1136.0, 1137.0]
[285, 297]
p02624
u054798759
3,000
1,048,576
For a positive integer X, let f(X) be the number of positive divisors of X. Given a positive integer N, find \sum_{K=1}^N K\times f(K).
['n = int(input())\nans = 0\nfor i in range(1,n+1):\n ans += i * (1+n//i) * (n//i) / 2\nprint(ans)', 'primes = [2]\nli = [[],[]]\nf_ans = [0]\ndef f(x):\n if x==1:\n f_ans.append(1)\n return 1\n if x==2:\n f_ans.append(2)\n return 2\n flag = True\n for i in range(len(primes)):\n if x%primes[i]==0:\n...
['Wrong Answer', 'Runtime Error', 'Accepted']
['s360946939', 's416742884', 's943882045']
[9096.0, 9076.0, 9040.0]
[2315.0, 30.0, 2505.0]
[93, 540, 95]
p02624
u065578867
3,000
1,048,576
For a positive integer X, let f(X) be the number of positive divisors of X. Given a positive integer N, find \sum_{K=1}^N K\times f(K).
['N = int(input())\nans = 0\nans += N*(N+1)/2\n\nfor i in range(2, N+1):\n N_case = N // i\n ans += N_case*(N_case + 1)*i//2\n\nprint(ans)\n', 'N = int(input())\nans = 0\nans += N*(N+1)//2\n\nif N >= 2:\n for i in range(2, N+1):\n N_case = N // i\n ans += N_case*(N_case + 1)*i//2\n\nprint(ans)\n'...
['Wrong Answer', 'Accepted']
['s509731086', 's319952290']
[9160.0, 8980.0]
[2327.0, 2447.0]
[135, 159]
p02624
u066494348
3,000
1,048,576
For a positive integer X, let f(X) be the number of positive divisors of X. Given a positive integer N, find \sum_{K=1}^N K\times f(K).
['n=int(input())\nans=0\nfor i in range(1,n+1):\n\tx=math.floor(n/i)\n\tans+=(x*(x+1)*i)/2\nprint(int(ans))', 'import math\nn=int(input())\nans=0\nfor i in range(1,n+1):\n\tx=math.floor(n/i)\n\tans+=(x*(x+1)*i)/2\nprint(int(ans))']
['Runtime Error', 'Accepted']
['s512801805', 's531921854']
[9076.0, 9012.0]
[23.0, 2960.0]
[98, 110]
p02624
u066551652
3,000
1,048,576
For a positive integer X, let f(X) be the number of positive divisors of X. Given a positive integer N, find \sum_{K=1}^N K\times f(K).
['def divisors(n):\n i = 1\n cnt = 0\n while i*i <= n:\n if n % i == 0:\n cnt += 1\n if i * i != n:\n cnt += 1\n i += 1\n return cnt\n\nn = int(input())\nans = 0\nfor i in range(1, n + 1):\n ans += i * divisors(i)', 'def cal(b, e):\n return ((b + (e//...
['Wrong Answer', 'Accepted']
['s445728800', 's212106696']
[9040.0, 9164.0]
[3308.0, 2736.0]
[263, 140]
p02624
u072284094
3,000
1,048,576
For a positive integer X, let f(X) be the number of positive divisors of X. Given a positive integer N, find \sum_{K=1}^N K\times f(K).
['n = int(input())\n\nresult = 0\nfor i in range(1,(n // 2 + 1)):\n terms = n // i\n result += terms * (terms * i + i) // 2\n\nterms = n - n // 2\nresult += terms * (n // 2 + n) // 2\n\nprint(result)', 'n = int(input())\n\nresult = 0\nfor i in range(1,(n // 2 + 1)):\n terms = n // i\n result += terms * (ter...
['Wrong Answer', 'Accepted']
['s751182611', 's357485291']
[9176.0, 9172.0]
[1345.0, 1304.0]
[193, 197]
p02624
u072409340
3,000
1,048,576
For a positive integer X, let f(X) be the number of positive divisors of X. Given a positive integer N, find \sum_{K=1}^N K\times f(K).
['N = int(input())\na=0\nfor i in range(1,n+1):\n x,y=i,(n//i)*i\n a+=((n//i)*(x+y)//2)\nprint(a)', 'n=int(input())\nans=0\nfor i in range(1,n+1):\n x,y=i,(n//i)*i\n ans+=((n//i)*(x+y)//2)\nprint(ans)']
['Runtime Error', 'Accepted']
['s652448778', 's093445738']
[9148.0, 9112.0]
[27.0, 2985.0]
[92, 100]
p02624
u077291787
3,000
1,048,576
For a positive integer X, let f(X) be the number of positive divisors of X. Given a positive integer N, find \sum_{K=1}^N K\times f(K).
['# D - Sum of Divisors\nfrom numba import njit\n\n\n@njit\ndef main():\n N = int(input())\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 print(res)\n\n\nif __name__ == "__main__":\n main()\n', '# D - Sum of Divisors\nfrom numba import njit\n\n\n...
['Runtime Error', 'Accepted']
['s317956629', 's417059936']
[106600.0, 108948.0]
[467.0, 672.0]
[247, 283]
p02624
u091307273
3,000
1,048,576
For a positive integer X, let f(X) be the number of positive divisors of X. Given a positive integer N, find \sum_{K=1}^N K\times f(K).
['def main():\n N = int(input())\n tot = 0\n for d in range(1, N+1):\n nd = N//d\n tot += (d * (nd + 1) * nd) // 2\n\n print(tot)\n\n', 'N = int(input())\ntot = 0\nfor d in range(1, N+1):\n nd = N//d\n tot += (d * (nd + 1) * nd) // 2\n\nprint(tot)\n\n\n']
['Wrong Answer', 'Accepted']
['s420899635', 's717582249']
[9048.0, 8972.0]
[27.0, 2451.0]
[148, 113]
p02624
u102461423
3,000
1,048,576
For a positive integer X, let f(X) be the number of positive divisors of X. Given a positive integer N, find \sum_{K=1}^N K\times f(K).
['import sys\nimport numba\n\nread = sys.stdin.buffer.read\nreadline = sys.stdin.buffer.readline\nreadlines = sys.stdin.buffer.readlines\n\n@numba.njit\ndef main(N):\n x = 0\n for a in range(1, N+1):\n for b in range(1, N//a+1):\n x += a*b\n return x\n\nfrom my_module import main\n\nN = int(r...
['Runtime Error', 'Time Limit Exceeded', 'Accepted']
['s272069674', 's888950289', 's819915157']
[91780.0, 183004.0, 106264.0]
[370.0, 3312.0, 531.0]
[323, 630, 316]
p02624
u116038906
3,000
1,048,576
For a positive integer X, let f(X) be the number of positive divisors of X. Given a positive integer N, find \sum_{K=1}^N K\times f(K).
['\ndef make_divisors(n): をリストで返す\n divisors = []\n for i in range(1, int(n**0.5)+1):\n if n % i == 0:\n divisors.append(i)\n if i != n // i:\n divisors.append(n//i)\n\n \n return divisors\n\n\nimport sys\ninput = sys.stdin.readline\nN = int(input())\n\n#DP\nf_dp ...
['Wrong Answer', 'Accepted']
['s066759290', 's183572735']
[87936.0, 9092.0]
[3311.0, 2956.0]
[685, 289]
p02624
u125348436
3,000
1,048,576
For a positive integer X, let f(X) be the number of positive divisors of X. Given a positive integer N, find \sum_{K=1}^N K\times f(K).
['n=int(input())\ndef make_divisors(n):\n lower_divisors = []\n upper_divisors = []\n for i in range(1, int(n**0.5)+1):\n if n % i == 0:\n lower_divisors.append(i)\n if i != n // i:\n upper_divisors.append(n//i)\n\n upper_divisors.reverse()\n return n+len(lower...
['Wrong Answer', 'Runtime Error', 'Accepted']
['s388944860', 's392924570', 's235005312']
[9448.0, 9036.0, 9168.0]
[3308.0, 24.0, 2258.0]
[403, 79, 83]
p02624
u136843617
3,000
1,048,576
For a positive integer X, let f(X) be the number of positive divisors of X. Given a positive integer N, find \sum_{K=1}^N K\times f(K).
['import numpy as np\nfrom numba import njit\n\n\n@njit(\'(i8)\', cache=True)\ndef solve(x):\n count = np.zeros(x + 1, dtype=np.int64)\n for i in range(1, x + 1):\n for j in range(i, x + 1, i):\n count[j] += j\n return count.sum()\n\n\nif __name__ == "__main__":\n x = int(input())\n pri...
['Runtime Error', 'Runtime Error', 'Accepted']
['s668236660', 's756325374', 's115383802']
[91852.0, 8908.0, 184396.0]
[368.0, 31.0, 1725.0]
[315, 330, 317]
p02624
u167908302
3,000
1,048,576
For a positive integer X, let f(X) be the number of positive divisors of X. Given a positive integer N, find \sum_{K=1}^N K\times f(K).
['# coding:utf-8\nimport sympy\nn = int(input())\n\nans = 0\nfor i in range(1, n + 1):\n ans += i * sympy.divisors(i)\nprint(ans)\n', '# coding:utf-8\nn = int(input())\nans = 0\n\nfor i in range(1, n + 1):\n tmp = n // i\n ans += i * tmp * (tmp + 1) // 2\nprint(ans)\n']
['Runtime Error', 'Accepted']
['s327646740', 's950683954']
[8796.0, 9056.0]
[27.0, 2495.0]
[124, 131]
p02624
u168030064
3,000
1,048,576
For a positive integer X, let f(X) be the number of positive divisors of X. Given a positive integer N, find \sum_{K=1}^N K\times f(K).
['n = int(input())\n\nans = 0\nfor x in range(1, n + 1):\n ans += (x + n//x * x) * (n // x) / 2\n \nprint(ans)', 'n = int(input())\n\nans = 0\nfor x in range(1, n + 1):\n ans += (x + n//x * x) * (n // x) / 2\n \nprint(int(ans))']
['Wrong Answer', 'Accepted']
['s984628058', 's715215677']
[9088.0, 9024.0]
[2285.0, 2577.0]
[108, 113]
p02624
u180172332
3,000
1,048,576
For a positive integer X, let f(X) be the number of positive divisors of X. Given a positive integer N, find \sum_{K=1}^N K\times f(K).
['import numpy as np\ndef divisor_num(n):\n if n == 1:\n return 1\n arr = []\n temp = n\n for i in range(2,int(np.sqrt(n))+1):\n if temp%i==0:\n cnt=0\n while temp%i==0:\n cnt+=1\n temp //= i\n arr.append(cnt)\n \n if temp!=1...
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s294157739', 's658726067', 's925139273']
[26984.0, 26944.0, 9020.0]
[3309.0, 3309.0, 2536.0]
[526, 525, 103]
p02624
u192165179
3,000
1,048,576
For a positive integer X, let f(X) be the number of positive divisors of X. Given a positive integer N, find \sum_{K=1}^N K\times f(K).
['N = int(input())\n\nt = 0\n\nfor i in range (1,N+1):\n p = N//i\n t += i*p*(1+p)/2\n \n\nprint(t)', 'N = int(input())\n\nt = 0\n\nfor i in range (1,N+1):\n p = N//i\n t += i*p*(1+p)/2\n \n\nprint(int(t))']
['Wrong Answer', 'Accepted']
['s111459483', 's474795065']
[9012.0, 9092.0]
[2208.0, 2145.0]
[91, 96]
p02624
u201544433
3,000
1,048,576
For a positive integer X, let f(X) be the number of positive divisors of X. Given a positive integer N, find \sum_{K=1}^N K\times f(K).
['n = int(input().strip())\na = 0\nfor i in range(1, n+1):\n a += i*((n//i)*(n//i+1)//2)\n print(a)', 'n = int(input())\na = n * (n+1) // 2\nfor i in range(2, n+1):\n c = n // i\n a += i * (c * (c+1) // 2)\nprint(a)']
['Runtime Error', 'Accepted']
['s569127534', 's121418956']
[9024.0, 9156.0]
[29.0, 2611.0]
[94, 109]