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
u310709512
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\ntotalA = [0]\ntotalB = [0]\nsumA = 0\nfor i in range(N):\n sumA += A[0]\n totalA.append(sumA)\nsumB = 0\nfor i in range(M):\n sumB += B[0]\n totalB.append(sumB)\n\niA = N\niB = 0\ncountMax = 0\...
['Runtime Error', 'Accepted']
['s352302446', 's547748760']
[8860.0, 47456.0]
[25.0, 282.0]
[567, 457]
p02623
u311379832
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()))\narui = [0] * (N + 1)\nbrui = [0] * (M + 1)\nfor i in range(N):\n arui.append(a[i] + arui[i])\nfor i in range(M):\n brui.append(b[i] + brui[i])\n\nans = 0\nfor i in range(N + 1):\n if arui[i] > K:\n ...
['Wrong Answer', 'Accepted']
['s401607950', 's937476151']
[48776.0, 47544.0]
[281.0, 300.0]
[425, 425]
p02623
u312078744
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 numpy as np \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\nacc = list(itertools.accumulate(a))\nbcc = list(itertools.accumulate(b))\n\nacc = np.array(acc)\n#print(acc)\nbcc = np.array(bcc)\n\nans = 0\n...
['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted']
['s353669769', 's525862088', 's751243880', 's673337853']
[66984.0, 66732.0, 65396.0, 65448.0]
[2207.0, 2207.0, 2207.0, 323.0]
[533, 456, 693, 730]
p02623
u312158169
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(x) for x in input().split()]\nb = [int(x) for x in input().split()]\n\nif k < a[0] and k < b[0]:\n print(0)\n exit()\n\nif sum(a) + sum(b) <= k:\n print(n+m)\n exit()\n\na_temp = a[0]\nb_temp = b[0]\ntemp = 0\ncount = 0\nhour = 0\ni = 0\nj = 0\n\nwhile k > hour...
['Runtime Error', 'Accepted']
['s562826980', 's924067925']
[42224.0, 47356.0]
[256.0, 314.0]
[628, 368]
p02623
u315600877
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())\ncostA=list(map(int,input().split()))\ncostB=list(map(int,input().split()))\ncostA=[0]+costA\ncostB=[0]+costB\n\nfor i in range(N):\n costA[i+1]+=costA[i]\n \nfor i in range(M):\n costB[i+1]+=costB[i]\n\nprint(costA)\nprint(costB)\n\ncostB.append(float("inf"))\n\ndef ...
['Runtime Error', 'Wrong Answer', 'Runtime Error', 'Wrong Answer', 'Accepted']
['s052467878', 's354411764', 's542146545', 's741544635', 's361321379']
[164156.0, 40112.0, 160244.0, 40200.0, 40156.0]
[2091.0, 1138.0, 2361.0, 1128.0, 659.0]
[813, 2037, 886, 1982, 2004]
p02623
u317779196
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: * ...
["'''ABC172 C'''\nimport numpy as np\nn,m,k = map(int,input().split())\na = np.array([int(i) for i in input().split()], dtype='int64')\nb = np.array([int(i) for i in input().split()], dtype='int64')\n\na_c = np.zeros(n+1,dtype='int64')\na_c[1:] = np.cumsum(a)\n\nb_c = np.zeros(m+1,dtype='int64')\nb_c[1:] = np.cumsum(b)...
['Wrong Answer', 'Accepted']
['s474547178', 's690126984']
[53440.0, 53460.0]
[783.0, 237.0]
[475, 499]
p02623
u319589470
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 python3\nimport sys\nsys.setrecursionlimit(10**7)\nimport bisect\nimport heapq\nimport itertools\nimport math\nfrom collections import Counter, defaultdict, deque\nfrom copy import deepcopy\nfrom decimal import Decimal\nfrom math import gcd\nfrom operator import add, itemgetter, mul, xor\ndef cmb(n,r,m...
['Runtime Error', 'Accepted']
['s068268642', 's654150904']
[8892.0, 48428.0]
[27.0, 361.0]
[1627, 1573]
p02623
u323045245
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]*(n+1)\nB=[0]*(m+1)\nc = 0\n\nfor i in range(n):\n A[i+1] = A[i] + a[i]\nfor i in range(m):\n B[i+1] = B[i] + b[i]\n#\nfor i in range(n+1):\n if A[i]>k:\n bookA=i-1\n timeA = A[i-1]\n ...
['Wrong Answer', 'Accepted']
['s067002085', 's057624721']
[47552.0, 47328.0]
[247.0, 295.0]
[1966, 570]
p02623
u324090406
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()))\nai = -1\nbi = -1\nanswer = 0\nt_sum = 0\nif sum(a) + sum(b) <= k:\n print(n + m)\nelif sum(a) <= k:\n t_sum = sum(a)\n ai = n-1\n while True:\n bi += 1\n if t_sum + b[bi] > k:...
['Runtime Error', 'Accepted']
['s264858768', 's454605852']
[40700.0, 41736.0]
[297.0, 330.0]
[1200, 1380]
p02623
u325660636
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_l = list(map(int, input().split()))\nb_l = list(map(int, input().split()))\n\ni_l, j_l = [0], [0]\n\nbest0 = M\nans = 0\n\nfor i in range(N):\n i_l.append(i_l[i] + a_l[i])\n\nfor i in range(M):\n j_l.append(j_l[i] + b_l[i])\n\n# for j in range(M):\n\n# if total > K:\n\...
['Runtime Error', 'Accepted']
['s356010868', 's842355749']
[47480.0, 47600.0]
[281.0, 284.0]
[584, 584]
p02623
u328755070
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\ntime = 0\ncount = -1\nsaidaicho = len(A) + len(B)\nwhile time <= K:\n time += max(A[0], B[0])\n count += 1\n\n if A[0] > B[0]:\n A.pop(0)\n else:\n B.pop(0)\n\n if len(A)...
['Wrong Answer', 'Runtime Error', 'Accepted']
['s417361044', 's994845875', 's116065680']
[40548.0, 47492.0, 47408.0]
[2206.0, 304.0, 299.0]
[426, 526, 396]
p02623
u331105860
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()]\n\ntotal = 0\nmaxb = 0\nfor i in range(N):\n if total + A[i] <= K:\n total += A[i]\n maxb += 1\n else:\n break\n\ni = maxb - 1\nfor j in range(M):\n\n if total + B[j] <= K:\n...
['Wrong Answer', 'Accepted']
['s843556736', 's389901503']
[42476.0, 40684.0]
[234.0, 238.0]
[486, 371]
p02623
u343490140
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]\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])\nans = 0\nj = m\nfor i in range(n + 1):\n if a[0] > k:\n break\n while b[j] > k - a...
['Runtime Error', 'Accepted']
['s808740023', 's977388778']
[47428.0, 47560.0]
[311.0, 290.0]
[361, 361]
p02623
u345621867
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()))\nAsum = [0]\nBsum = [0]\na = 0\nb = 0\nfor i in range(N):\n a += A[i]\n Asum.append(a)\nfor i in range(M):\n b += B[i]\n Bsum.append(b)\nAsum.append(0)\nBsum.append(0)\nres, j = 0, 0\nfor i in range(...
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s015909569', 's794357984', 's259528070']
[47464.0, 41140.0, 47444.0]
[260.0, 2207.0, 288.0]
[427, 449, 423]
p02623
u346395915
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_li = list(map(int, input().split()))\nb_li = list(map(int, input().split()))\n\na_li = [0] + a_li\nb_li = [0] + b_li\n\ntime = 0\nans = 0\na = 0\ntemp = 0\n\na_wa = [0] * (n+10)\nb_wa = [0] * (m+10)\n\ns = 0\nfor i in range(n+1):\n s += a_li[i]\n a_wa[i] = s\n\ns = 0\nfor i ...
['Wrong Answer', 'Accepted']
['s380632982', 's728737354']
[48316.0, 47100.0]
[428.0, 530.0]
[578, 587]
p02623
u347640436
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(map(int, input().split()))\nB = list(map(int, input().split()))\n\na = [0] + list(accumulate(A))\nb = [0] + list(accumulate(B))\n\nresult = 0\nfor i in range(N):\n t = K - a[i]\n if t < 0:\n ...
['Runtime Error', 'Accepted']
['s182324519', 's578015460']
[50504.0, 50584.0]
[288.0, 266.0]
[454, 411]
p02623
u349384236
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 A = list(map(int, input().split()))\n B = list(map(int, input().split()))\n a, b = [0], [0]\n for i in range(N):\n a.append(a[i] + A[i])\n for i in range(M):\n b.append(b[i] + B[i])\n\n ans, j = 0, M\nfor i in range(N + 1):\n if a[i] > K:\n break\n while b[j] > K - ...
['Runtime Error', 'Accepted']
['s985267820', 's167534419']
[8848.0, 47336.0]
[25.0, 359.0]
[352, 440]
p02623
u350247040
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\nwhile cnt==n+m:\n if len(B)==0:\n k-=A[0]\n del A[0]\n cnt+=1\n elif len(A)==0:\n k-=B[0]\n del B[0]\n cnt+=1\n elif A[0]<=B[0] and k>A[0]:\n k-=A[0]\n del A[0]\n cnt+=1\n elif B[0...
['Wrong Answer', 'Accepted']
['s773245202', 's074162675']
[39768.0, 40696.0]
[109.0, 273.0]
[384, 363]
p02623
u352676541
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#A = list(map(int,input().split()))\n#B = list(map(int,input().split()))\n\nN,M,K =map(int,"5 7 100".split())\nA = [10,10,20,30,3]\nB = [3,9,30,20,1,7,20]\n\n\nA_min = [0]\nfor i in range(N):\n A_min.append(A_min[i]+A[i])\nB_min = [0]\nfor i in range(M):\n B_min.append(B_min[i]+B[...
['Wrong Answer', 'Runtime Error', 'Runtime Error', 'Wrong Answer', 'Accepted']
['s009872893', 's372798342', 's776861787', 's815132959', 's138481657']
[9216.0, 47372.0, 47368.0, 51952.0, 47500.0]
[30.0, 191.0, 184.0, 747.0, 281.0]
[618, 559, 558, 663, 537]
p02623
u353099601
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())\nA = deque(list(map(int, input().split())))\nB = deque(list(map(int, input().split())))\n\nif sum(A) + sum(B) < K:\n print(N + M)\n exit()\n\nans = 0\n\nwhile K > 0:\n if len(A) != 0:\n # if len(B) == 0 or A[0] <= B[0]:\n if l...
['Time Limit Exceeded', 'Accepted']
['s090652836', 's491631577']
[42648.0, 48824.0]
[2206.0, 278.0]
[671, 775]
p02623
u357120030
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 functools import lru_cache\n\nri = lambda S: [int(v) for v in S.split()]\n\n\ndef rii():\n return ri(input())\n\n\nN, M, K = rii()\nA = rii()\nB = rii()\n\ni = j = 0\n\n\n@lru_cache(None)\ndef dp(i, j, k):\n ki = kj = mki = mkj = 0\n\n if i < N:\n Ki = k - A[i] if A[i] <= k else 0\n mki = ...
['Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted']
['s152082375', 's207488474', 's694686679', 's302435288']
[43332.0, 42748.0, 42892.0, 50764.0]
[124.0, 125.0, 125.0, 328.0]
[515, 441, 460, 530]
p02623
u357751375
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()))\np = 0\nz = 0\ni = 0\nj = 0\n\nwhile p < k:\n if a[i] < b[j]:\n p += a[i]\n z += 1\n i += 1\n elif a[i] > b[j]:\n p += b[j]\n z += 1\n j += 1\n else:\n i...
['Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted']
['s166204442', 's466171406', 's726417325', 's952820078']
[9068.0, 40464.0, 42288.0, 47344.0]
[29.0, 349.0, 212.0, 309.0]
[487, 570, 400, 478]
p02623
u358859892
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()))\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]\n\nI = bisect.bisect_right(a, k)\nans = bisect.bisect_right(b, k)\nli = list(range(I))\nli = li[::-1]\nfo...
['Runtime Error', 'Accepted']
['s492929197', 's049868800']
[9052.0, 47616.0]
[27.0, 344.0]
[440, 419]
p02623
u359358631
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(M):\n a.append(b[i] + B[i])\n\n ans, j = 0, M\n for i in range(N + 1):\n...
['Runtime Error', 'Accepted']
['s656972231', 's666798604']
[40596.0, 47452.0]
[140.0, 216.0]
[482, 482]
p02623
u363074342
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_l = list(map(int,input().split()))\nb_l = list(map(int,input().split()))\nread_a = [0]*n\nread_b = [0]*M\ntime = 0\nans = 0\nmemo = 0\nfor j in range(n):\n if time + a_l[j] <= k:\n time += a_l[j]\n read_a[j] = 1\n memo = j\n ans = j+1\n else:\n ...
['Runtime Error', 'Wrong Answer', 'Runtime Error', 'Accepted']
['s131271905', 's342952216', 's393769352', 's485462455']
[9124.0, 408808.0, 9124.0, 405596.0]
[28.0, 630.0, 31.0, 614.0]
[874, 873, 874, 878]
p02623
u363599046
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\np, q = [0], [0]\nfor i in range(n):\n\tp.append(p[i] + a[i])\nfor i in range(m):\n\tq.append(q[i] + b[i])\n\nj, ans = m, 0\nfor i in range(N+1):\n\tif a[i] > k:\n\t\tbreak\n\n\twhile b[j] > k - a[i]:\n\t\t...
['Runtime Error', 'Accepted']
['s965204331', 's402497931']
[47496.0, 47416.0]
[191.0, 291.0]
[334, 334]
p02623
u364027015
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\nimport numpy as np\nA=np.array(A).cumsum()\nB=np.array(B).cumsum()\nfor i in range(N):\n d=K-A[i]\n if d>=0:\n for j in reversed(range(M)):\n if d>=B[j]:\n if c<i+j+2:\n c=i+j+2\n ...
['Runtime Error', 'Accepted']
['s908758063', 's426603356']
[45900.0, 45860.0]
[542.0, 552.0]
[477, 338]
p02623
u364386647
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 resolve():\n N, M, K = list(map(int, input().split()))\n A = list(map(int, input().split()))\n B = list(map(int, input().split()))\n\n read = deque()\n\n while sum(read) <= K:\n if len(A) == 0 and len(B) == 0:\n break\n\n if len(A) == 0:\n if sum(read) + B[0] <= ...
['Runtime Error', 'Accepted']
['s977441030', 's500005896']
[40096.0, 40404.0]
[111.0, 185.0]
[783, 508]
p02623
u364555831
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\nsum_A = [0] * (N + 1)\nsum_B = [0] * (M + 1)\n\nfor a in range(1, N + 1):\n sum_A[a] = sum_A[a - 1] + A[a - 1]\nfor b in range(1, M + 1):\n sum_B[b] = sum_B[b - 1] + B[b - 1]\n\ncount = 0\n\nprint(su...
['Wrong Answer', 'Accepted']
['s286296166', 's375606528']
[74760.0, 47488.0]
[1106.0, 329.0]
[1047, 1120]
p02623
u365077014
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 INF 2000000000\n#define MOD 1000000007\n#define EPS (1e-10)\n\nusing namespace std;\n\nint main(int argc, char *argv[]) {\n\n\tlong N,M; cin >> N >> M;\n\tlong K; cin >> K;\n\t\n\tvector<long> A(N+1,0);\n\tfor (int i = 1; i <= N; i++) {\n\t\tint a; cin >> a;\n\t\tA[i] = A[i-1] + a;\n\...
['Runtime Error', 'Accepted']
['s976899559', 's984852369']
[8876.0, 47364.0]
[24.0, 279.0]
[624, 341]
p02623
u366996583
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())\nimport numpy as np\na=np.array(list(map(int,input().split())))\nb=np.array(list(map(int,input().split())))\na_s=a.cumsum()\nb_s=b.cumsum()\nan=0\nans=0\nwhile an<N and a_s[an]<=K:\n bn=0\n while bn<M and a_s[an]+b_s[bn]<=K:\n bn+=1\n if an+bn+1>ans:\n ans=an+bn+1\n an+=1\np...
['Runtime Error', 'Accepted']
['s782453138', 's518968680']
[8940.0, 40748.0]
[24.0, 328.0]
[312, 378]
p02623
u370576244
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\nr0=0\nrr = 0\nt0=0\ni = 0\nj = 0\nflag = 0\n\nwhile t0<=K:\n t0 = t0 + A[i]\n if t0<=K:\n r0 = r0 + 1\n print(t0,r0)\n if i==N-1:\n break\n i = i + 1\n\nif t0>K:\n t0...
['Wrong Answer', 'Accepted']
['s503112356', 's581329476']
[41076.0, 47436.0]
[588.0, 288.0]
[897, 336]
p02623
u370721525
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\ndef doku(li, K, time):\n cnt = 0\n tmp = 0\n for i in range(len(li)):\n if time+li[i] <= K:\n tmp += li[i]\n cnt += 1\n else:\n return cnt\n return cnt\n\nans = 0\ntime = 0\nwhile ...
['Runtime Error', 'Accepted']
['s602102478', 's562343345']
[158524.0, 47456.0]
[2369.0, 300.0]
[620, 344]
p02623
u374935093
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()))\nans = 0\nA_array = np.array(A)\nB_array = np.array(B)\nA_cum = np.cumsum(A_array)\nB_cum = np.cumsum(B_array)\nfor i in range(len(A_cum)):\n k = A_cum[i]\n if k >K:\n break\n a...
['Runtime Error', 'Accepted']
['s414669920', 's653909832']
[58420.0, 49068.0]
[223.0, 301.0]
[661, 540]
p02623
u377834804
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\nmmax = 0\npre = False\nnum = 0\nans = 0\nans2 = 0\nfor i in range(N+1):\n if i == 0:\n ans = 0\n else:\n ans += A[i-1]\n if ans > K:\n break\n for j in range(M+1):\n if j == 0:\n ans2 ...
['Wrong Answer', 'Runtime Error', 'Wrong Answer', 'Runtime Error', 'Accepted']
['s040076614', 's043819332', 's578979115', 's596897794', 's001635819']
[60448.0, 40516.0, 39900.0, 40440.0, 47320.0]
[2567.0, 114.0, 252.0, 190.0, 284.0]
[444, 339, 591, 316, 337]
p02623
u380408685
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\nimport sys\n\nl = stdin.readline().rstrip().split(\' \')\na = stdin.readline().rstrip().split(\' \')\nb = stdin.readline().rstrip().split(\' \')\nk = int(l[2])\nn = int(l[0])\nm = int(l[1])\nia = 0\nib = 0\nb_sum = 0\ncount = 0\na_sum = 0\nres = []\n\nfor ib in range(m):\n b_sum += int(b[ib]...
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s596274643', 's736984543', 's070940948']
[42060.0, 46840.0, 47268.0]
[2206.0, 2207.0, 297.0]
[733, 765, 482]
p02623
u382639013
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\nans = 0\n\nif ab_min > K:\n ans = 0\nelse:\n while True:\n K = K - min(A[0],B[0])\n if K < 0:\n break\n ans += 1\n if min(A[0],B[0])==A[0]:\n A...
['Runtime Error', 'Accepted']
['s564347165', 's564723510']
[40548.0, 47508.0]
[113.0, 298.0]
[472, 357]
p02623
u385677760
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):\na.append(a[i] + A[i])\nfor i in range(M):\nb.append(b[i] + B[i])\nans, j = 0, M\nfor i in range(N + 1):\nif a[i] > K:\nbreak\nwhile b[j] > K - a[i]:\nj -= 1\nans = max(an...
['Runtime Error', 'Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Runtime Error', 'Accepted']
['s084458505', 's139056827', 's232927579', 's576569074', 's604299024', 's879053928']
[9004.0, 40056.0, 42212.0, 41912.0, 9164.0, 47600.0]
[26.0, 2206.0, 286.0, 286.0, 24.0, 279.0]
[324, 794, 632, 634, 312, 360]
p02623
u388497015
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 = list(map(int, input().split()))\na = list(map(int, input().split()))\nb = list(map(int, input().split()))\na_acc = [0]\nb_acc = [0]\nnow = 0\nfor i in range(n):\n now += a[i]\n a_acc.append(now)\n\nnow = 0\nfor i in range(m):\n now += b[i]\n b_acc.append(now)\n\nans = 0\nfor i in range(n+...
['Wrong Answer', 'Accepted']
['s563245710', 's325479859']
[47368.0, 47396.0]
[310.0, 398.0]
[419, 533]
p02623
u388971072
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\nAin = 0\nBin = 0\nlenA = len(A)\nlenB = len(B)\nif(min(min(A),min(B))>K):\n print(0)\n exit()\nwhile time<=K:\n if((lenA!=Ain) and (lenB!=Bin)):\n if(A[Ain]<B[Bin]):\n ...
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s767777577', 's960878285', 's374799861']
[40448.0, 40584.0, 49128.0]
[2206.0, 243.0, 277.0]
[725, 603, 396]
p02623
u391589398
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 = tuple(map(int, input().split()))\nB = tuple(map(int, input().split()))\nimport numpy as np\nfrom itertools import accumulate\nAS = np.array([0] + list(accumulate(A)))\nBS = np.array([0] + list(accumulate(B)))\n\nans = 0\nfor i in range(n+1):\n if AS[i] > k:\n break\n...
['Wrong Answer', 'Accepted']
['s310565898', 's355311193']
[56820.0, 50684.0]
[986.0, 283.0]
[436, 414]
p02623
u392441504
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())) for _ in range(N)]\n\nB = [list(map(int, input().split())) for _ in range(M)]\n\nsum=0\ncount = 0\nfor i in range(N+M):\n if A[0] >= B[0]:\n temp = B.pop(0)\n if sum+temp > K:\n break\n print(count)\n ...
['Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted']
['s146569395', 's290617951', 's386493924', 's591750438']
[40700.0, 40556.0, 40536.0, 47360.0]
[105.0, 2206.0, 107.0, 298.0]
[551, 521, 551, 389]
p02623
u394731058
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\nwhile k > 0:\n i, j = 0\n if a[i] <= b[j]:\n k -= a[i]\n if k >= 0\n i += 1\n ans += 1\n else:\n k -= b[j]\n if k >= 0\n j += 1\n ans += 1\nprint(ans)', 'n ,m, k =...
['Runtime Error', 'Runtime Error', 'Wrong Answer', 'Accepted']
['s245628729', 's480091243', 's979805771', 's834444322']
[9032.0, 8952.0, 47492.0, 47552.0]
[24.0, 25.0, 282.0, 288.0]
[289, 629, 369, 369]
p02623
u395894569
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())\na = [int(_) for _ in input().split()]\nb = [int(_) for _ in input().split()]\n\nx = deque(a)\ny = deque(b)\n\nans=0\nfor i in range(n + m):\n print(x, y)\n try:\n temp = x.popleft() if x[0] < y[0] else y.popleft()\n except:\n i...
['Runtime Error', 'Accepted']
['s714026732', 's686189652']
[162748.0, 40660.0]
[2384.0, 249.0]
[514, 304]
p02623
u396210538
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\nimport sys\nimport math\nimport random\nfrom decimal import Decimal\n\n\nN, M, K = [int(x) for x in stdin.readline().rstrip().split()]\nA = list(map(int, input().split()))\nA1 = [0]\nfor i, v in enumerate(A):\n x = A1[i]+v\n A1.append(x)\nB = list(map(int, input().split()))\nB1 = [0]\nfor...
['Wrong Answer', 'Accepted']
['s118280687', 's103320962']
[57068.0, 51832.0]
[2214.0, 304.0]
[621, 690]
p02623
u396211450
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]\nb=[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])\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\t\tj -= 1\n\tans = ma...
['Runtime Error', 'Accepted']
['s739137565', 's366792583']
[40700.0, 47364.0]
[112.0, 281.0]
[319, 319]
p02623
u398383435
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 = input().split()\n\nN = int(N)\nM = int(M)\nK = int(K)\n\nA = list(input().split())\nA = [int(c) for c in A]\n\nSum_A = [0]\nele_A = 0\na = 0\n\nwhile Sum_A[-1] + A[a] <= K:\n ele_A += A[a]\n a += 1\n Sum_A.append(ele_A)\n if a == len(A):\n break\n\nB = list(input().split())\nB = [int(c) for...
['Wrong Answer', 'Accepted']
['s325214086', 's151032396']
[47764.0, 48528.0]
[422.0, 454.0]
[711, 674]
p02623
u399155892
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\nfrom collections import deque\n\ndef main():\n n, m, k = map(int, input().split())\n a_lst = list(map(int, input().split()))\n b_lst = list(map(int, input().split()))\n if n < m:\n a_lst, b_lst = b_lst, a_lst\n n, m = m, n\n\n a_time = [0]\n b_time = []\n\n t ...
['Wrong Answer', 'Accepted']
['s244436795', 's366645174']
[44176.0, 42184.0]
[178.0, 220.0]
[944, 718]
p02623
u401810884
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(2147483647)\n\nN, M, K=map(int,input().split())\nA=list(map(int,input().split()))\nB=list(map(int,input().split()))\nAsum = []\nBsum = []\ncount = 0\nfor p in A:\n count += p\n Asum.append(count)\ncount = 0\nfor p in B:\n count += p\n Bsum.append(count)\nbest = 0\nBlast =...
['Runtime Error', 'Wrong Answer', 'Wrong Answer', 'Accepted']
['s120867920', 's144162738', 's363190917', 's033854230']
[47144.0, 47384.0, 47504.0, 47180.0]
[196.0, 352.0, 341.0, 334.0]
[580, 584, 576, 570]
p02623
u405276711
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,nb,k = map(int, input().split())\nta = map(int, input().split())\ntb = map(int, input().split())\n\ndef get_bcnt( usek,tb=tb ):\n t = 0\n cnt = 0\n try:\n while True:\n if t + tb[cnt] > usek:\n return cnt\n else:\n t += tb[cnt]\n cn...
['Runtime Error', 'Wrong Answer', 'Runtime Error', 'Runtime Error', 'Accepted']
['s033426176', 's223608923', 's285402887', 's600318327', 's329926238']
[40776.0, 40528.0, 40584.0, 8884.0, 47388.0]
[75.0, 2207.0, 80.0, 25.0, 302.0]
[557, 478, 572, 496, 394]
p02623
u405660020
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_acc=list(accumulate(a))\nb_acc=list(accumulate(b))\n\ncnt=0\n\nimport bisect\nfor i in range(n):\n nokori=k-a_acc[i]\n if nokori<b[0]:\n break\n b_i=bisect.bisec...
['Wrong Answer', 'Accepted']
['s054370223', 's097303214']
[47480.0, 47336.0]
[454.0, 277.0]
[388, 422]
p02623
u406355300
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()))\nmin = 0\ncnt = 0\nfor i,k in enumerate(b):\n min += k\nj = i\nfor i in range(N):\n while(j > 0 and min > K):\n j -= 1\n min -= b[j]\n if(min > K):\n break\n cnt = max(cnt, i ...
['Wrong Answer', 'Accepted']
['s509508239', 's095713288']
[40420.0, 40508.0]
[248.0, 245.0]
[366, 355]
p02623
u408262366
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\nans = 0\ncost = 0\nb_i = 0\nif not (a[0] >= k and b[0] >= k):\n while 1:\n if ans >= n:\n if ans-n>=m:\n break\n _next = b[b_i]\n b_i += 1\n else:\n _next = a[ans]\n if (c...
['Wrong Answer', 'Runtime Error', 'Wrong Answer', 'Accepted']
['s388515193', 's759757239', 's912949761', 's878624876']
[41040.0, 42544.0, 39988.0, 47452.0]
[324.0, 289.0, 298.0, 308.0]
[1193, 834, 920, 322]
p02623
u408375121
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()))\ncum_a = []\ntotal = 0\nfor i in range(n):\n total += a[i]\n if total > k:\n break\n cum_a.append(total)\n \ncum_b = []\ntotal = 0\nfor j in range(m):\n total += b[j]\n if total > k:\n break\n cu...
['Runtime Error', 'Runtime Error', 'Accepted']
['s095580879', 's435529368', 's767673446']
[40736.0, 40604.0, 40632.0]
[238.0, 196.0, 312.0]
[538, 521, 574]
p02623
u408793494
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\np_time = 0\ntime = 0\nwhile time < k:\n if len(a) > 0 and len(b) > 0:\n if a[0] >= b[0]:\n time += a[0]\n a.remove(a[0])\n else:\n time += b[0]\n ...
['Wrong Answer', 'Accepted']
['s288709008', 's196315324']
[40440.0, 47540.0]
[2206.0, 284.0]
[577, 364]
p02623
u414980766
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#include <algorithm>\n\n\n\nint main()\n{\n long long n,m,k; std::cin >> n >> m >> k;\n // long long a[n+1], b[m+1];\n std::vector<long long> a{n+1}, b{m+1};\n a[0]=0; b[0]=0;\n for (int i=1;i<n+1;i++)\n std::cin >> a[i];\n for (int i=1; i<m+1; i++)\n std::cin >> b[i];\n \n ...
['Runtime Error', 'Runtime Error', 'Accepted']
['s318214925', 's670322336', 's373651099']
[8896.0, 48168.0, 48384.0]
[26.0, 192.0, 283.0]
[651, 519, 549]
p02623
u416011173
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 -*-\n\nN, M, K = list(map(int, input().split()))\nA = list(map(int, input().split()))\nB = list(map(int, input().split()))\n\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...
['Runtime Error', 'Accepted']
['s326586538', 's221877862']
[40484.0, 47152.0]
[158.0, 229.0]
[448, 1172]
p02623
u416758623
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: * ...
['\nimport sys\npin = sys.stdin.readline\npout = sys.stdout.write\nperr = sys.stderr.write\n\nN, M, K = map(int, pin().split())\nA = list(map(int, pin().split()))\nB = list(map(int, pin().split()))\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])\nans = 0\n...
['Wrong Answer', 'Accepted']
['s176250721', 's256471892']
[55648.0, 49236.0]
[335.0, 278.0]
[566, 549]
p02623
u418149936
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: * ...
['for i in range(1, N + 1):\n A_ls[i] += A_ls[i - 1]\nfor i in range(1, M + 1):\n B_ls[i] += B_ls[i - 1]\n\nb_cnt, rst = M, 0\nfor a_cnt in range(N + 1):\n if A_ls[a_cnt] > K:\n break\n while A_ls[a_cnt] + B_ls[b_cnt] > K:\n b_cnt -= 1\n rst = max(rst, a_cnt + b_cnt)\nprint(rst)', "N, M, K ...
['Runtime Error', 'Wrong Answer', 'Accepted']
['s531424687', 's650926755', 's981236402']
[9072.0, 45168.0, 45208.0]
[27.0, 232.0, 293.0]
[294, 430, 429]
p02623
u425834921
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]\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\nj = M\nfor i in range(N+1):\n if a[i] > K:\n break\n while b[i] > K - a[i]:\n j -= ...
['Runtime Error', 'Accepted']
['s725976794', 's456356589']
[47652.0, 47280.0]
[2207.0, 289.0]
[335, 335]
p02623
u430536466
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):\nif a[i] > K:\nbreak\nwhile b[j] > K - a[i]:\nj -= 1\nans = ma...
['Runtime Error', 'Accepted']
['s098965553', 's607615755']
[8924.0, 47428.0]
[21.0, 281.0]
[326, 335]
p02623
u430726059
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 while b[j] > K-a[i]:\n j -= 1\n ans = max(ans, i+j)\...
['Runtime Error', 'Runtime Error', 'Accepted']
['s176333968', 's816104122', 's982211002']
[47496.0, 47428.0, 47368.0]
[319.0, 306.0, 312.0]
[314, 310, 345]
p02623
u435480265
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())\nln = list(map(int, input().split()))\nlm = list(map(int, input().split()))\ndef sub(l,k):\n res = 0\n for i in l:\n if k >= i:\n k -= i\n res += 1\n else:\n return k,res\n return k,res\n \ndef main(n,m,k,ln,lm):\n nk ...
['Wrong Answer', 'Runtime Error', 'Accepted']
['s183246923', 's695470160', 's612764472']
[40604.0, 8872.0, 70628.0]
[2206.0, 26.0, 427.0]
[853, 483, 481]
p02623
u436519884
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.insert(0,0)\nb.insert(0,0)\nj=1\nwhile j<=m and b[j]+b[j-1]<=k:\n b[j]+=b[j-1]\n j+=1\n \n\nj-=1\nbooks=j\ni=1\nwhile i<n+1:\n while j>0 and a[i]+b[j]>k:\n j-=1\n if(j>=0) and a[i]+b[j]<=k:\n books=max(boo...
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s734253249', 's957491945', 's715177035']
[40496.0, 42204.0, 42168.0]
[326.0, 2206.0, 361.0]
[368, 356, 426]
p02623
u439676056
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 = sys.stdin.readline\n\nN, M, K = map(int, input().split())\nA_list = list(map(int, input().split()))\nB_list = list(map(int, input().split()))\n\n\n#N, M, K = 3, 4, 730\n#A_list = [60, 90, 120]\n#B_list = [80, 150, 80, 150]\n\n\nA_list.insert(0, 0)\nB_list.insert(0, 0)\nB_cumsum...
['Wrong Answer', 'Runtime Error', 'Wrong Answer', 'Runtime Error', 'Wrong Answer', 'Accepted']
['s142936493', 's167678407', 's356577359', 's786390039', 's891521486', 's221512611']
[59348.0, 40548.0, 59092.0, 41188.0, 58840.0, 59220.0]
[375.0, 110.0, 365.0, 115.0, 375.0, 515.0]
[546, 412, 468, 614, 546, 465]
p02623
u440613652
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\n\na_pre,b_pre=[0],[0]\n\nfor i in range(n):\n\ta_pre.append(a_pre[i]+a[i])\n\nfor i in range(m):\n\tb_pre.append(b_pre[i]+b[i])\n\nans,j=0,m\nfor i in range(n+1):\n\tif a_pre[i]>k:\n\t\tbreak\n\twhile b[j]>k-a[i]:\...
['Runtime Error', 'Accepted']
['s291734250', 's639709290']
[47404.0, 47660.0]
[189.0, 276.0]
[332, 340]
p02623
u440975163
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)\nprint(b)\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 ...
['Wrong Answer', 'Accepted']
['s187947173', 's188678966']
[54460.0, 47460.0]
[361.0, 298.0]
[341, 323]
p02623
u444444641
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(input().split())\nB = list(input().split())\n\na=0;b=0\ncnt=0\nwhile a < len(A) and b < len(B) and K > 0:\n\ta_ = A[a]\n\tb_ = B[b]\n \n if a_ > K and b_ > K:\n break\n \n if a_ < b_ and a_ <= K:\n\t\tcnt += 1\n\t\tK -= a_\n\t\tA.pop(0)\n\telif a_ >= b_...
['Runtime Error', 'Runtime Error', 'Runtime Error', 'Wrong Answer', 'Accepted']
['s219843448', 's244680031', 's325851974', 's337414258', 's055070452']
[9004.0, 8988.0, 8960.0, 40616.0, 47680.0]
[22.0, 21.0, 27.0, 379.0, 294.0]
[377, 360, 282, 431, 366]
p02623
u445624660
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: * ...
['package main\nimport (\n\t"bufio"\n\t"fmt"\n\t"os"\n\t"strconv"\n)\n\nvar sc = bufio.NewScanner(os.Stdin)\nvar out = bufio.NewWriter(os.Stdout)\n\nfunc main(){\n\tbuf := make([]byte, 1024*1024)\n\tsc.Buffer(buf, bufio.MaxScanTokenSize)\n\tsc.Split(bufio.ScanWords)\n\tdefer out.Flush()\n\tN, M, K := nextInt(), nextInt...
['Runtime Error', 'Wrong Answer', 'Wrong Answer', 'Accepted']
['s281290356', 's893990176', 's916230580', 's561025209']
[9004.0, 71344.0, 74568.0, 42252.0]
[29.0, 2266.0, 2279.0, 791.0]
[1679, 672, 641, 611]
p02623
u446711904
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])\nfor i in range(m):\n b.append(b[i]+B[i])\n \nc=0\nidx=m\n\nfor i in range(n+1):\n while 1:\n if idx<0:\n break\n if a[i]+...
['Wrong Answer', 'Accepted']
['s199063082', 's490467136']
[47368.0, 47376.0]
[359.0, 292.0]
[457, 426]
p02623
u450288159
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 -*-\n\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 a = A[0]\n A2 = [a]\n b = B[0]\n B2 = [b]\n for i in range(1, n):\n a += A[i]\n A2.append(a)\n\n for i in range(1, m):\n...
['Runtime Error', 'Accepted']
['s392235308', 's953429087']
[9128.0, 47332.0]
[26.0, 229.0]
[1050, 1088]
p02623
u454866890
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,l = map(int,input().split(" "))\nNs = input().split(" ")\nN = [int (n) for n in Ns]\nMs = input().split(" ")\nM = [int(n) for n in Ms]\n#print(n,m,l)\n#print(N,M)\ni = 0\nj = 0\ntotal = 0\ncnt = 0\nwhile total <= l:\n if N[i] <= M[j]:\n total = total + N[i]\n i = i+1\n cnt = cnt +1\n else:\n total ...
['Runtime Error', 'Accepted']
['s892285426', 's876996692']
[55284.0, 47496.0]
[183.0, 284.0]
[355, 351]
p02623
u455354923
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()))\n\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])\nans = 0\nl = M\nfor k in range(N+1):\n if a[k] > K:\n break:\n while b[l] + a[k]...
['Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted']
['s071528214', 's166750424', 's322750788', 's526192119', 's663763471', 's751265318', 's835588767', 's968549703', 's873200760']
[8992.0, 40052.0, 9048.0, 8988.0, 9016.0, 9012.0, 8916.0, 40056.0, 47608.0]
[24.0, 2206.0, 28.0, 24.0, 28.0, 25.0, 25.0, 2206.0, 290.0]
[357, 985, 357, 648, 357, 649, 357, 962, 356]
p02623
u459419927
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=list(map(int,input().split()))\nA=list(map(int,input().split()))\nB=list(map(int,input().split()))\nbka=[0]*N\nbkb=[0]*M\nbka[0]=A[0]\nbkb[0]=B[0]\n\nfor i in range(1,N):\n bka[i]+=bka[i-1]+A[i]\nfor j in range(1,M):\n bkb[j]+=bkb[j-1]+B[j]\nans=bisect.bisect_left(bka,K)\nfor i in range(N):...
['Wrong Answer', 'Accepted']
['s650824533', 's824407206']
[47300.0, 48976.0]
[386.0, 399.0]
[521, 592]
p02623
u463602788
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())\nn,m,k = [int(z) for z in input().split()]\na = [int(z) for z in input().split()]\nb = [int(z) for z in input().split()]\ntime = 0\ni = j = 0\nwhile (time<=k and i<n and j<m):\n if (a[i]>b[j]):\n if (time+a[i]<=k):\n time += a[i]\n i+=1\n ...
['Runtime Error', 'Accepted']
['s219847187', 's227329123']
[39744.0, 49392.0]
[252.0, 219.0]
[755, 893]
p02623
u469254913
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\n# import math\n# import copy\n# from collections import deque\nimport sys\ninput = sys.stdin.readline\n\n\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\n a = 0\n b = 0\n\n time = 0\n res = 0\n\n ...
['Wrong Answer', 'Accepted']
['s017794776', 's606992505']
[41664.0, 47760.0]
[635.0, 288.0]
[1265, 871]
p02623
u471503862
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_max = 0\nsum = 0\nfor i in range(n):\n sum += A[i]\n if sum > k:\n sum -= A[i]\n break\n a_max += 1\n \nans = a_max\nkotae =ans\nj = 0\n\nprint(a_max, 0)\nfor i in range(m):\n sum += B[i]\n a...
['Wrong Answer', 'Accepted']
['s819207974', 's526498446']
[40412.0, 40624.0]
[322.0, 299.0]
[513, 470]
p02623
u473291366
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()))\nSUM_A=[0 for _ in range(N+1)]\nfor i in range(N):\n SUM_A[i+1] = A[i] + SUM_A[i]\n if SUM_A[i+1] > K:\n N=i\n break\n\nSUM_B=[0 for _ in range(M+1)]\nfor i in range(M):\n SUM_B[i+1] = B[i...
['Wrong Answer', 'Accepted']
['s893745440', 's297408801']
[40812.0, 42688.0]
[2207.0, 338.0]
[563, 542]
p02623
u474423089
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 itertools import accumulate\n\nN,M,K = map(int,input().split())\nA = list(map(int,input().split()))\nB = list(map(int,input().split()))\na = [0]+list(accumulate(A))\nb = [0]+list(accumulate(B))\nans,j = 0,M\nfor i in range(N+1):\n if i > K:\n break\n while b[j...
['Runtime Error', 'Wrong Answer', 'Accepted']
['s132367956', 's877901072', 's739195011']
[49076.0, 49032.0, 49056.0]
[275.0, 217.0, 234.0]
[367, 599, 370]
p02623
u475402977
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]:\n ...
['Runtime Error', 'Runtime Error', 'Accepted']
['s047536118', 's849669423', 's569818497']
[47388.0, 8752.0, 47336.0]
[362.0, 29.0, 293.0]
[347, 338, 354]
p02623
u475546258
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):\nif a[i] > K:\nbreak\nwhile b[j] > K - a[i]:\nj -= 1\nans = ma...
['Runtime Error', 'Accepted']
['s337723241', 's934920686']
[8896.0, 47544.0]
[29.0, 282.0]
[326, 345]
p02623
u476674874
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\nfrom collections import deque\ndef main():\n N, M, K = map(int, input().split())\n A = deque(list(map(int, input().split())))\n B = deque(list(map(int, input().split())))\n \n cost = K\n count = 0\n while True:\n if len(A) ==0 and len(B) == 0:\n break\n ...
['Runtime Error', 'Runtime Error', 'Accepted']
['s709693006', 's876767327', 's536148082']
[59760.0, 58420.0, 53996.0]
[320.0, 254.0, 656.0]
[713, 897, 551]
p02623
u477837488
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\na_, b_ = [0], [0]\n\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\nans = 0\nfor i in range(n+1):\n \n idx2 = m\n while a_[i] + b_[idx2] > k:...
['Runtime Error', 'Accepted']
['s163502021', 's535705159']
[47580.0, 47516.0]
[2207.0, 280.0]
[365, 377]
p02623
u480168496
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], B = [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']
['s575853523', 's695368672']
[9140.0, 47504.0]
[28.0, 295.0]
[359, 359]
p02623
u484052148
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 = [0] + list(map(int, input().split()))\nB = list(map(int, input().split()))\nSA = list(accumulate(A))\nSB = list(accumulate(B))\n\nans = 0\nfor i in range(len(SA)):\n if tmp := K-SA[i] < 0:\n break\n ...
['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted']
['s033956550', 's086556840', 's227327442', 's752543448']
[49344.0, 49308.0, 49168.0, 49140.0]
[251.0, 244.0, 256.0, 265.0]
[356, 319, 358, 375]
p02623
u485319545
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\nimport bisect\n\nra=[0]+list(np.cumsum(a))\nrb=[0]+list(np.cumsum(b))\n\nans=0\nfor i in range(n+1): \n capa = k - ra[i]\n if ra[i]>0:\n break\n j=bisect.bisect_right(rb,capa)\n...
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s386858979', 's524666932', 's460990952']
[59972.0, 59824.0, 60200.0]
[266.0, 256.0, 504.0]
[354, 355, 355]
p02623
u485819963
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()))\nB = list(map(int, input().split()))\n\n\na, b = [0], [0]\n\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\n\nans, j = 0, M\n\n\n\n\n\nfor i in range(N+1):\n if a[i] > K:\n break\n ...
['Wrong Answer', 'Accepted']
['s584410778', 's531224612']
[49208.0, 47308.0]
[349.0, 303.0]
[1932, 1932]
p02623
u490489966
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()))\nans = 0\ni = 0\nj = 0\nfor _ in range(n+m)\n # print(i,j,k)\n if n <= i:#\n k -= b[j]\n j += 1\n if k < 0:\n break\n ans += 1\n if k == 0:\n ...
['Runtime Error', 'Runtime Error', 'Accepted']
['s063233599', 's363588982', 's878235582']
[9036.0, 47684.0, 47324.0]
[24.0, 184.0, 284.0]
[659, 480, 531]
p02623
u497805118
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: * ...
['\nimport bisect\nimport numpy\n\nn, m, k = map(int, input().split(" "))\na = list(map(int, input().split(" ")))\nb = list(map(int, input().split(" ")))\n\ncost_a = numpy.insert(numpy.cumsum(a), 0, 0)\ncost_b = numpy.insert(numpy.cumsum(b), 0, 0)\n\nans = 0\nj = len(cost_b)\nfor i in range(len(cost_a)):\n for j in...
['Runtime Error', 'Runtime Error', 'Accepted']
['s456403324', 's508141027', 's204950520']
[58476.0, 8884.0, 58388.0]
[229.0, 26.0, 539.0]
[439, 454, 442]
p02623
u497883442
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\u3000a.append(a[i] + A[i])\nfor i in range(M):\n\u3000b.append(b[i] + B[i])\n\nans, j = 0, M\nfor i in range(N + 1):\n\u3000if a[i] > K:\n\u3000\u3000break\n\u3000while ...
['Runtime Error', 'Accepted']
['s918519865', 's564032092']
[8908.0, 47444.0]
[26.0, 305.0]
[353, 344]
p02623
u498658826
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 python3\nimport sys\n\n\nN, M, K = map(int, input().split())\nA = list(map(int, input().split()))\nB = list(map(int, input().split()))\na, b = [0], [0]\n\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 ...
['Runtime Error', 'Runtime Error', 'Wrong Answer', 'Accepted']
['s739433933', 's958070816', 's971171070', 's887558541']
[9004.0, 47176.0, 9236.0, 47296.0]
[27.0, 269.0, 25.0, 307.0]
[393, 386, 2213, 398]
p02623
u500673386
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()))\ni=0;j=0;ans=0\nwhile k>0:\n if i<n and j<m:\n if a[i]<=b[j]:\n k-=a[i]\n ans+=1\n i+=1\n continue\n else:\n k-=b[j...
['Wrong Answer', 'Runtime Error', 'Wrong Answer', 'Accepted']
['s090467850', 's428666193', 's961723782', 's620046845']
[40408.0, 47480.0, 47328.0, 47496.0]
[233.0, 235.0, 209.0, 288.0]
[641, 318, 310, 322]
p02623
u505391462
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\ta.append(a[i] + A[i])\nfor i in range(M):\n\tb.append(b[i] + B[i])\nans,j=0,M\nfor i in range(N + 1): \n\tif a[i]>K:\n \tbreak\n\twhile b[j] > K - a[i]:\n \t\tj -= 1\...
['Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted']
['s342106787', 's406821282', 's843103144', 's567578654']
[8900.0, 9060.0, 8968.0, 47312.0]
[26.0, 25.0, 24.0, 309.0]
[333, 331, 327, 334]
p02623
u511449169
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\nprint(b[j])\nfor i in range(n + 1):\n if a[i] > k:\n break\n whi...
['Wrong Answer', 'Accepted']
['s161769167', 's841699513']
[47448.0, 47368.0]
[297.0, 315.0]
[374, 362]
p02623
u512099209
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\ndp = [[0] * (M + 1) for _ in range(N + 1)]\n \nres = 0\n\nfor i in range(1, N + 1):\n dp[i][0] = dp[i - 1][0] + A[-i]\n if dp[i][0] <= K:\n res = max(res, i)\n else:\n break\n\nfor j in ran...
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s067742384', 's156695990', 's711754143']
[2642076.0, 2707984.0, 40776.0]
[2285.0, 2298.0, 399.0]
[612, 470, 535]
p02623
u514395957
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', 'Accepted']
['s699503898', 's187595556']
[8828.0, 47512.0]
[23.0, 277.0]
[342, 344]
p02623
u516554284
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\nc=[0]\nd=[0]\n\nfor i in range(n):\n c.append(c[-1]+a[i])\n \nfor j in range(m):\n d.append(d[-1]+b[j])\n\nans=0\nfor x in range(n):\n l=c[x+1]-c[x]\n B=0\n if l<=k:\n h=k-l\n mi=0\n ma=m+1\n while ...
['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted']
['s033232513', 's134064026', 's508381723', 's825900808', 's179176294']
[48832.0, 48660.0, 48700.0, 40488.0, 48700.0]
[2207.0, 1194.0, 2207.0, 2206.0, 1115.0]
[453, 452, 452, 366, 456]
p02623
u516927307
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[1])\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]:...
['Runtime Error', 'Accepted']
['s868809880', 's931894960']
[47504.0, 47548.0]
[290.0, 296.0]
[364, 364]
p02623
u517388115
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()))\nta=0\ntb=0\nans=0\nfor i in range(n+1):\n ta += a[i]\n if i=0:\n ta=0\n if ta>k:\n break\n for j in range(m):\n tb=sum(b[:j+1])\n ans=max(ans,i+j)\n if tb + ta >k:\n...
['Runtime Error', 'Accepted']
['s904434528', 's047885182']
[8980.0, 40384.0]
[26.0, 285.0]
[358, 370]
p02623
u518958552
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 aaa():\n n,m,k = map(int,input().split())\n a = list(map(int,input().split()))\n b = list(map(int,input().split()))\n c = []\n for i,j in zip(a,b):\n if i <= j:\n c.append(i)\n c.append(j)\n else:\n c.append(j)\n c.append(i)\n d = 0\n ...
['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted']
['s061619384', 's184206454', 's407819281', 's602240273', 's958103788', 's311335032']
[40604.0, 40108.0, 40488.0, 40452.0, 40452.0, 47548.0]
[173.0, 180.0, 171.0, 163.0, 264.0, 292.0]
[442, 531, 585, 353, 371, 364]