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 | u520843951 | 2,000 | 1,048,576 | We have two desks: A and B. Desk A has a vertical stack of N books on it, and Desk B similarly has M books on it. It takes us A_i minutes to read the i-th book from the top on Desk A (1 \leq i \leq N), and 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... | ['Runtime Error', 'Accepted'] | ['s470363493', 's774894584'] | [47296.0, 47336.0] | [190.0, 261.0] | [361, 361] |
p02623 | u521866787 | 2,000 | 1,048,576 | We have two desks: A and B. Desk A has a vertical stack of N books on it, and Desk B similarly has M books on it. It takes us A_i minutes to read the i-th book from the top on Desk A (1 \leq i \leq N), and 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\naindex=n+1\nbindex=m+1\nacumsum = [0]\nbcumsum = [0]\n\nab =0\nfor aa in range(n):\n ab += a[aa]\n acumsum.append(ab)# = ab\n if ab>k:\n aindex= aa\n break\n\nab =0\nfor bb in range(m):\n ab += b[bb]\n... | ['Wrong Answer', 'Runtime Error', 'Wrong Answer', 'Accepted'] | ['s130675317', 's181680859', 's929512153', 's988496408'] | [42404.0, 40468.0, 40672.0, 40488.0] | [367.0, 305.0, 302.0, 309.0] | [531, 491, 484, 497] |
p02623 | u527299145 | 2,000 | 1,048,576 | We have two desks: A and B. Desk A has a vertical stack of N books on it, and Desk B similarly has M books on it. It takes us A_i minutes to read the i-th book from the top on Desk A (1 \leq i \leq N), and B_i minutes to read the i-th book from the top on Desk B (1 \leq i \leq M). Consider the following action: * ... | ['import numpy as np\nimport pandas as pd\n\n\nN, M, K = map(int, input().split())\nA = [n for n in input().split()]\nB = [n for n in input().split()]\n\nA = np.array(A)\nB = np.array(B)\n\nA = np.cumsum(A)\nB = np.cumsum(B)\n\nA1 = np.zeros((len(A),2))\nA1[:,0] = A\nA1[:,1] = np.arange(1,len(A)+1)\n\nB1 = np.zeros((le... | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s183114860', 's836419517', 's231280610'] | [9100.0, 57436.0, 59756.0] | [24.0, 586.0, 531.0] | [562, 546, 335] |
p02623 | u531220228 | 2,000 | 1,048,576 | We have two desks: A and B. Desk A has a vertical stack of N books on it, and Desk B similarly has M books on it. It takes us A_i minutes to read the i-th book from the top on Desk A (1 \leq i \leq N), and 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]\nfor i,a in enumerate(A, 1):\n tmp = sum_A[i-1] + a\n if tmp <= K:\n sum_A.append(tmp)\n mark_A = i\n else:\n break\n \nsum_B = [0]\nfor i,b in enumerate(B, 1):... | ['Runtime Error', 'Accepted'] | ['s641282936', 's929923052'] | [40376.0, 40492.0] | [324.0, 334.0] | [556, 569] |
p02623 | u531631168 | 2,000 | 1,048,576 | We have two desks: A and B. Desk A has a vertical stack of N books on it, and Desk B similarly has M books on it. It takes us A_i minutes to read the i-th book from the top on Desk A (1 \leq i \leq N), and 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, j = 0, 0\ntime = 0\nwhile time <= k:\n print(i, j)\n if i < n and A[i] < B[j]:\n time += A[i]\n i += 1\n elif j < m:\n time += B[j]\n j += 1\n if i >= n and j >= m:... | ['Runtime Error', 'Accepted'] | ['s352017094', 's797231458'] | [40680.0, 47344.0] | [286.0, 328.0] | [368, 447] |
p02623 | u535171899 | 2,000 | 1,048,576 | We have two desks: A and B. Desk A has a vertical stack of N books on it, and Desk B similarly has M books on it. It takes us A_i minutes to read the i-th book from the top on Desk A (1 \leq i \leq N), and 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\nimport itertools\nn,m,k = map(int,input().split())\nA = list(map(int,input().split()))\nB = list(map(int,input().split()))\n\na_cum = list(itertools.accumulate(A))\n\nidx = 0\ncnt = 0\ntmp = 0\npost_idx = 0\nfor i in range(m):\n b = B[i]\n idx = bisect.bisect_left(A,b,lo=idx+1)\n A.insert(idx,... | ['Wrong Answer', 'Accepted'] | ['s040732077', 's769918366'] | [41132.0, 47272.0] | [2207.0, 292.0] | [314, 595] |
p02623 | u537550206 | 2,000 | 1,048,576 | We have two desks: A and B. Desk A has a vertical stack of N books on it, and Desk B similarly has M books on it. It takes us A_i minutes to read the i-th book from the top on Desk A (1 \leq i \leq N), and B_i minutes to read the i-th book from the top on Desk B (1 \leq i \leq M). Consider the following action: * ... | ['from collections import deque\nn, m, k = map(int, input().split())\na = deque(list(map(int, input().split())))\nb = deque(list(map(int, input().split())))\n\ntime = 0\ncount = 0\nwhile len(a) > 0 or len(b) > 0:\n if len(a) == 0:\n book_b = b.popleft()\n time += book_b\n count += 1\n elif l... | ['Runtime Error', 'Accepted'] | ['s886181601', 's824382835'] | [40064.0, 47464.0] | [256.0, 326.0] | [884, 488] |
p02623 | u538516600 | 2,000 | 1,048,576 | We have two desks: A and B. Desk A has a vertical stack of N books on it, and Desk B similarly has M books on it. It takes us A_i minutes to read the i-th book from the top on Desk A (1 \leq i \leq N), and B_i minutes to read the i-th book from the top on Desk B (1 \leq i \leq M). Consider the following action: * ... | ['s = list(map(int,input().split()))\nN = s[0]\nM = s[1]\nK = s[2]\n\na = list(map(int,input().split()))\nb = list(map(int,input().split()))\n\nasum = [0]\nbsum = [0]\napsum = 0\nbpsum = 0\nfor times in a:\n apsum += times\n asum.append(apsum)\nfor times in b:\n bpsum += times\n bsum.append(bpsum)\n\nnums = []\ni =... | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s072594938', 's862413896', 's690295031'] | [50504.0, 54760.0, 50656.0] | [356.0, 421.0, 251.0] | [460, 496, 443] |
p02623 | u543016260 | 2,000 | 1,048,576 | We have two desks: A and B. Desk A has a vertical stack of N books on it, and Desk B similarly has M books on it. It takes us A_i minutes to read the i-th book from the top on Desk A (1 \leq i \leq N), and 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\nAsum=[0]\nBsum=[0]\n\nfor i in range(N):\n Asum.append(Asum[-1]+A[i])\n if Asum[i]>K:\n break\n \nfor i in range(M):\n Bsum.append(Bsum[-1]+B[i])\n if Bsum[i]>K:\n break\n \n... | ['Runtime Error', 'Runtime Error', 'Runtime Error', 'Wrong Answer', 'Accepted'] | ['s236379506', 's324599196', 's459495906', 's811054118', 's654435280'] | [8948.0, 9044.0, 8960.0, 47524.0, 47396.0] | [27.0, 27.0, 24.0, 252.0, 269.0] | [425, 389, 442, 389, 392] |
p02623 | u544865362 | 2,000 | 1,048,576 | We have two desks: A and B. Desk A has a vertical stack of N books on it, and Desk B similarly has M books on it. It takes us A_i minutes to read the i-th book from the top on Desk A (1 \leq i \leq N), and B_i minutes to read the i-th book from the top on Desk B (1 \leq i \leq M). Consider the following action: * ... | ['[n, m, k] = [int(x) for x in input().split()]\n\na = [int(x) for x in input().split()]\nb = [int(x) for x in input().split()]\n\nif sum(a)+sum(b) <= k:\n print(n+m)\n\n\nelse:\n if sum(a) < sum(b):\n small = a\n big = b\n else:\n small = b\n big = a\n\n # print(sum(small))\n\n ... | ['Runtime Error', 'Accepted'] | ['s722940322', 's903056987'] | [41720.0, 47684.0] | [2206.0, 290.0] | [1795, 364] |
p02623 | u547231875 | 2,000 | 1,048,576 | We have two desks: A and B. Desk A has a vertical stack of N books on it, and Desk B similarly has M books on it. It takes us A_i minutes to read the i-th book from the top on Desk A (1 \leq i \leq N), and 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', 'Accepted'] | ['s572197688', 's355573025'] | [8984.0, 47372.0] | [24.0, 299.0] | [324, 360] |
p02623 | u548272916 | 2,000 | 1,048,576 | We have two desks: A and B. Desk A has a vertical stack of N books on it, and Desk B similarly has M books on it. It takes us A_i minutes to read the i-th book from the top on Desk A (1 \leq i \leq N), and 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]\n\nfor i in range(len(a)):\n A.append(a[i] + A[i])\nfor i in range(len(b)):\n B.append(b[i] + B[i])\n\nloop = False\nnum = 0\nx = m \n\nfor i in range(1,len(A)):\n while A[i] + B[x] > k and ... | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s209533395', 's296728107', 's770235370'] | [47512.0, 47360.0, 47448.0] | [321.0, 293.0, 283.0] | [407, 351, 347] |
p02623 | u552083508 | 2,000 | 1,048,576 | We have two desks: A and B. Desk A has a vertical stack of N books on it, and Desk B similarly has M books on it. It takes us A_i minutes to read the i-th book from the top on Desk A (1 \leq i \leq N), and 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\nif N<M:\n for i in range(N,M+1):\n A.append(pow(10,10))\nif N>M:\n for i in range(M,N+1):\n B.append(pow(10,10))\nA.append(pow(10,10))\nB.append(pow(10,10))\nt=0\ncount=0\nA_count=0\nB_count=0\nwh... | ['Wrong Answer', 'Accepted'] | ['s561644264', 's695257701'] | [40448.0, 47496.0] | [324.0, 283.0] | [496, 361] |
p02623 | u555767343 | 2,000 | 1,048,576 | We have two desks: A and B. Desk A has a vertical stack of N books on it, and Desk B similarly has M books on it. It takes us A_i minutes to read the i-th book from the top on Desk A (1 \leq i \leq N), and 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\nA_cumsum = np.cumsum(A)\nB_cumsum = np.cumsum(B)\n\n\n\nlenA = len(A)\nlenB = len(B)\n\nif lenA < lenB:\n A_cumsum = np.concatenate([A_cumsum, [max(B_cumsum)+1]])\nelse:\n B_cumsu... | ['Wrong Answer', 'Accepted'] | ['s053200583', 's244491606'] | [47204.0, 50288.0] | [432.0, 572.0] | [733, 470] |
p02623 | u557792847 | 2,000 | 1,048,576 | We have two desks: A and B. Desk A has a vertical stack of N books on it, and Desk B similarly has M books on it. It takes us A_i minutes to read the i-th book from the top on Desk A (1 \leq i \leq N), and 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\nimport math\nimport collections\nfrom collections import deque \nfrom functools import reduce\n\n# input = sys.stdin.readline\nn, m, k = map(int, input().split())\na = list(map(int, input().split()))\nb = list(map(int, input().split()))\na_t, b_t = [0], [0]\nfor i in range(n):\n a_t... | ['Runtime Error', 'Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s052046127', 's490883949', 's685276286', 's868876112', 's613041467'] | [65536.0, 58680.0, 58592.0, 58256.0, 65020.0] | [405.0, 376.0, 370.0, 368.0, 371.0] | [530, 778, 777, 719, 532] |
p02623 | u565791439 | 2,000 | 1,048,576 | We have two desks: A and B. Desk A has a vertical stack of N books on it, and Desk B similarly has M books on it. It takes us A_i minutes to read the i-th book from the top on Desk A (1 \leq i \leq N), and 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()))\ncount=sum(B)\na=0\np=0\nfor i in range(N):\n while count>K:\n count-=B[M-1]\n M-=1\n if i!=N-1:\n count+=A[i]\n a+=A[i]\n p=max(p,i+M+1)\n if a>K:\n break\nprint(p)', "N,M... | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s391508663', 's819063814', 's084063197'] | [40620.0, 44976.0, 40592.0] | [244.0, 1050.0, 302.0] | [295, 425, 535] |
p02623 | u567225946 | 2,000 | 1,048,576 | We have two desks: A and B. Desk A has a vertical stack of N books on it, and Desk B similarly has M books on it. It takes us A_i minutes to read the i-th book from the top on Desk A (1 \leq i \leq N), and 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\nn,m,k=map(int,input().split())\narr1=list(map(int,input().split()))\narr2=list(map(int,input().split()))\nfor i in range(1,n):\n arr1[i]=arr1[i]+arr1[i-1]\nfor i in range(1,m):\n arr2[i]=arr2[i]+arr2[i-1]\nma=0\nfor i in range(n):\n c=k-arr1[i]\n ind=bisect_rig... | ['Runtime Error', 'Accepted'] | ['s755835405', 's091948526'] | [40544.0, 40580.0] | [286.0, 448.0] | [375, 443] |
p02623 | u570039786 | 2,000 | 1,048,576 | We have two desks: A and B. Desk A has a vertical stack of N books on it, and Desk B similarly has M books on it. It takes us A_i minutes to read the i-th book from the top on Desk A (1 \leq i \leq N), and 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\n\nread = sys.stdin.buffer.read \nreadline = sys.stdin.buffer.readline\nreadlines = sys.stdin.buffer.readlines \n\nN, M, K = map(int, readline().split())\nA = np.array(readline().split(), np.int64)\nB = np.array(readline().split(), np.int64)\n\nAcum = np.zeros(N+1, np.int64)\nAcum[1:] ... | ['Wrong Answer', 'Accepted'] | ['s671946594', 's788213841'] | [42864.0, 42872.0] | [187.0, 657.0] | [388, 2324] |
p02623 | u570155187 | 2,000 | 1,048,576 | We have two desks: A and B. Desk A has a vertical stack of N books on it, and Desk B similarly has M books on it. It takes us A_i minutes to read the i-th book from the top on Desk A (1 \leq i \leq N), and 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.append(10**10)\nb.append(10**11)\n\nprint(n,m,k,a,b)\n\ni = 0\nj = 0\nt = 0\ncnt = 0\nwhile t+a[i] <= k or t+b[j] <= k:\n if a[i] < b[j]:\n t += a[i]\n i += 1\n cnt += 1\n else:\n t += b[j]\n ... | ['Wrong Answer', 'Accepted'] | ['s056843756', 's407785388'] | [40600.0, 48996.0] | [264.0, 276.0] | [329, 377] |
p02623 | u572425901 | 2,000 | 1,048,576 | We have two desks: A and B. Desk A has a vertical stack of N books on it, and Desk B similarly has M books on it. It takes us A_i minutes to read the i-th book from the top on Desk A (1 \leq i \leq N), and B_i minutes to read the i-th book from the top on Desk B (1 \leq i \leq M). Consider the following action: * ... | ['n, m, k = map(int, input().split())\nA = [0] + list(map(int,input().split()))\nB = [0] + list(map(int,input().split()))\n \nfor i in range(2,n):\n A[i] += A[i-1]\nfor i in range(1,m):\n B[i] += B[i-1]\nj = m\nans = 0\nfor i in range(n+1):\n if A[i] > k:\n break \n while B[j] > k-A[i]:\n j -=... | ['Wrong Answer', 'Accepted'] | ['s381116772', 's308755525'] | [39924.0, 39876.0] | [276.0, 285.0] | [341, 346] |
p02623 | u576432509 | 2,000 | 1,048,576 | We have two desks: A and B. Desk A has a vertical stack of N books on it, and Desk B similarly has M books on it. It takes us A_i minutes to read the i-th book from the top on Desk A (1 \leq i \leq N), and 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\naa=list(accumulate(a))\nbb=list(accumulate(b))\n\nfrom bisect import bisect_left,bisect\n\nkmax=0\nfor i in range(n):\n if k<aa[i]:\n break\n kk=k-aa[i]\n k2=bisect(b... | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s366813085', 's889127771', 's471687369'] | [47292.0, 47456.0, 50688.0] | [407.0, 389.0, 292.0] | [363, 365, 387] |
p02623 | u580273604 | 2,000 | 1,048,576 | We have two desks: A and B. Desk A has a vertical stack of N books on it, and Desk B similarly has M books on it. It takes us A_i minutes to read the i-th book from the top on Desk A (1 \leq i \leq N), and B_i minutes to read the i-th book from the top on Desk B (1 \leq i \leq M). Consider the following action: * ... | ['import numpy as np\nimport bisect\nN,M,K= map(int, input().split())\nA=list(map(int, input().split()))\nB=list(map(int, input().split()))\nif A[0]>K and B[0]>K:print(0);exit()\n\nAsum=[0]\nfor i in range(N):\n if Asum[-1]+A[i]<=K:\n Asum.append(Asum[-1]+A[i]) \n\nBsum=[0]\nfor j in range(M):\n if Bsum[-1]+B[j]<... | ['Runtime Error', 'Wrong Answer', 'Accepted'] | ['s567128710', 's889293249', 's803895544'] | [71408.0, 59236.0, 67396.0] | [393.0, 2207.0, 435.0] | [580, 962, 456] |
p02623 | u582803594 | 2,000 | 1,048,576 | We have two desks: A and B. Desk A has a vertical stack of N books on it, and Desk B similarly has M books on it. It takes us A_i minutes to read the i-th book from the top on Desk A (1 \leq i \leq N), and 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 \nv,j=0,M\n\nfor i in range(N+1):\n if a[i]>K:\n break\n while b[j]>K-a[i]:\n j-=1\n v... | ['Runtime Error', 'Accepted'] | ['s216051841', 's724010886'] | [47484.0, 47548.0] | [219.0, 281.0] | [331, 331] |
p02623 | u584083135 | 2,000 | 1,048,576 | We have two desks: A and B. Desk A has a vertical stack of N books on it, and Desk B similarly has M books on it. It takes us A_i minutes to read the i-th book from the top on Desk A (1 \leq i \leq N), and B_i minutes to read the i-th book from the top on Desk B (1 \leq i \leq M). Consider the following action: * ... | ['N, M, K = [int(x) for x in input().strip().split()]\nA = [int(x) for x in input().strip().split()]\nB = [int(x) for x in input().strip().split()]\ni = j = 0\nct = 0\nwhile k > 0: \n if i < N: \n if A[i] < B[j] and k-A[i] >= 0: \n ct +=1\n k -= A[i]\n i += 1\n continue\n if j < M: \n if k-B... | ['Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted'] | ['s061233627', 's241583960', 's360931843', 's523841644', 's730981377', 's195932782'] | [40588.0, 40532.0, 8996.0, 8980.0, 40692.0, 47268.0] | [128.0, 127.0, 28.0, 25.0, 125.0, 307.0] | [408, 275, 307, 442, 300, 331] |
p02623 | u589257616 | 2,000 | 1,048,576 | We have two desks: A and B. Desk A has a vertical stack of N books on it, and Desk B similarly has M books on it. It takes us A_i minutes to read the i-th book from the top on Desk A (1 \leq i \leq N), and 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])\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 j -=... | ['Wrong Answer', 'Accepted'] | ['s388627847', 's776935582'] | [47300.0, 47528.0] | [244.0, 283.0] | [338, 346] |
p02623 | u591143370 | 2,000 | 1,048,576 | We have two desks: A and B. Desk A has a vertical stack of N books on it, and Desk B similarly has M books on it. It takes us A_i minutes to read the i-th book from the top on Desk A (1 \leq i \leq N), and 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()))\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]\nhonn=0\nfor i in range(len(A)):\n s=K-A[i]\n a=bisect.bisect(B,s)\n print(s)\n if i+1+a>honn:... | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s415068903', 's941278589', 's438546475'] | [40608.0, 40672.0, 40376.0] | [370.0, 294.0, 291.0] | [336, 405, 367] |
p02623 | u601159375 | 2,000 | 1,048,576 | We have two desks: A and B. Desk A has a vertical stack of N books on it, and Desk B similarly has M books on it. It takes us A_i minutes to read the i-th book from the top on Desk A (1 \leq i \leq N), and 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\n\nnumOfA,numOfB,target = map(int, input().split())\n\ntimetoreadA = list(map(int,input().split()))\ntimetoreadB = list(map(int,input().split()))\n\ntimetoreadAacc = list(itertools.accumulate(timetoreadA))\nbooknumifonlyA = 0\ntimeifonlyA = 0\nfor time in timetoreadAacc:\n\tif target < time:\n\t\tbre... | ['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s253213161', 's409644613', 's834785737', 's885128028', 's739741972'] | [41528.0, 44968.0, 44420.0, 43252.0, 41732.0] | [365.0, 209.0, 272.0, 196.0, 244.0] | [919, 796, 787, 801, 792] |
p02623 | u602773379 | 2,000 | 1,048,576 | We have two desks: A and B. Desk A has a vertical stack of N books on it, and Desk B similarly has M books on it. It takes us A_i minutes to read the i-th book from the top on Desk A (1 \leq i \leq N), and 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=input2()\nA=input_array()\nB=input_array()\n\nca=0\ncb=0\ncount=0\nSUM=0\nfor i in range(10**5):\n\tif A[ca]<=B[cb]:\n\t\tSUM+=A[ca]\n\t\tca+=1\n\telse:\n\t\tSUM+=B[cb]\n\t\tcb+=1\n\n\tif SUM >=k:\n\t\tbreak\n\telse:\n\t\tcount+=1\nprint(count)', '\ndef input2():\n\treturn map(int,input().split())\n \nn,m,k=in... | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s080054311', 's717941484', 's596027864'] | [9036.0, 9228.0, 48840.0] | [28.0, 25.0, 363.0] | [214, 357, 533] |
p02623 | u605880635 | 2,000 | 1,048,576 | We have two desks: A and B. Desk A has a vertical stack of N books on it, and Desk B similarly has M books on it. It takes us A_i minutes to read the i-th book from the top on Desk A (1 \leq i \leq N), and 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])\n\nfor i in range(M):\n b.append(b[i]+B[i])\n\n#print(a)\n#print(b)\n \nans =0\nj = M\n\nfor i in range(N+1):\n if a[i]>k:\n break... | ['Runtime Error', 'Accepted'] | ['s135798788', 's378294597'] | [47416.0, 40776.0] | [189.0, 321.0] | [385, 419] |
p02623 | u607563136 | 2,000 | 1,048,576 | We have two desks: A and B. Desk A has a vertical stack of N books on it, and Desk B similarly has M books on it. It takes us A_i minutes to read the i-th book from the top on Desk A (1 \leq i \leq N), and 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:0]=[0]\nb[0:0]=[0]\n\nans, j = 0, m\n\nfor i in range(n + 1):\n if a[i] > k:\n break\n while b[j] > k - a[i]:\n j -= 1\n ans = max(ans, i + j)\n\nprint(ans)', 'n, m, k = map(int,inp... | ['Wrong Answer', 'Accepted'] | ['s478370315', 's361363508'] | [40332.0, 47368.0] | [211.0, 287.0] | [277, 362] |
p02623 | u607709109 | 2,000 | 1,048,576 | We have two desks: A and B. Desk A has a vertical stack of N books on it, and Desk B similarly has M books on it. It takes us A_i minutes to read the i-th book from the top on Desk A (1 \leq i \leq N), and 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\nb_li = [0]\nb_ = 0\n\nfor B_ in B:\n b_ = b_ + B_\n b_li.append(b_)\n\nbook_max = 0\nbook_cnt_a = 0\nbook_cnt_ab = 0\na_ = 0\nbook_cnt_ab = M\n\nfor i in range(N+1):\n while (b_li[book_cnt_ab-1] +... | ['Runtime Error', 'Wrong Answer', 'Runtime Error', 'Wrong Answer', 'Wrong Answer', 'Runtime Error', 'Accepted'] | ['s116358310', 's619615928', 's689691097', 's751574820', 's755116056', 's993683603', 's878693041'] | [40556.0, 40632.0, 47372.0, 40552.0, 40724.0, 40312.0, 47660.0] | [272.0, 2206.0, 172.0, 245.0, 2206.0, 269.0, 248.0] | [568, 545, 597, 596, 544, 532, 540] |
p02623 | u608007704 | 2,000 | 1,048,576 | We have two desks: A and B. Desk A has a vertical stack of N books on it, and Desk B similarly has M books on it. It takes us A_i minutes to read the i-th book from the top on Desk A (1 \leq i \leq N), and 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\n\nAsum=[0]\nfor i in A:\n Asum.append(Asum[-1]+i)\n if(Asum[-1]>K):break\n \nBsum=[0]\nfor i in B:\n Bsum.append(Bsum[-1]+i)\n if(Bsum[-1]>K):break\nprint(Asum,Bsum)\n\nmaxval=len(Asum)-1\n\nfor i in range(l... | ['Wrong Answer', 'Accepted'] | ['s987035790', 's889910899'] | [46892.0, 53716.0] | [2213.0, 745.0] | [543, 624] |
p02623 | u609561564 | 2,000 | 1,048,576 | We have two desks: A and B. Desk A has a vertical stack of N books on it, and Desk B similarly has M books on it. It takes us A_i minutes to read the i-th book from the top on Desk A (1 \leq i \leq N), and 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\nmax_num = 0\nj = 0\nj_max = M + 1\nA_sums=[sum(A[:i]) for i in range(N+1)]\nB_sums=[sum(B[:i]) for i in range(M+1)]\n\nfor i in range(N + 1):\n j = 0\n while j < j_max:\n print(i, j)\n ... | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s052283711', 's485681618', 's267039856'] | [42164.0, 42204.0, 47376.0] | [2206.0, 2207.0, 323.0] | [443, 443, 445] |
p02623 | u614875193 | 2,000 | 1,048,576 | We have two desks: A and B. Desk A has a vertical stack of N books on it, and Desk B similarly has M books on it. It takes us A_i minutes to read the i-th book from the top on Desk A (1 \leq i \leq N), and 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]+A\nB=[0]+B\n\nfrom itertools import accumulate\n\nAA=list(accumulate(A))\nBB=list(accumulate(B))\n\n\n\nprint(AA)\nprint(BB)\n\ntimer=0\ncount=0\na,b=0,0\n\nimport bisect\nfor i in range(N+1):\n a=i\n b=bis... | ['Wrong Answer', 'Runtime Error', 'Accepted'] | ['s212310759', 's299329107', 's661010106'] | [54824.0, 47360.0, 47348.0] | [347.0, 135.0, 279.0] | [430, 355, 362] |
p02623 | u616382321 | 2,000 | 1,048,576 | We have two desks: A and B. Desk A has a vertical stack of N books on it, and Desk B similarly has M books on it. It takes us A_i minutes to read the i-th book from the top on Desk A (1 \leq i \leq N), and 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\nfor i in range(M):\n b.append(B[i] + B[i])\n\nans, j = 0, M\n\nfor i in range(N+1):\n if a[i] > K:\n break\n while b[j] >... | ['Wrong Answer', 'Accepted'] | ['s595173943', 's894411258'] | [44356.0, 47508.0] | [287.0, 358.0] | [362, 362] |
p02623 | u616542081 | 2,000 | 1,048,576 | We have two desks: A and B. Desk A has a vertical stack of N books on it, and Desk B similarly has M books on it. It takes us A_i minutes to read the i-th book from the top on Desk A (1 \leq i \leq N), and 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_list = []\nans_list.append(0)\n\nsum_a = 0\nfor i in range(len(a)):\n sum_a += a[i]\n sum_b = 0\n if sum_a > k:\n break\n if sum_a == k:\n temp = i+1\n ans_list.append(temp)\n break\n ... | ['Wrong Answer', 'Runtime Error', 'Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s260386404', 's490662950', 's559983431', 's725811977', 's297763460'] | [41744.0, 40112.0, 41796.0, 39868.0, 47376.0] | [2206.0, 2206.0, 2206.0, 2206.0, 304.0] | [1069, 991, 1069, 1052, 342] |
p02623 | u617037231 | 2,000 | 1,048,576 | We have two desks: A and B. Desk A has a vertical stack of N books on it, and Desk B similarly has M books on it. It takes us A_i minutes to read the i-th book from the top on Desk A (1 \leq i \leq N), and B_i minutes to read the i-th book from the top on Desk B (1 \leq i \leq M). Consider the following action: * ... | ['import math\nimport sys\nimport itertools\nfrom math import gcd\nfrom math import sqrt\nfrom sys import stdin\ndef input() : return stdin.readline().rstrip()\ndef mips():\n return map(int,input().split())\ndef ii():\n return int(input())\nsys.setrecursionlimit(10**9)\n\nN,M,K = mips()\nA = [i for i in mips()]\n... | ['Runtime Error', 'Accepted'] | ['s365324724', 's427692375'] | [47824.0, 47588.0] | [2207.0, 340.0] | [682, 651] |
p02623 | u623659526 | 2,000 | 1,048,576 | We have two desks: A and B. Desk A has a vertical stack of N books on it, and Desk B similarly has M books on it. It takes us A_i minutes to read the i-th book from the top on Desk A (1 \leq i \leq N), and 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 logging\n\nlogging.basicConfig(level=logging.INFO)\nlogging.info(\'info\')\n\n\ndef main():\n N, M, K = map(int, input().split())\n A_list = list(map(int, input().split()))\n B_list = list(map(int, input().split()))\n logging.info("hello")\n\n a = [0]\n b = [0]\n\n for i in range(N):\n ... | ['Runtime Error', 'Wrong Answer', 'Accepted'] | ['s262404096', 's517679246', 's707484919'] | [8948.0, 49036.0, 49164.0] | [24.0, 2207.0, 233.0] | [669, 701, 613] |
p02623 | u626891113 | 2,000 | 1,048,576 | We have two desks: A and B. Desk A has a vertical stack of N books on it, and Desk B similarly has M books on it. It takes us A_i minutes to read the i-th book from the top on Desk A (1 \leq i \leq N), and 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 = input().split()\nB = input().split()\nfor i in range(len(A)):\n A[i] = int(A[i])\nfor i in range(len(B)):\n B[i] = int(B[i])\nA.reverse()\nB.reverse()\nKK = 0\nc= 0\nwhile KK <= K:\n if len(A) == 0:\n KK += B[0]\n if KK <= K:\n c += 0\n if ... | ['Wrong Answer', 'Accepted'] | ['s463993580', 's047348278'] | [40192.0, 47548.0] | [2206.0, 282.0] | [700, 401] |
p02623 | u627600101 | 2,000 | 1,048,576 | We have two desks: A and B. Desk A has a vertical stack of N books on it, and Desk B similarly has M books on it. It takes us A_i minutes to read the i-th book from the top on Desk A (1 \leq i \leq N), and 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\nans = 0\nfor k in range(len(A)):\n a += A[k]\n A[k] = a\nfor k in range(len(B)):\n b += B[k]\n B[k] = b\n\nAA = [0] + A\n\nBB = [0] + B\n\nfor k in range(N+1):\n if AA[k] <= K:... | ['Runtime Error', 'Accepted'] | ['s467211867', 's300849338'] | [40564.0, 47324.0] | [197.0, 304.0] | [586, 342] |
p02623 | u628285938 | 2,000 | 1,048,576 | We have two desks: A and B. Desk A has a vertical stack of N books on it, and Desk B similarly has M books on it. It takes us A_i minutes to read the i-th book from the top on Desk A (1 \leq i \leq N), and 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"""\nCreated on Mon Sep 7 11:05:00 2020\n\n@author: liang\n"""\n\n\nN, M, K = map(int, input().split())\n\nA = [0] + [int(x) for x in input().split()]\nB = [0] + [int(x) for x in input().split()]\n\ns_b = 0\nfor i in range(M+1):\n s_b += B[i]\n if s_b > K:\n s_b -= B[i]\n ... | ['Runtime Error', 'Accepted'] | ['s210786715', 's227694669'] | [39968.0, 46888.0] | [310.0, 290.0] | [954, 346] |
p02623 | u630467326 | 2,000 | 1,048,576 | We have two desks: A and B. Desk A has a vertical stack of N books on it, and Desk B similarly has M books on it. It takes us A_i minutes to read the i-th book from the top on Desk A (1 \leq i \leq N), and 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])\n print(a)\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', 'Wrong Answer', 'Accepted'] | ['s101193034', 's876110004', 's985287343'] | [157200.0, 39764.0, 47496.0] | [1359.0, 2206.0, 285.0] | [359, 573, 344] |
p02623 | u633355062 | 2,000 | 1,048,576 | We have two desks: A and B. Desk A has a vertical stack of N books on it, and Desk B similarly has M books on it. It takes us A_i minutes to read the i-th book from the top on Desk A (1 \leq i \leq N), and 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\n\nreadline = sys.stdin.readline\nreadlines = sys.stdin.readlines\nns = lambda: readline().rstrip() # input string\nni = lambda: int(readline().rstrip()) # input int\nnm = lambda: map(int, readline().split()) # input multiple int \nnl = lambda: list(map(int, readline().split())) # input multiple int to lis... | ['Wrong Answer', 'Runtime Error', 'Accepted'] | ['s161661906', 's364158465', 's065743473'] | [54860.0, 47868.0, 47548.0] | [427.0, 228.0, 1074.0] | [1194, 737, 1022] |
p02623 | u636290142 | 2,000 | 1,048,576 | We have two desks: A and B. Desk A has a vertical stack of N books on it, and Desk B similarly has M books on it. It takes us A_i minutes to read the i-th book from the top on Desk A (1 \leq i \leq N), and 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(n):\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', 'Runtime Error', 'Accepted'] | ['s878599868', 's956588467', 's639270217'] | [47628.0, 47476.0, 47552.0] | [295.0, 180.0, 288.0] | [359, 358, 359] |
p02623 | u638970023 | 2,000 | 1,048,576 | We have two desks: A and B. Desk A has a vertical stack of N books on it, and Desk B similarly has M books on it. It takes us A_i minutes to read the i-th book from the top on Desk A (1 \leq i \leq N), and 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]*(n+1)\nbsum = [0]*(m+1)\nfor i in range(n):\n\tasum[i+1] = a[i] + asum[i]\nfor j in range(m): \n\tbsum[i+1] = b[j] + bsum[j]\nj = m\nres = 0\nfor i in range(n+1):\n\tif asum[i] > k:\n\t\tbreak\n\twhile... | ['Runtime Error', 'Accepted'] | ['s504029594', 's990786808'] | [40492.0, 47492.0] | [251.0, 290.0] | [362, 362] |
p02623 | u640161402 | 2,000 | 1,048,576 | We have two desks: A and B. Desk A has a vertical stack of N books on it, and Desk B similarly has M books on it. It takes us A_i minutes to read the i-th book from the top on Desk A (1 \leq i \leq N), and 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().strip().split()))\nb = list(map(int, input().strip().split()))\nsum = 0\n\nfor i in range(n):\n sum += a[i]\nfor i in range(m):\n sum += b[i]\n\nif sum<=k:\n print(n+m)\n sys.exit()\n\n\nsum = 0\ncnt =0\nwhile sum < k and (len(a) != ... | ['Wrong Answer', 'Accepted'] | ['s694059343', 's354038006'] | [40628.0, 48456.0] | [162.0, 151.0] | [645, 609] |
p02623 | u642528832 | 2,000 | 1,048,576 | We have two desks: A and B. Desk A has a vertical stack of N books on it, and Desk B similarly has M books on it. It takes us A_i minutes to read the i-th book from the top on Desk A (1 \leq i \leq N), and B_i minutes to read the i-th book from the top on Desk B (1 \leq i \leq M). Consider the following action: * ... | ['from bisect import bisect_right\n\nN,M,K = map(int,input().split())\nA = list(map(int,input().split()))\nB = list(map(int,input().split()))\n\na_sum = [0]\nb_sum = [0]\nfor i in range(N):\n a_sum.append(a_sum[i]+a[i])\nfor i in range(M):\n b_sum.append(b_sum[i]+b[i])\n\nans = 0\n\nfor i in range(N+1):\n cntA... | ['Runtime Error', 'Accepted'] | ['s250691947', 's942005296'] | [40588.0, 47624.0] | [109.0, 321.0] | [615, 601] |
p02623 | u643679148 | 2,000 | 1,048,576 | We have two desks: A and B. Desk A has a vertical stack of N books on it, and Desk B similarly has M books on it. It takes us A_i minutes to read the i-th book from the top on Desk A (1 \leq i \leq N), and 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())\naa = list(map(int, input().split()))\nbb = list(map(int, input().split()))\nans = [0]\ntime_sum = 0\ni, j = 0, 0\n\nflag_a = True\nflag_b = True\nflag = False\nfor i in range(0, len(aa)+1):\n for j in range(0, len(bb)+1):\n asum, bsum = sum(aa[:i]), sum(bb[:j])\n ... | ['Wrong Answer', 'Wrong Answer', 'Runtime Error', 'Accepted'] | ['s140775185', 's735030180', 's915260137', 's056112770'] | [40440.0, 39852.0, 40432.0, 47368.0] | [2206.0, 2206.0, 118.0, 305.0] | [570, 1045, 448, 446] |
p02623 | u648315264 | 2,000 | 1,048,576 | We have two desks: A and B. Desk A has a vertical stack of N books on it, and Desk B similarly has M books on it. It takes us A_i minutes to read the i-th book from the top on Desk A (1 \leq i \leq N), and B_i minutes to read the i-th book from the top on Desk B (1 \leq i \leq M). Consider the following action: * ... | ['A,B,time = map(int,input().split())\nlist_A = list(map(int,input().split()))\nlist_B = list(map(int,input().split()))\n\n\n\nlist_A_num = -1\nlist_B_num = -1\n\ntotal_time = 0\ncount = 0\n\nwhile total_time < time:\n if len(list_A) > 0:\n if list_A[list_A_num] <= list_B[list_B_num]: \n total_time... | ['Runtime Error', 'Accepted'] | ['s574945027', 's588353987'] | [40580.0, 47548.0] | [233.0, 291.0] | [614, 348] |
p02623 | u655048024 | 2,000 | 1,048,576 | We have two desks: A and B. Desk A has a vertical stack of N books on it, and Desk B similarly has M books on it. It takes us A_i minutes to read the i-th book from the top on Desk A (1 \leq i \leq N), and 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])\nans = 0\nj = 0\nfor i in range(N + 1): \n if a[i]>K:\n break\n while b[j] > K - a[i]:\n j -= 1... | ['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Runtime Error', 'Wrong Answer', 'Accepted'] | ['s171669580', 's845795697', 's859516159', 's878935262', 's882305007', 's938161270', 's522142995'] | [47652.0, 40516.0, 47356.0, 40520.0, 9224.0, 40580.0, 47448.0] | [218.0, 2206.0, 2207.0, 2206.0, 26.0, 2206.0, 284.0] | [340, 331, 350, 331, 304, 305, 337] |
p02623 | u655663334 | 2,000 | 1,048,576 | We have two desks: A and B. Desk A has a vertical stack of N books on it, and Desk B similarly has M books on it. It takes us A_i minutes to read the i-th book from the top on Desk A (1 \leq i \leq N), and 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\nimport bisect\nN,M,K = list(map(int, input().split()))\nAs = list(map(int, input().split()))\nBs = list(map(int, input().split()))\n\n\n# print(N + M)\n# exit()\n\n\nAsruisekiwa = []\nBsruisekiwa = []\n\nAsruisekiwa.append(As[0])\nBsruisekiwa.append(Bs[0])\n\nfor i, j in enumerate... | ['Wrong Answer', 'Accepted'] | ['s648066389', 's071508078'] | [49260.0, 49492.0] | [355.0, 354.0] | [998, 997] |
p02623 | u660466744 | 2,000 | 1,048,576 | We have two desks: A and B. Desk A has a vertical stack of N books on it, and Desk B similarly has M books on it. It takes us A_i minutes to read the i-th book from the top on Desk A (1 \leq i \leq N), and 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\ni_a = 0\ni_b = 0\n\ntotal_time = 0\n\nwhile True:\n if i_a == N and i_b == M:\n break\n else:\n if i_a == N:\n read_a = False:\n elif i_b ==M:\n read_a = T... | ['Runtime Error', 'Accepted'] | ['s725630256', 's440550505'] | [8892.0, 47372.0] | [29.0, 317.0] | [660, 403] |
p02623 | u663796637 | 2,000 | 1,048,576 | We have two desks: A and B. Desk A has a vertical stack of N books on it, and Desk B similarly has M books on it. It takes us A_i minutes to read the i-th book from the top on Desk A (1 \leq i \leq N), and 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\nmax_count = 0\nfor i in range(n):\n\ta_sum = sum(a[:i + 1])\n\tfor j in range(m):\n\t\tb_sum = sum(b[:j + 1])\n\t\tif (a_sum + b_sum <= k) && (a_sum + b_sum > max_count):\n\t\t\tmax_count = i + j + 2\nprin... | ['Runtime Error', 'Wrong Answer', 'Accepted'] | ['s308633608', 's424135173', 's855735180'] | [9044.0, 40468.0, 47500.0] | [28.0, 2206.0, 286.0] | [311, 312, 379] |
p02623 | u665038048 | 2,000 | 1,048,576 | We have two desks: A and B. Desk A has a vertical stack of N books on it, and Desk B similarly has M books on it. It takes us A_i minutes to read the i-th book from the top on Desk A (1 \leq i \leq N), and 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\n\nn, m, k = map(int, input().split())\na = [*accumulate(map(int, input().split()), initial=0)]\nb = [*accumulate(map(int, input().split()), initial=0)]\nans = 0\nfor i, x in enumerate(a):\n if x <= k:\n ans = max(i - 1 + bisect(b, k - x))\nprint(a... | ['Runtime Error', 'Accepted'] | ['s760036159', 's019971866'] | [45988.0, 41208.0] | [131.0, 233.0] | [312, 371] |
p02623 | u674343825 | 2,000 | 1,048,576 | We have two desks: A and B. Desk A has a vertical stack of N books on it, and Desk B similarly has M books on it. It takes us A_i minutes to read the i-th book from the top on Desk A (1 \leq i \leq N), and B_i minutes to read the i-th book from the top on Desk B (1 \leq i \leq M). Consider the following action: * ... | ['n,m,k = map(int,input().split())\na = list(map(int,input().split()))\nb = list(map(int,input().split()))\na_sum = [0]\nb_sum = [0]\nfor i in range(n):\n a_sum.append(a[i]+a_sum[i])\n if a_sum[i]>1e+9:\n break\nfor i in range(m):\n b_sum.append(b[i]+b_sum[i])\n if b_sum[i]>1e+9:\n break\n ... | ['Runtime Error', 'Accepted'] | ['s156408316', 's762442099'] | [40780.0, 40444.0] | [249.0, 416.0] | [574, 603] |
p02623 | u674588203 | 2,000 | 1,048,576 | We have two desks: A and B. Desk A has a vertical stack of N books on it, and Desk B similarly has M books on it. It takes us A_i minutes to read the i-th book from the top on Desk A (1 \leq i \leq N), and B_i minutes to read the i-th book from the top on Desk B (1 \leq i \leq M). Consider the following action: * ... | ['import bisect\n\nN,M,K=map(int,inp().split())\nlist_a=list(map(int,inp().split()))\nlist_b=list(map(int,inp().split()))\n\n\ntotaltame_a=[0]\nfor a in list_a:\n temp_a=totaltame_a[-1]+a\n if temp_a>K:\n break\n else:\n totaltame_a.append(temp_a)\n\n\ntotaltime_b=[0]\nfor b in list_b:\n total... | ['Runtime Error', 'Accepted'] | ['s284574276', 's859651209'] | [8968.0, 40764.0] | [22.0, 288.0] | [510, 566] |
p02623 | u685983477 | 2,000 | 1,048,576 | We have two desks: A and B. Desk A has a vertical stack of N books on it, and Desk B similarly has M books on it. It takes us A_i minutes to read the i-th book from the top on Desk A (1 \leq i \leq N), and 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\ndef main():\n n,m,k=map(int, input().split())\n a=[int(i) for i in input().split()]\n b=[int(i) for i in input().split()]\n\n ia = n-1\n res = n\n ib = 0\n time = sum(a)\n\n while(ia>=0 and ib<m):\n\n if(time > k):\n time -= (a[ia])\n res-=1\n ... | ['Runtime Error', 'Accepted'] | ['s282409780', 's092679286'] | [9044.0, 41624.0] | [28.0, 201.0] | [495, 468] |
p02623 | u686036872 | 2,000 | 1,048,576 | We have two desks: A and B. Desk A has a vertical stack of N books on it, and Desk B similarly has M books on it. It takes us A_i minutes to read the i-th book from the top on Desk A (1 \leq i \leq N), and B_i minutes to read the i-th book from the top on Desk B (1 \leq i \leq M). Consider the following action: * ... | ['import bisect\n\nN, M, K = map(int, input().split())\n\nA = list(map(int, input().split()))\nB = list(map(int, input().split()))\n\na = [0]\nb = [0]\nfor i in range(N):\n a += (a[i] + A[i])\nfor i in range(M):\n b += (b[i] + B[i])\n\nans = 0\nfor i in range(N+1):\n ans = max(ans, i + bisect.bisect_right(b, K... | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s211875080', 's540683917', 's772742574'] | [40484.0, 47416.0, 47548.0] | [112.0, 360.0, 327.0] | [323, 347, 347] |
p02623 | u687416863 | 2,000 | 1,048,576 | We have two desks: A and B. Desk A has a vertical stack of N books on it, and Desk B similarly has M books on it. It takes us A_i minutes to read the i-th book from the top on Desk A (1 \leq i \leq N), and 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 = map(int, input().split())\nNnums = list(map(int, input().split()))\nMnums = list(map(int, input().split()))\n\nNmax=len(Nnums)\nMmax=len(Mnums)\nNsum=0\nNcnt=0\n\n\nfor Ni,Nl in enumerate(Nnums):\n Nsum += Nl\n Ncnt = Ni\n if Nsum > K:\n Nsum -= Nl\n Ncnt = Ni-1\n break\... | ['Wrong Answer', 'Runtime Error', 'Wrong Answer', 'Accepted'] | ['s114618383', 's652090037', 's716729467', 's866438429'] | [41008.0, 9068.0, 40584.0, 41036.0] | [252.0, 24.0, 244.0, 245.0] | [921, 794, 866, 926] |
p02623 | u687574784 | 2,000 | 1,048,576 | We have two desks: A and B. Desk A has a vertical stack of N books on it, and Desk B similarly has M books on it. It takes us A_i minutes to read the i-th book from the top on Desk A (1 \leq i \leq N), and 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 itertools import accumulate\nimport bisect\ncumsum_a = list(accumulate(a))\ncumsum_b = list(accumulate(b))\n\nans = 0\nfor i in range(n+1):\n cnt_a = bisect.bisect(cumsum_a[:i], k)\n time = ... | ['Wrong Answer', 'Accepted'] | ['s958218122', 's437719442'] | [47500.0, 48524.0] | [2207.0, 429.0] | [673, 551] |
p02623 | u688219499 | 2,000 | 1,048,576 | We have two desks: A and B. Desk A has a vertical stack of N books on it, and Desk B similarly has M books on it. It takes us A_i minutes to read the i-th book from the top on Desk A (1 \leq i \leq N), and 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()))\ncum_a = np.r_[0,np.cumsum(a)]\n# cum_b = np.r_[0, np.cumsum(b)]\n# cum_a = np.cumsum(a)\ncum_b = np.cumsum(b)\n# high = m\n# low = 0\n\nans = 0\nfor i in range(n + 1):\n \n # while 1:\... | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s620860771', 's879371368', 's642891800'] | [58480.0, 58252.0, 58660.0] | [1073.0, 870.0, 824.0] | [805, 355, 788] |
p02623 | u692054751 | 2,000 | 1,048,576 | We have two desks: A and B. Desk A has a vertical stack of N books on it, and Desk B similarly has M books on it. It takes us A_i minutes to read the i-th book from the top on Desk A (1 \leq i \leq N), and 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\nN, M, K = [int(s) for s in input().split()]\nA = [int(s) for s in input().split()]\nB = [int(s) for s in input().split()]\ni = 0\nj = M-1\n\nB_SUM = [0] * M\nB_SUM[0] = B[0]\n\nmax_book = 0\n\nfor i in range(1, M):\n B_SUM[i] = B[i] + B_SUM[i - 1]\n if B_SUM[i] <= K:\n max_book = ... | ['Runtime Error', 'Accepted'] | ['s745714192', 's585591385'] | [40568.0, 41808.0] | [184.0, 366.0] | [560, 703] |
p02623 | u693007703 | 2,000 | 1,048,576 | We have two desks: A and B. Desk A has a vertical stack of N books on it, and Desk B similarly has M books on it. It takes us A_i minutes to read the i-th book from the top on Desk A (1 \leq i \leq N), and B_i minutes to read the i-th book from the top on Desk B (1 \leq i \leq M). Consider the following action: * ... | ['N, M, K = [int(i) for i in input().split()]\n\nAs = [int(i) for i in input().split()]\nBs = [int(i) for i in input().split()]\n\ncnt = 0\ntime = 0\nwhile time <= K:\n if As and Bs:\n if As[0] > Bs[0]:\n p = Bs.pop(0)\n elif Bs[0] >= As[0]:\n p = As.pop(0)\n else :\n el... | ['Runtime Error', 'Accepted'] | ['s036091233', 's340458697'] | [8936.0, 47548.0] | [23.0, 300.0] | [499, 456] |
p02623 | u693025087 | 2,000 | 1,048,576 | We have two desks: A and B. Desk A has a vertical stack of N books on it, and Desk B similarly has M books on it. It takes us A_i minutes to read the i-th book from the top on Desk A (1 \leq i \leq N), and B_i minutes to read the i-th book from the top on Desk B (1 \leq i \leq M). Consider the following action: * ... | ['# -*- coding: utf-8 -*-\nN, M, K = map(int, input().split())\nA = list(map(int, input().split()))\nB = list(map(int, input().split()))\n\n\nsum_A = [0]\nsum_B = [0]\nfor n in range(N):\n sum_A.append(sum_A[n]+A[n])\nfor m in range(M):\n sum_B.append(sum_B[m]+B[m])\n\nmax_j = M\nmax_book = 0\nfor i in range(N+1)... | ['Runtime Error', 'Wrong Answer', 'Accepted'] | ['s079049526', 's906787454', 's142322037'] | [47404.0, 47532.0, 47496.0] | [192.0, 468.0, 359.0] | [597, 637, 600] |
p02623 | u693173434 | 2,000 | 1,048,576 | We have two desks: A and B. Desk A has a vertical stack of N books on it, and Desk B similarly has M books on it. It takes us A_i minutes to read the i-th book from the top on Desk A (1 \leq i \leq N), and 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()))\nprog=0\na_idx=0\nb_idx=0\n\nwhile a_idx<n:\n if a[a_idx]+prog>k:\n break\n prog+=a[a_idx]\n a_idx+=1\n\nif a_idx==n:\n while b_idx<m:\n if b[b_idx]+prog>k:\n break\n ... | ['Runtime Error', 'Accepted'] | ['s444119758', 's576420267'] | [40480.0, 40452.0] | [206.0, 295.0] | [616, 650] |
p02623 | u695261159 | 2,000 | 1,048,576 | We have two desks: A and B. Desk A has a vertical stack of N books on it, and Desk B similarly has M books on it. It takes us A_i minutes to read the i-th book from the top on Desk A (1 \leq i \leq N), and 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\nif A[0] > K and B[0] > K:\n print(0)\n exit()\n\ntsundoku = [0]*(N+M)\ncurrentIndexA = 0\ncurrentIndexB = 0\nfor i in range(N+M+1):\n if currentIndexA >= N and currentIndexB < M:\n tsundoku[i]... | ['Wrong Answer', 'Accepted'] | ['s599071979', 's920147380'] | [42000.0, 47460.0] | [425.0, 374.0] | [1044, 424] |
p02623 | u695474809 | 2,000 | 1,048,576 | We have two desks: A and B. Desk A has a vertical stack of N books on it, and Desk B similarly has M books on it. It takes us A_i minutes to read the i-th book from the top on Desk A (1 \leq i \leq N), and 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()))\nminute=0\nans=0\nfor _ in range(100000000):\n if not A and not B:break\n if not A: minute+=B[0]\n if not B: minute+=A[0]\n if A[0]<B[0]: \n del A[0]\n minute += min(A[0], B[0])\n elif B[0]<... | ['Runtime Error', 'Accepted'] | ['s708400318', 's865410291'] | [39560.0, 47692.0] | [2206.0, 304.0] | [472, 338] |
p02623 | u696444274 | 2,000 | 1,048,576 | We have two desks: A and B. Desk A has a vertical stack of N books on it, and Desk B similarly has M books on it. It takes us A_i minutes to read the i-th book from the top on Desk A (1 \leq i \leq N), and 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, p = list(map(int, input().split()))\n# a = list(map(int, input().split()))\n#\n\n# a = int(input())\n# w = list(map(int, input().split()))\n\n# a = list(map(int, input().split()))\n\n\na = list(map(int, input().split()))\nb = list(map(int, input().split()))\n\n\n# print(min(15*n, 100*(n//10+1), 100*(n//10)+15*(... | ['Wrong Answer', 'Accepted'] | ['s202430666', 's144170039'] | [54776.0, 47432.0] | [2207.0, 278.0] | [979, 878] |
p02623 | u696499790 | 2,000 | 1,048,576 | We have two desks: A and B. Desk A has a vertical stack of N books on it, and Desk B similarly has M books on it. It takes us A_i minutes to read the i-th book from the top on Desk A (1 \leq i \leq N), and B_i minutes to read the i-th book from the top on Desk B (1 \leq i \leq M). Consider the following action: * ... | ['N,M,K=map(int,input().split())\nA=list(map(int,input().split()))\nB=list(map(int,input().split()))\nfor i in range(1,N):\n A[i]+=A[i-1]\nfor i in range(1,M):\n B[i]+=B[i-1]\n\nj,best=0,0\nfor j in range(M):\n if B[j] > K: break\n else:best=j+1\nfor i in range(N):\n if A[i]>K:break\n c = K-A[i]\n while j < M:\n... | ['Wrong Answer', 'Runtime Error', 'Wrong Answer', 'Accepted'] | ['s474924173', 's747614755', 's965333668', 's544837499'] | [40460.0, 8920.0, 40532.0, 39964.0] | [291.0, 25.0, 310.0, 316.0] | [402, 379, 379, 337] |
p02623 | u701513230 | 2,000 | 1,048,576 | We have two desks: A and B. Desk A has a vertical stack of N books on it, and Desk B similarly has M books on it. It takes us A_i minutes to read the i-th book from the top on Desk A (1 \leq i \leq N), and 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\nsumA = sum(A)\n\nans = []\nprint(A,B)\n\nfor i in range(N):\n sumB = 0\n sumB = sum(B)\n for j in range(M):\n S = sumA + sumB\n sumB -= B[M-1-j]\n if S > K:\n continue\n else:\n ans.a... | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s151615503', 's733310824', 's652366796'] | [40736.0, 40444.0, 48572.0] | [2211.0, 2211.0, 273.0] | [423, 400, 341] |
p02623 | u705418271 | 2,000 | 1,048,576 | We have two desks: A and B. Desk A has a vertical stack of N books on it, and Desk B similarly has M books on it. It takes us A_i minutes to read the i-th book from the top on Desk A (1 \leq i \leq N), and B_i minutes to read the i-th book from the top on Desk B (1 \leq i \leq M). Consider the following action: * ... | ['n,m,k=map(int,input().split())\na=[0]+list(map(int,input().split()))\nb=[0]+list(map(int,input().split()))\nfor i in range(1,n+1):\n a[i]+=a[i-1]\n\ni=n\ntotal=0\nans=0\nfor j in range(m+1):\n total+=b[j]\n while i>=0 and a[i]+total>k:\n i-=1\n if a[i]+total<=k:\n ans=max(ans,i+j)', 'N,M,K=map(int,input().s... | ['Wrong Answer', 'Accepted'] | ['s235602592', 's511818506'] | [39944.0, 47356.0] | [287.0, 287.0] | [277, 364] |
p02623 | u709970295 | 2,000 | 1,048,576 | We have two desks: A and B. Desk A has a vertical stack of N books on it, and Desk B similarly has M books on it. It takes us A_i minutes to read the i-th book from the top on Desk A (1 \leq i \leq N), and 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\nimport numpy as np\nn,m,k = map(int,input().split())\nA = deque(map(int,input().split()))\nB = deque(map(int,input().split()))\n\na=[0]\nb = [0]\nfor i in range(n):\n a.append(a[i-1]+A[i])\nfor i in range(m):\n b.append(b[i-1]+B[i])\n\nx,j = 0,m\nfor i in range(n+1):\n if a[i]>... | ['Wrong Answer', 'Accepted'] | ['s165661364', 's163111170'] | [66588.0, 66248.0] | [1606.0, 1534.0] | [386, 383] |
p02623 | u713492631 | 2,000 | 1,048,576 | We have two desks: A and B. Desk A has a vertical stack of N books on it, and Desk B similarly has M books on it. It takes us A_i minutes to read the i-th book from the top on Desk A (1 \leq i \leq N), and 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(a[i] + A[i])\n\nans, j = o, M\n\nfor i in range(N + 1):\n if a[i] > K:\n break\n while b[j] > K... | ['Runtime Error', 'Accepted'] | ['s096493251', 's002725850'] | [47548.0, 47316.0] | [194.0, 309.0] | [364, 364] |
p02623 | u718949306 | 2,000 | 1,048,576 | We have two desks: A and B. Desk A has a vertical stack of N books on it, and Desk B similarly has M books on it. It takes us A_i minutes to read the i-th book from the top on Desk A (1 \leq i \leq N), and B_i minutes to read the i-th book from the top on Desk B (1 \leq i \leq M). Consider the following action: * ... | ['from collections import deque\nN, M, K = map(int, input().split())\nA = list(map(int, input().split()))\nB = list(map(int, input().split()))\nC = N + M\ncnt = 0\nres = 0\nA = deque(A)\nB = deque(B)\nfor c in range(C):\n if A:\n a = A.popleft()\n else:\n a = 10**10+1\n if B:\n b = B.pople... | ['Wrong Answer', 'Runtime Error', 'Accepted'] | ['s499812327', 's683456394', 's781683468'] | [42100.0, 48396.0, 46868.0] | [280.0, 343.0, 295.0] | [510, 382, 371] |
p02623 | u723345499 | 2,000 | 1,048,576 | We have two desks: A and B. Desk A has a vertical stack of N books on it, and Desk B similarly has M books on it. It takes us A_i minutes to read the i-th book from the top on Desk A (1 \leq i \leq N), and B_i minutes to read the i-th book from the top on Desk B (1 \leq i \leq M). Consider the following action: * ... | ['n, m, k = map(int, input().split())\na = list(map(int, input().split()))\nb = list(map(int, input().split()))\n\na_sum = [0]\nb_sum = [0]\nfor i in range(n):\n a_sum.append(a_sum[i] + a[i])\nfor i in range(m):\n b_sum.append(b_sum[j] + b[j])\n \nans, j = 0, m\nfor i in range(n + 1):\n if a_sum[i] > k:\n ... | ['Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted'] | ['s209831996', 's407084005', 's848532474', 's433305940'] | [40632.0, 40408.0, 40632.0, 47336.0] | [148.0, 151.0, 138.0, 305.0] | [402, 402, 390, 402] |
p02623 | u726823037 | 2,000 | 1,048,576 | We have two desks: A and B. Desk A has a vertical stack of N books on it, and Desk B similarly has M books on it. It takes us A_i minutes to read the i-th book from the top on Desk A (1 \leq i \leq N), and 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()))\nb = sum(B)\nka = k\ni = m\nre = 0\nfor a in A:\n if ka < 0:\n break\n while ka < b and i > 0:\n b -= B[i]\n i -= 1\n ka -= a\n re += 1\n \nprint(re+i)', 'n,m,k = list(map(int,input().split()))... | ['Runtime Error', 'Accepted'] | ['s156828138', 's407770660'] | [40552.0, 40544.0] | [137.0, 221.0] | [260, 303] |
p02623 | u731436822 | 2,000 | 1,048,576 | We have two desks: A and B. Desk A has a vertical stack of N books on it, and Desk B similarly has M books on it. It takes us A_i minutes to read the i-th book from the top on Desk A (1 \leq i \leq N), and B_i minutes to read the i-th book from the top on Desk B (1 \leq i \leq M). Consider the following action: * ... | ['# ABC C-Tsundoku\nn,m,k = map(int,input().split())\nan = list(map(int,input().split()))\nbn = list(map(int,input().split()))\n\nsuma = [0]\nsumb = [0]\na = 0\nb = 0\nfor i in an:\n a += i\n suma.append(a)\nfor i in bn:\n b += i\n sumb.append(b)\n\nres = [0]\nl = m\nfor j in range(n+1):\n if k-suma[j] <... | ['Wrong Answer', 'Wrong Answer', 'Runtime Error', 'Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s526334697', 's884072039', 's913681157', 's913719113', 's926572399', 's706583705'] | [49700.0, 40440.0, 9040.0, 40620.0, 40648.0, 50684.0] | [279.0, 2206.0, 26.0, 2206.0, 2206.0, 282.0] | [412, 348, 409, 446, 446, 449] |
p02623 | u733866054 | 2,000 | 1,048,576 | We have two desks: A and B. Desk A has a vertical stack of N books on it, and Desk B similarly has M books on it. It takes us A_i minutes to read the i-th book from the top on Desk A (1 \leq i \leq N), and 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()))\nC=A+B\nd=0\nC.sort()\nif sum(C)<=K :\n print(len(C))\n sys.exit()\nfor i in range(len(C)) :\n d=d+C[i]\n if d>K :\n print(i+1)\n sys.exit()', 'N,M,K=map(int,input().split())\nA=lis... | ['Wrong Answer', 'Accepted'] | ['s746250317', 's436823533'] | [40760.0, 47648.0] | [302.0, 295.0] | [263, 493] |
p02623 | u734423776 | 2,000 | 1,048,576 | We have two desks: A and B. Desk A has a vertical stack of N books on it, and Desk B similarly has M books on it. It takes us A_i minutes to read the i-th book from the top on Desk A (1 \leq i \leq N), and 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\nwhile K > 0:\n if not A == [] and not B == []:\n if A[0] >= B[0]:\n K = K - A[0]\n A.remove(A[0])\n if K >= 0:\n c += 1\n else:\n ... | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s040489334', 's168065422', 's985811759'] | [41644.0, 41748.0, 47328.0] | [2206.0, 2206.0, 307.0] | [608, 600, 363] |
p02623 | u735891571 | 2,000 | 1,048,576 | We have two desks: A and B. Desk A has a vertical stack of N books on it, and Desk B similarly has M books on it. It takes us A_i minutes to read the i-th book from the top on Desk A (1 \leq i \leq N), and 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 bisect\nN, M, K = map(int,input().split())\nA = list(map(int, input().split())) \nB = list(map(int, input().split())) \n\nA_ = list(itertools.accumulate(A))\nB_ = list(itertools.accumulate(B))\n\n\nl = len(A_)\nans = max(ans, bisect.bisect_right(B_, K))\nfor idx, i in enumerate(A_):\n if i <... | ['Runtime Error', 'Accepted'] | ['s956410072', 's718717486'] | [47384.0, 47524.0] | [146.0, 289.0] | [386, 393] |
p02623 | u736470924 | 2,000 | 1,048,576 | We have two desks: A and B. Desk A has a vertical stack of N books on it, and Desk B similarly has M books on it. It takes us A_i minutes to read the i-th book from the top on Desk A (1 \leq i \leq N), and 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 import numpy as np\n\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_cumsum = np.cumsum(A)\n B_cumsum = np.cumsum(B)\n\n ans = 0\n j = M\n for i in range(N + 1):\n if A_cumsum[i] > K:\n ... | ['Runtime Error', 'Accepted'] | ['s519693319', 's435954364'] | [58600.0, 58736.0] | [241.0, 488.0] | [433, 433] |
p02623 | u739843002 | 2,000 | 1,048,576 | We have two desks: A and B. Desk A has a vertical stack of N books on it, and Desk B similarly has M books on it. It takes us A_i minutes to read the i-th book from the top on Desk A (1 \leq i \leq N), and 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 getIntList(strList):\n return list(map(lambda x: int(x), strList))\n\nN, M, K = getIntList(input().split(" "))\nA = getIntList(input().split(" "))\nB = getIntList(input().split(" "))\n\nTA = 0\nT = [0]\ncnt = [] # idx = n of B books\n\nfor i in range(len(A)):\n TA += A[i]\n if TA <= K:\n T.append(TA)\n els... | ['Wrong Answer', 'Accepted'] | ['s960454139', 's566021980'] | [139848.0, 49964.0] | [2336.0, 313.0] | [569, 572] |
p02623 | u744920373 | 2,000 | 1,048,576 | We have two desks: A and B. Desk A has a vertical stack of N books on it, and Desk B similarly has M books on it. It takes us A_i minutes to read the i-th book from the top on Desk A (1 \leq i \leq N), and B_i minutes to read the i-th book from the top on Desk B (1 \leq i \leq M). Consider the following action: * ... | ["import sys\nsys.setrecursionlimit(10**8)\ndef ii(): return int(sys.stdin.readline())\ndef mi(): return map(int, sys.stdin.readline().split())\ndef li(): return list(map(int, sys.stdin.readline().split()))\ndef li2(N): return [list(map(int, sys.stdin.readline().split())) for i in range(N)]\ndef dp2(ini, i, j): return ... | ['Wrong Answer', 'Accepted'] | ['s276440065', 's907697419'] | [42892.0, 41056.0] | [418.0, 261.0] | [2409, 1202] |
p02623 | u752907966 | 2,000 | 1,048,576 | We have two desks: A and B. Desk A has a vertical stack of N books on it, and Desk B similarly has M books on it. It takes us A_i minutes to read the i-th book from the top on Desk A (1 \leq i \leq N), and 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\nsa = [0]*len(a)\nsa[0] = a[0]\nfor i,k in enumerate(a):\n if i == 0:continue\n sa[i] = sa[i-1] + a[i]\nsb = [0]*len(b)\nsb[0] = b[0]\nfor i,k in enumerate(b):\n if i == 0:continue\n sb[i] = sb[i-1... | ['Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted'] | ['s431059398', 's532514247', 's766430458', 's789351566'] | [47488.0, 48508.0, 47452.0, 47348.0] | [483.0, 491.0, 203.0, 306.0] | [587, 567, 425, 425] |
p02623 | u753971348 | 2,000 | 1,048,576 | We have two desks: A and B. Desk A has a vertical stack of N books on it, and Desk B similarly has M books on it. It takes us A_i minutes to read the i-th book from the top on Desk A (1 \leq i \leq N), and 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 = input()\nn = input()\nm = input()\nfirst = a.split(" ")\nN = n.split(" ")\nM = m.split(" ")\noverflow = 0\nfor i in N:\n if int(i) >= 10**9:\n overflow = 1\n break\n \nfor i in M:\n if int(i) >= 10**9:\n overflow = 1\n break\nif first[0] >= 200000 or first[1] >= 200000:\n ... | ['Runtime Error', 'Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s368944554', 's778601866', 's965034943', 's711502978'] | [41520.0, 41576.0, 54472.0, 47552.0] | [146.0, 1186.0, 317.0, 301.0] | [1193, 1121, 401, 384] |
p02623 | u755180064 | 2,000 | 1,048,576 | We have two desks: A and B. Desk A has a vertical stack of N books on it, and Desk B similarly has M books on it. It takes us A_i minutes to read the i-th book from the top on Desk A (1 \leq i \leq N), and B_i minutes to read the i-th book from the top on Desk B (1 \leq i \leq M). Consider the following action: * ... | ["\ndef main():\n n, m, k = list(map(int, input().split()))\n a_books = list(map(int, input().split()))\n b_books = list(map(int, input().split()))\n a_idx = -1\n b_idx = -1\n sumbooks = sum(a_books) + sum(b_books)\n count = len(a_books) + len(b_books)\n if a_books[0] > k and b_books[0] > k:\n ... | ['Wrong Answer', 'Accepted'] | ['s759808989', 's647515996'] | [41156.0, 47548.0] | [113.0, 226.0] | [1024, 556] |
p02623 | u756279759 | 2,000 | 1,048,576 | We have two desks: A and B. Desk A has a vertical stack of N books on it, and Desk B similarly has M books on it. It takes us A_i minutes to read the i-th book from the top on Desk A (1 \leq i \leq N), and 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', 'Accepted'] | ['s504589065', 's976560066'] | [8864.0, 47376.0] | [31.0, 290.0] | [346, 348] |
p02623 | u757117214 | 2,000 | 1,048,576 | We have two desks: A and B. Desk A has a vertical stack of N books on it, and Desk B similarly has M books on it. It takes us A_i minutes to read the i-th book from the top on Desk A (1 \leq i \leq N), and 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\nN,M,K = map(int,input().split())\nA = np.array(input().split(),dtype=int)\nB = np.array(input().split(),dtype=int)\n\nAA = np.insert(A,0,0)\nBB = np.insert(B,0,0)\nAAA = np.cumsum(AA)\nBBB = np.cumsum(BB)\nmax_mins = 0\nmax_books = 0\nfor a in enumerate(AAA):\n if a[1] > K:\n break\n ... | ['Runtime Error', 'Accepted'] | ['s788341563', 's720750902'] | [56864.0, 56624.0] | [222.0, 714.0] | [477, 455] |
p02623 | u760527120 | 2,000 | 1,048,576 | We have two desks: A and B. Desk A has a vertical stack of N books on it, and Desk B similarly has M books on it. It takes us A_i minutes to read the i-th book from the top on Desk A (1 \leq i \leq N), and 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 = [int(n) for n in input().split()]\nA = [int(n) for n in input().split()]\nB = [int(n) for n in input().split()]\n\nA = [a for a in np.cumsum([0] + A) if a <= k]\nB = [b for b in np.cumsum([0] + B) if b <= k]\nB, A = sorted((A, B), key=len)\nfor i, a in enumerate(A[::-1]):\n for j, b i... | ['Wrong Answer', 'Runtime Error', 'Wrong Answer', 'Accepted'] | ['s403669398', 's833996176', 's907228248', 's056474844'] | [57564.0, 8996.0, 58504.0, 58452.0] | [402.0, 26.0, 2206.0, 541.0] | [468, 521, 421, 410] |
p02623 | u760961723 | 2,000 | 1,048,576 | We have two desks: A and B. Desk A has a vertical stack of N books on it, and Desk B similarly has M books on it. It takes us A_i minutes to read the i-th book from the top on Desk A (1 \leq i \leq N), and 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\nfrom collections import deque\n\nsys.setrecursionlimit(1000000)\nMOD = 10 ** 9 + 7\ninput = lambda: sys.stdin.readline().strip()\n\nNI = lambda: int(input())\nNMI = lambda: map(int, input().split())\nNLI = lambda: list(NMI())\nSI = lambda: input()\n\ndef ... | ['Wrong Answer', 'Accepted'] | ['s231862587', 's027969390'] | [47768.0, 47992.0] | [2210.0, 265.0] | [1094, 1094] |
p02623 | u764956288 | 2,000 | 1,048,576 | We have two desks: A and B. Desk A has a vertical stack of N books on it, and Desk B similarly has M books on it. It takes us A_i minutes to read the i-th book from the top on Desk A (1 \leq i \leq N), and B_i minutes to read the i-th book from the top on Desk B (1 \leq i \leq M). Consider the following action: * ... | ['import sys\nsys.setrecursionlimit(10**1000000000)\n\n# readline = sys.stdin.readline\n# generator = (readline().strip() for _ in range(N))\n\n# N, M = map(int, input().split())\n# As = list(map(int, input().split()))\n# queries = (input() for _ in range(N))\n\n\ndef solve():\n N, M, K = map(int, input().split())\n... | ['Time Limit Exceeded', 'Wrong Answer', 'Accepted'] | ['s586909328', 's720743740', 's972388429'] | [17960.0, 9048.0, 41140.0] | [2206.0, 29.0, 153.0] | [872, 605, 607] |
p02623 | u771007149 | 2,000 | 1,048,576 | We have two desks: A and B. Desk A has a vertical stack of N books on it, and Desk B similarly has M books on it. It takes us A_i minutes to read the i-th book from the top on Desk A (1 \leq i \leq N), and 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\nfrom itertools import accumulate\nimport bisect\n\nn,m,k = map(int,input().split())\na = deque(map(int,input().split()))\nb = deque(map(int,input().split()))\n\ncnt = 0\n\na_c = list(accumulate(list(a)))\nb_c = list(accumulate(list(b)))\nresult = []\n\nidx_a = bisect.bisect_left(a_c,k)\nidx_a_b = bisect.bisect_le... | ['Runtime Error', 'Accepted'] | ['s964486901', 's906403341'] | [9084.0, 51232.0] | [29.0, 294.0] | [981, 440] |
p02623 | u773081031 | 2,000 | 1,048,576 | We have two desks: A and B. Desk A has a vertical stack of N books on it, and Desk B similarly has M books on it. It takes us A_i minutes to read the i-th book from the top on Desk A (1 \leq i \leq N), and 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]\n\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 -=... | ['Runtime Error', 'Accepted'] | ['s613655618', 's575719100'] | [8988.0, 47656.0] | [23.0, 282.0] | [333, 346] |
p02623 | u779170803 | 2,000 | 1,048,576 | We have two desks: A and B. Desk A has a vertical stack of N books on it, and Desk B similarly has M books on it. It takes us A_i minutes to read the i-th book from the top on Desk A (1 \leq i \leq N), and B_i minutes to read the i-th book from the top on Desk B (1 \leq i \leq M). Consider the following action: * ... | ["INT = lambda: int(input())\nINTM = lambda: map(int,input().split())\nSTRM = lambda: map(str,input().split())\nSTR = lambda: str(input())\nLIST = lambda: list(map(int,input().split()))\nLISTS = lambda: list(map(str,input().split()))\ndef do(): \n n,m,k=INTM()\n A=LIST()\n B=LIST()\n As=[0]*(n+1)\n Bs=[0... | ['Wrong Answer', 'Accepted'] | ['s200888620', 's735928253'] | [41044.0, 41192.0] | [262.0, 263.0] | [974, 973] |
p02623 | u785573018 | 2,000 | 1,048,576 | We have two desks: A and B. Desk A has a vertical stack of N books on it, and Desk B similarly has M books on it. It takes us A_i minutes to read the i-th book from the top on Desk A (1 \leq i \leq N), and 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]\nfor i in range(n):\n c.append(a[i]+c[i])\nfor i in range)m:\n d.append(b[i]+d[i])\ne = 0\nfor i in range(n+1):\n if a[i] > k:\n break;\n while b[m] > k-a[i]:\n m -... | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s650820468', 's706980236', 's783524117'] | [8980.0, 47364.0, 47340.0] | [22.0, 190.0, 285.0] | [336, 337, 337] |
p02623 | u790476785 | 2,000 | 1,048,576 | We have two desks: A and B. Desk A has a vertical stack of N books on it, and Desk B similarly has M books on it. It takes us A_i minutes to read the i-th book from the top on Desk A (1 \leq i \leq N), and B_i minutes to read the i-th book from the top on Desk B (1 \leq i \leq M). Consider the following action: * ... | ['n,m,k = map(int, input().split())\na = list(map(int, input().split()))\nb = list(map(int, input().split()))\n\ncount = 0\nnow_a = 0\nnow_b = 0\nwhile k > 0 and a[now_a] < k or b[now_b] < k:\n if a[0] > b[0] and now_a > len(a) or now_b < len(b):\n k -= b[now_b]\n now_b += 1\n else:\n k -= a[now_a]\n now_... | ['Runtime Error', 'Accepted'] | ['s625818753', 's382671545'] | [40600.0, 48808.0] | [299.0, 276.0] | [341, 373] |
p02623 | u791449906 | 2,000 | 1,048,576 | We have two desks: A and B. Desk A has a vertical stack of N books on it, and Desk B similarly has M books on it. It takes us A_i minutes to read the i-th book from the top on Desk A (1 \leq i \leq N), and 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\n\na_sum = [0]\nfor i, minute in enumerate(a):\n a_sum.append(a_sum(i)+minute)\nb_sum = [0]\nfor i, minute in enumerate(b):\n b_sum.append(b_sum(i)+minute)\n\nB = m\nans_list = []\n\nfo... | ['Runtime Error', 'Runtime Error', 'Wrong Answer', 'Runtime Error', 'Wrong Answer', 'Accepted'] | ['s362790161', 's552362525', 's577934325', 's605853088', 's926822533', 's697641592'] | [42300.0, 40440.0, 49088.0, 40384.0, 48904.0, 47552.0] | [115.0, 113.0, 2207.0, 109.0, 2207.0, 275.0] | [612, 392, 681, 392, 676, 393] |
p02623 | u796878730 | 2,000 | 1,048,576 | We have two desks: A and B. Desk A has a vertical stack of N books on it, and Desk B similarly has M books on it. It takes us A_i minutes to read the i-th book from the top on Desk A (1 \leq i \leq N), and B_i minutes to read the i-th book from the top on Desk B (1 \leq i \leq M). Consider the following action: * ... | ['N,M,K = map(int,input().split(" "))\n\nA = list(map(int,input().split(" ")))\nB = list(map(int,input().split(" ")))\n\ntime_A = [0]*(N+1)\ntime_B = [0]*(M+1)\n\nfor i in range(N):\n time_A[i+1] = time_A[i] + A[i]\nprint(time_A)\nfor j in range(M):\n time_B[j+1] = time_B[j] + B[j]\n\nans = 0\nl = M\n\nfor k in r... | ['Wrong Answer', 'Accepted'] | ['s626642159', 's799895310'] | [50960.0, 47684.0] | [315.0, 296.0] | [443, 419] |
p02623 | u798260206 | 2,000 | 1,048,576 | We have two desks: A and B. Desk A has a vertical stack of N books on it, and Desk B similarly has M books on it. It takes us A_i minutes to read the i-th book from the top on Desk A (1 \leq i \leq N), and 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 ... | ['Wrong Answer', 'Accepted'] | ['s468045616', 's205660272'] | [47308.0, 47464.0] | [246.0, 287.0] | [342, 344] |
p02623 | u799215419 | 2,000 | 1,048,576 | We have two desks: A and B. Desk A has a vertical stack of N books on it, and Desk B similarly has M books on it. It takes us A_i minutes to read the i-th book from the top on Desk A (1 \leq i \leq N), and 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\nfrom collections import deque\n\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, len(A)+1):\n A[i] += A[i-1]\nfor i in range(1, len(B)+1):\n B[i] += B[i-1]\n\nindexB = len(B) - 1\nresults = [0]\nfor i i... | ['Runtime Error', 'Runtime Error', 'Wrong Answer', 'Accepted'] | ['s701651697', 's748880969', 's763628418', 's760595739'] | [40704.0, 40584.0, 40732.0, 40612.0] | [142.0, 179.0, 135.0, 314.0] | [464, 480, 468, 474] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.