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 |
|---|---|---|---|---|---|---|---|---|---|---|
p02703 | u875541136 | 2,000 | 1,048,576 | There are N cities numbered 1 to N, connected by M railroads. You are now at City 1, with 10^{100} gold coins and S silver coins in your pocket. The i-th railroad connects City U_i and City V_i bidirectionally, and a one- way trip costs A_i silver coins and takes B_i minutes. You cannot use gold coins to pay the fare... | ['from heapq import *\n\nT = [[10**18 for _ in range(2451)] for _ in range(N)]\n\nact = [[] for _ in range(N)]\n\nN, M, S = tuple(map(int, input().split()))\n\nfor i in range(M):\n U, V, A, B = tuple(map(int, input().split()))\n maxV = max(maxV, A)\n U -= 1\n V -= 1\n act[U] += [(V, A, B)]\n act[V] += [(U, A, B)]... | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s413592902', 's414709127', 's859412922'] | [9248.0, 9104.0, 25992.0] | [21.0, 25.0, 884.0] | [866, 844, 918] |
p02703 | u906501980 | 2,000 | 1,048,576 | There are N cities numbered 1 to N, connected by M railroads. You are now at City 1, with 10^{100} gold coins and S silver coins in your pocket. The i-th railroad connects City U_i and City V_i bidirectionally, and a one- way trip costs A_i silver coins and takes B_i minutes. You cannot use gold coins to pay the fare... | ['def main():\n n, m, s = map(int, input().split())\n fr, al, bl, cl, dl = [dict() for _ in range(n)], [None]*m, [None]*m, [None]*n, [None]*n\n for i in range(m):\n u, v, a, b = map(int, input().split())\n fr[u-1][i] = v-1\n fr[v-1][i] = u-1\n al[i] = a\n bl[i] = b\n for i... | ['Runtime Error', 'Accepted'] | ['s190057781', 's667710464'] | [11204.0, 43772.0] | [295.0, 1198.0] | [1611, 1881] |
p02703 | u923172145 | 2,000 | 1,048,576 | There are N cities numbered 1 to N, connected by M railroads. You are now at City 1, with 10^{100} gold coins and S silver coins in your pocket. The i-th railroad connects City U_i and City V_i bidirectionally, and a one- way trip costs A_i silver coins and takes B_i minutes. You cannot use gold coins to pay the fare... | ['from heapq import heapify,heappush,heappop\nN, M, S = map(int, input().split())\n\nI = [[] for _ in range(N)]\nfor i in range(M):\n U, V, A, B = map(int, input().split())\n U -= 1\n V -= 1\n I[U].append((U,A,B))\n I[V].append((V,A,B))\n\nCD = [list(map(int, input().split())) for j in range(N)]\n \ntask = [] \nu... | ['Wrong Answer', 'Accepted'] | ['s543312011', 's696347311'] | [9240.0, 98312.0] | [28.0, 1153.0] | [1070, 2273] |
p02703 | u994988729 | 2,000 | 1,048,576 | There are N cities numbered 1 to N, connected by M railroads. You are now at City 1, with 10^{100} gold coins and S silver coins in your pocket. The i-th railroad connects City U_i and City V_i bidirectionally, and a one- way trip costs A_i silver coins and takes B_i minutes. You cannot use gold coins to pay the fare... | ['import heapq\nimport sys\ninput = sys.stdin.buffer.readline\nsys.setrecursionlimit(10 ** 7)\n\nN, M, S = map(int, input().split())\nedge = [[] for _ in range(N)]\nfor _ in range(M):\n u, v, a, b = map(int, input().split())\n u -= 1\n v -= 1\n edge[u].append((v, a, b))\n edge[v].append((u, a, b))\nCD = ... | ['Time Limit Exceeded', 'Accepted'] | ['s006992591', 's054544282'] | [10312.0, 55000.0] | [2206.0, 1547.0] | [1211, 1243] |
p02704 | u389910364 | 2,000 | 1,048,576 | Given are an integer N and arrays S, T, U, and V, each of length N. Construct an N×N matrix a that satisfy the following conditions: * a_{i,j} is an integer. * 0 \leq a_{i,j} \lt 2^{64}. * If S_{i} = 0, the bitwise AND of the elements in the i-th row is U_{i}. * If S_{i} = 1, the bitwise OR of the elements in ... | ['import os\n\nimport sys\nimport numpy as np\n\nfrom libs.debug import debug\n\nif os.getenv("LOCAL"):\n sys.stdin = open("_in.txt", "r")\n\nsys.setrecursionlimit(10 ** 9)\nINF = float("inf")\nIINF = 10 ** 18\nMOD = 10 ** 9 + 7\n# MOD = 998244353\n\n\nN = int(sys.stdin.buffer.readline())\nrow_or = list(map(int, sys... | ['Runtime Error', 'Accepted'] | ['s937285473', 's247066428'] | [27064.0, 38620.0] | [108.0, 1979.0] | [4340, 4568] |
p02704 | u493130708 | 2,000 | 1,048,576 | Given are an integer N and arrays S, T, U, and V, each of length N. Construct an N×N matrix a that satisfy the following conditions: * a_{i,j} is an integer. * 0 \leq a_{i,j} \lt 2^{64}. * If S_{i} = 0, the bitwise AND of the elements in the i-th row is U_{i}. * If S_{i} = 1, the bitwise OR of the elements in ... | ['import numpy as np\n\nN = int(input())\n\nS = np.array(list(map(int,input().split())),dtype = np.int64)\nT = np.array(list(map(int,input().split())),dtype = np.int64)\nU = np.array(list(map(int,input().split())),dtype = np.int64)\nV = np.array(list(map(int,input().split())),dtype = np.int64)\n\nans = np.zeros((N,N),d... | ['Runtime Error', 'Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Runtime Error', 'Runtime Error', 'Accepted'] | ['s036285914', 's058015330', 's179065029', 's198852640', 's243216661', 's460975733', 's566317148', 's625327662', 's946245993', 's975285944', 's264368601'] | [27300.0, 40956.0, 41352.0, 37480.0, 27592.0, 41128.0, 27256.0, 41556.0, 41284.0, 27008.0, 37348.0] | [114.0, 1225.0, 2207.0, 933.0, 1570.0, 1244.0, 2206.0, 1388.0, 1322.0, 115.0, 951.0] | [3074, 3197, 3738, 2044, 3817, 3662, 3830, 3652, 3652, 3076, 2034] |
p02705 | u428246454 | 2,000 | 1,048,576 | Print the circumference of a circle of radius R. | ['import math\nR = int(input())\ncircumference = 2 * math.pi * R\nprint("%.20f" % circumference())', 'PI = 3.14159265\ndef circumference(r):\n return (2 * PI * r)', 'import math\nR = float(input())\ncircumference = 2 * math.pi * R\nprint("%.20f" % circumference)'] | ['Runtime Error', 'Wrong Answer', 'Accepted'] | ['s143786585', 's632150499', 's288226694'] | [9124.0, 9016.0, 9116.0] | [19.0, 21.0, 22.0] | [93, 61, 93] |
p02706 | u003855259 | 2,000 | 1,048,576 | Takahashi has N days of summer vacation. His teacher gave him M summer assignments. It will take A_i days for him to do the i-th assignment. He cannot do multiple assignments on the same day, or hang out on a day he does an assignment. What is the maximum number of days Takahashi can hang out during the vacation if ... | ['N=()\nM=()\nA=()\n\nN=int(input(""))\nM=int(input(""))\n \nfor i in range (0,M):\n A=int(input(""))\n N=(N-A)\n \nif N<0:\n print("-1")\nelse:\n print(N)', 'N=()\nM=()\nA=()\n\nN=int(input(""))\nM=int(input(""))\n \nfor i in range (0,M):\n A=int(input(""))\n N=(N-A)\n ... | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s219739258', 's986095827', 's111783705'] | [9184.0, 8888.0, 10008.0] | [24.0, 21.0, 24.0] | [169, 169, 176] |
p02706 | u004233621 | 2,000 | 1,048,576 | Takahashi has N days of summer vacation. His teacher gave him M summer assignments. It will take A_i days for him to do the i-th assignment. He cannot do multiple assignments on the same day, or hang out on a day he does an assignment. What is the maximum number of days Takahashi can hang out during the vacation if ... | ['n,m = input().split()\nadd = 0\nn = int(n)\nm = int(m)\nlst = list(map(int,input().split()))\nfor i in lst:\n add += i\nif add>n :\n print(-1)\nelif(add = n):\n print(0)\nelse:\n print(n-add)', 'n,m = input().split()\nadd = 0\nn = int(n)\n\nm = int(m)\n\nfor i in range(m):\n lst = list(map(int,input().split()))\... | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s036688344', 's116679794', 's537180238'] | [8960.0, 8980.0, 10108.0] | [22.0, 21.0, 27.0] | [183, 206, 184] |
p02706 | u006425112 | 2,000 | 1,048,576 | Takahashi has N days of summer vacation. His teacher gave him M summer assignments. It will take A_i days for him to do the i-th assignment. He cannot do multiple assignments on the same day, or hang out on a day he does an assignment. What is the maximum number of days Takahashi can hang out during the vacation if ... | ['n, m = map(int, input().split())\nA = list(map(int, input().split()))\n\nhomework = A.sum()\nprint(n - m if n - m >= 0 else -1)', 'n, m = map(int, input().split())\nA = list(map(int, input().split()))\n\nhomework = sum(A) \nprint(n - m if n - m >= 0 else -1)', 'n, m = map(int, input().split())\nA = list(map(int, inpu... | ['Runtime Error', 'Wrong Answer', 'Accepted'] | ['s161432771', 's597797477', 's855111305'] | [10164.0, 10028.0, 10032.0] | [21.0, 22.0, 22.0] | [123, 123, 138] |
p02706 | u018591138 | 2,000 | 1,048,576 | Takahashi has N days of summer vacation. His teacher gave him M summer assignments. It will take A_i days for him to do the i-th assignment. He cannot do multiple assignments on the same day, or hang out on a day he does an assignment. What is the maximum number of days Takahashi can hang out during the vacation if ... | ['n,m = map(int, input().split())\n\na = list(map(int,input().split()))\n\ndays = 0\n\nfor i in range(m):\n days += a[i]\n\nremaining = n-days\n\nif remaining < 0:\n print(-1)\nelse:\n print(remainig)', 'n,m = map(int, input().split())\n\na = list(map(int,input().split()))\n\ndays = 0\n\nfor i in range(m):\n ... | ['Runtime Error', 'Accepted'] | ['s863875602', 's644376240'] | [10064.0, 10000.0] | [23.0, 24.0] | [193, 194] |
p02706 | u018679195 | 2,000 | 1,048,576 | Takahashi has N days of summer vacation. His teacher gave him M summer assignments. It will take A_i days for him to do the i-th assignment. He cannot do multiple assignments on the same day, or hang out on a day he does an assignment. What is the maximum number of days Takahashi can hang out during the vacation if ... | ['x, y = [int(x) for x in input().split()]\n\nfor tareas in range(y):\n\n c = int(input())\n\n x-=c\nprint(x)\n\n', 'dias,tareas=input().split()\ndias=int(dias)\ntareas=int(tareas)\ntodas=input().split()\nsuma=0\nfor cada in todas:\n suma+=int(cada)\nif suma<=dias:\n print(dias-suma)\nelse:\n print(-1)'] | ['Runtime Error', 'Accepted'] | ['s561658263', 's147257512'] | [8920.0, 9316.0] | [25.0, 27.0] | [108, 185] |
p02706 | u019075898 | 2,000 | 1,048,576 | Takahashi has N days of summer vacation. His teacher gave him M summer assignments. It will take A_i days for him to do the i-th assignment. He cannot do multiple assignments on the same day, or hang out on a day he does an assignment. What is the maximum number of days Takahashi can hang out during the vacation if ... | ['N, M = int(input().split())\nA = [int(a) for a input().split()]\nif N - sum(A) >= 0:\n print(N - sum(A))\nelse:\n print(-1)\n', '\nN, M = [int(x) for x in input().split()]\nA = [int(a) for a input()]\ntmp = N - sum(A)\nif tmp >= 0:\n print(tmp)\nelse:\n print(-1)\n', 'N, M = [int(x) for x in input().split... | ['Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted'] | ['s050012236', 's445833650', 's626534534', 's945072159', 's869002769'] | [8972.0, 9028.0, 8860.0, 8988.0, 9956.0] | [23.0, 20.0, 20.0, 23.0, 22.0] | [125, 134, 140, 128, 143] |
p02706 | u021217230 | 2,000 | 1,048,576 | Takahashi has N days of summer vacation. His teacher gave him M summer assignments. It will take A_i days for him to do the i-th assignment. He cannot do multiple assignments on the same day, or hang out on a day he does an assignment. What is the maximum number of days Takahashi can hang out during the vacation if ... | ['n,m=map(int,input().split())\nl=list(map(int,input().split()))\ns=sum(l)\nif s>l:\n print(-1)\nelse:\n print(l-s)', 'n,m=map(int,input().split())\nl=list(map(int,input().split()))\ns=sum(l)\nif s>n:\n print(-1)\nelse:\n print(n-s)\n'] | ['Runtime Error', 'Accepted'] | ['s130219055', 's695401286'] | [9860.0, 10012.0] | [24.0, 22.0] | [109, 110] |
p02706 | u021906447 | 2,000 | 1,048,576 | Takahashi has N days of summer vacation. His teacher gave him M summer assignments. It will take A_i days for him to do the i-th assignment. He cannot do multiple assignments on the same day, or hang out on a day he does an assignment. What is the maximum number of days Takahashi can hang out during the vacation if ... | ['N, M = map(int, input().split())\n\na = 0\nfor i in range(M):\n b = int(input())\n a += b\n\nday = N-a\nprint(day)', 'N, M = map(int, input().split())\n \na = 0\nfor i in range(M):\n b = int(input())\n a += b\n\nday_count = N-a\n\nif day_count>=0:\n print(day)\nelse:\n print(-1)', 'N, M = map(int, input().split... | ['Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted'] | ['s114425966', 's185322194', 's403842919', 's426511398', 's746897791'] | [9172.0, 9144.0, 9148.0, 9188.0, 9844.0] | [20.0, 21.0, 21.0, 25.0, 23.0] | [108, 153, 166, 170, 159] |
p02706 | u031722966 | 2,000 | 1,048,576 | Takahashi has N days of summer vacation. His teacher gave him M summer assignments. It will take A_i days for him to do the i-th assignment. He cannot do multiple assignments on the same day, or hang out on a day he does an assignment. What is the maximum number of days Takahashi can hang out during the vacation if ... | ['N,M = map(int,input().split())\nA = list(map(int,input().split()))\n\nif sum(A) < N:\n print(-1)\nelse:\n print(N - sum(A))', 'N,M = map(int,input().split())\nA = list(map(int,input().split()))\n\nif sum(A) < A:\n print(-1)\nelse:\n print(A - sum(A))', 'N , M = map(int,input().split())\nA = list(map(int,i... | ['Wrong Answer', 'Runtime Error', 'Accepted'] | ['s146805829', 's674559738', 's975035284'] | [9852.0, 10124.0, 9884.0] | [30.0, 28.0, 21.0] | [123, 123, 124] |
p02706 | u033360495 | 2,000 | 1,048,576 | Takahashi has N days of summer vacation. His teacher gave him M summer assignments. It will take A_i days for him to do the i-th assignment. He cannot do multiple assignments on the same day, or hang out on a day he does an assignment. What is the maximum number of days Takahashi can hang out during the vacation if ... | ['N, M = [int(s) for s in input().split()]\nA = [int(a) for a in input().split()]\n\nd = N - sum(A)\n\nif d > 0:\n return d\nelse:\n return -1', 'N, M = [int(s) for s in input().split()]\nA = [int(a) for a in input().split()]\n\nd = N - sum(A)\n\nif d >= 0:\n print(d)\nelse:\n print(-1)'] | ['Runtime Error', 'Accepted'] | ['s560359982', 's062727897'] | [9100.0, 10000.0] | [24.0, 23.0] | [138, 139] |
p02706 | u037601040 | 2,000 | 1,048,576 | Takahashi has N days of summer vacation. His teacher gave him M summer assignments. It will take A_i days for him to do the i-th assignment. He cannot do multiple assignments on the same day, or hang out on a day he does an assignment. What is the maximum number of days Takahashi can hang out during the vacation if ... | ['import math\nprint(2*math.pi*int(input()))\n', 'a, b = input().split()\nlis = list(map(int, input().split()))\nprint(int(a) - sum(lis) if int(a) >= sum(lis) else "-1")\n'] | ['Runtime Error', 'Accepted'] | ['s979880415', 's526667400'] | [9188.0, 9892.0] | [23.0, 23.0] | [42, 118] |
p02706 | u038819082 | 2,000 | 1,048,576 | Takahashi has N days of summer vacation. His teacher gave him M summer assignments. It will take A_i days for him to do the i-th assignment. He cannot do multiple assignments on the same day, or hang out on a day he does an assignment. What is the maximum number of days Takahashi can hang out during the vacation if ... | ['N,M=map(int,input().split())\nA=list(map(int,input().split()))\nc=0\nfor i in range(M):\n c+=i\nf=N-c\nif f<0:\n f=-1\nprint(f)', 'N,M=map(int,input().split())\nA=list(map(int,input().split()))\nc=0\nfor i in range(M):\n c+=A[i]\nf=N-c\nif f<0:\n f=-1\nprint(f)'] | ['Wrong Answer', 'Accepted'] | ['s631821468', 's875575497'] | [10192.0, 9880.0] | [21.0, 23.0] | [125, 128] |
p02706 | u047918169 | 2,000 | 1,048,576 | Takahashi has N days of summer vacation. His teacher gave him M summer assignments. It will take A_i days for him to do the i-th assignment. He cannot do multiple assignments on the same day, or hang out on a day he does an assignment. What is the maximum number of days Takahashi can hang out during the vacation if ... | ["n, m = map(int, input())\na = sum([int(i) for i in input().split()])\n\nprint(n-a if n-a>=0 else '-1')", "n, m = map(int, input().split())\na = sum([int(i) for i in input().split()])\n\nprint(n-a if n-a>=0 else '-1')"] | ['Runtime Error', 'Accepted'] | ['s224116104', 's109309028'] | [9116.0, 9884.0] | [22.0, 22.0] | [99, 107] |
p02706 | u049355439 | 2,000 | 1,048,576 | Takahashi has N days of summer vacation. His teacher gave him M summer assignments. It will take A_i days for him to do the i-th assignment. He cannot do multiple assignments on the same day, or hang out on a day he does an assignment. What is the maximum number of days Takahashi can hang out during the vacation if ... | ["n,m = map(int, input().strip().sprit(' '))\n\nhomework = list(map(int, input().strip().sprit(' ')))\n\nday = n - sum(homework)\n\nif day >= 0:\n print(day)\nelse:\n print(-1)\n\n ", 'n,m = map(int, input().strip().split(" "))\n\nhomework = list(n,m)\n\nday = n - sum(homework)\n\nif day >= 0:\n \n print(day)\n \... | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s008473105', 's073972306', 's653751764'] | [9044.0, 9168.0, 10116.0] | [21.0, 21.0, 23.0] | [171, 143, 174] |
p02706 | u050805798 | 2,000 | 1,048,576 | Takahashi has N days of summer vacation. His teacher gave him M summer assignments. It will take A_i days for him to do the i-th assignment. He cannot do multiple assignments on the same day, or hang out on a day he does an assignment. What is the maximum number of days Takahashi can hang out during the vacation if ... | ['a,b = map(int,input().split())\nc = [int(x) for x in input().split()]\nprint(c,len(c))\ncsum = 0\nfor i in range(len(c)):\n csum = csum + c[i]\nif a>=csum:\n print(a-csum)\nelse:\n print(-1)', 'a,b = map(int,input().split())\nc = [int(x) for x in input().split()]\ncsum = 0\nfor i in range(len(c)):\n csum ... | ['Wrong Answer', 'Accepted'] | ['s538417263', 's242661470'] | [10060.0, 10056.0] | [26.0, 22.0] | [190, 175] |
p02706 | u054858774 | 2,000 | 1,048,576 | Takahashi has N days of summer vacation. His teacher gave him M summer assignments. It will take A_i days for him to do the i-th assignment. He cannot do multiple assignments on the same day, or hang out on a day he does an assignment. What is the maximum number of days Takahashi can hang out during the vacation if ... | ['n,m = map(int,input().split())\n\nl = list()\nfor i in range(m):\n k = int(input())\n l.append(k)\ns = sum(l)\n\nans = n-s\nif ans>=0:\n print(ans)\nelse:\n print(-1)', 'n,m = map(int,input().split())\n\nl = list(map(int,input().split()))\n\ns = sum(l)\n\nans = n-s\nif ans>=0:\n print(ans)\nelse:\n print(-1)'] | ['Runtime Error', 'Accepted'] | ['s416266409', 's474003235'] | [9288.0, 9980.0] | [21.0, 24.0] | [158, 131] |
p02706 | u055244973 | 2,000 | 1,048,576 | Takahashi has N days of summer vacation. His teacher gave him M summer assignments. It will take A_i days for him to do the i-th assignment. He cannot do multiple assignments on the same day, or hang out on a day he does an assignment. What is the maximum number of days Takahashi can hang out during the vacation if ... | ["print('number of days of summer vacation: ')\nN = int(input())\nprint('number of summer assignments: ')\nM = int(input())\n\nfor i in range(M):\n Ai = int(input())\n N = N - Ai\n\nif N >= 0:\n print(N)\nelse:\n N = -1\n print(N)", 'N, M = map(int, input().split())\nA = list(map(int, input().split()))\n... | ['Runtime Error', 'Accepted'] | ['s726171351', 's612744609'] | [9048.0, 10064.0] | [23.0, 23.0] | [230, 134] |
p02706 | u067986264 | 2,000 | 1,048,576 | Takahashi has N days of summer vacation. His teacher gave him M summer assignments. It will take A_i days for him to do the i-th assignment. He cannot do multiple assignments on the same day, or hang out on a day he does an assignment. What is the maximum number of days Takahashi can hang out during the vacation if ... | ['N, M = map(int, input().split())\nA = input().split()\nif sum(A) > N:\n print(-1)\nelse:\n print(N - sum(A))', 'N, M = map(int, input().split())\nA = input().split()\nif sum(int(i) for i in A) > N:\n print(-1)\nelse:\n print(N - sum(int(i) for i in A))'] | ['Runtime Error', 'Accepted'] | ['s831353569', 's887610668'] | [9580.0, 9520.0] | [26.0, 23.0] | [105, 141] |
p02706 | u072080927 | 2,000 | 1,048,576 | Takahashi has N days of summer vacation. His teacher gave him M summer assignments. It will take A_i days for him to do the i-th assignment. He cannot do multiple assignments on the same day, or hang out on a day he does an assignment. What is the maximum number of days Takahashi can hang out during the vacation if ... | ['j=list(map(int,input().split())) \nn=j[0]\nm=j[1]\na=list(map(int,input().split()))\ns=int(0)\nfor i in range[0,m]:\n s+=a[i]\nif n-s<0:\n print(-1)\nelse:\n print(n-s)', 'j=list(map(int,input().split())) \nn=j[0]\na=list(map(int,input().split()))\ns=sum(a)\nif n-s<0:\n print(-1)\nelse:\n print(n-s)\n'] | ['Runtime Error', 'Accepted'] | ['s044659900', 's820137301'] | [10008.0, 9988.0] | [24.0, 22.0] | [161, 124] |
p02706 | u075304271 | 2,000 | 1,048,576 | Takahashi has N days of summer vacation. His teacher gave him M summer assignments. It will take A_i days for him to do the i-th assignment. He cannot do multiple assignments on the same day, or hang out on a day he does an assignment. What is the maximum number of days Takahashi can hang out during the vacation if ... | ['def solve():\n n, m = map(int, input().split())\n a = list(map(int, input().split()))\n hoge = max(0, n-sum(a))\n if hoge == 0:\n print(-1)\n else:\n print(a)\n return 0\n \nif __name__ == "__main__":\n solve()\n', 'def solve():\n n, m = map(int, input().split())\n a = list(map(int, input().split()))\n... | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s267641400', 's827358001', 's509380521'] | [9996.0, 9876.0, 10060.0] | [25.0, 24.0, 23.0] | [213, 212, 177] |
p02706 | u080475902 | 2,000 | 1,048,576 | Takahashi has N days of summer vacation. His teacher gave him M summer assignments. It will take A_i days for him to do the i-th assignment. He cannot do multiple assignments on the same day, or hang out on a day he does an assignment. What is the maximum number of days Takahashi can hang out during the vacation if ... | ['n,m=map(int,input().split())\na=list(map(int,input().split()))\np=0\nfor i in a:\n p+=i\nif(n>=p):\n print("{}",n-p)\nelse:\n print("{}",-1)', 'n,m=map(int,input().split())\na=list(map(int,input().split()))\np=0\nfor i in a:\n p+=i\nif(n>=p):\n print("{}",n-p)\nelse:\n print("-1")', ... | ['Wrong Answer', 'Wrong Answer', 'Runtime Error', 'Accepted'] | ['s183903580', 's255756415', 's281557020', 's699783436'] | [10004.0, 10052.0, 9036.0, 10140.0] | [23.0, 22.0, 22.0, 22.0] | [155, 140, 107, 160] |
p02706 | u082861480 | 2,000 | 1,048,576 | Takahashi has N days of summer vacation. His teacher gave him M summer assignments. It will take A_i days for him to do the i-th assignment. He cannot do multiple assignments on the same day, or hang out on a day he does an assignment. What is the maximum number of days Takahashi can hang out during the vacation if ... | ['N,M = map(int,input().splti())\nhomeworks = [int(i) for i in input().splti()]\nprint(-1 if sum(homeworks) > N else sum(homeworks) - N))', 'N,M = map(int,input().split())\nhomeworks = [int(i) for i in input().split()]\nprint(-1 if sum(homeworks) > N else sum(homeworks) - N))', 'N,M = map(int,input().split())\nhomework... | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s242721014', 's837536371', 's731487952'] | [9040.0, 9044.0, 10060.0] | [20.0, 21.0, 24.0] | [133, 133, 132] |
p02706 | u086624329 | 2,000 | 1,048,576 | Takahashi has N days of summer vacation. His teacher gave him M summer assignments. It will take A_i days for him to do the i-th assignment. He cannot do multiple assignments on the same day, or hang out on a day he does an assignment. What is the maximum number of days Takahashi can hang out during the vacation if ... | ['N,M=map(int,input().split())\n\nA=[int(input())for i in range(M)]\n\nprint(N-sum(A))', "N,M=map(int,input().split())\n\nA=list(map(int,input().split()))\n\nif N-sum(A)>=0:\n print(N-sum(A))\n \nelse:\n print('-1')"] | ['Runtime Error', 'Accepted'] | ['s194221694', 's321550089'] | [9224.0, 10080.0] | [22.0, 22.0] | [80, 126] |
p02706 | u088475928 | 2,000 | 1,048,576 | Takahashi has N days of summer vacation. His teacher gave him M summer assignments. It will take A_i days for him to do the i-th assignment. He cannot do multiple assignments on the same day, or hang out on a day he does an assignment. What is the maximum number of days Takahashi can hang out during the vacation if ... | ['N,M=map(int,input().split())\np=list(map(int,input().split()))\nif np.sum(p)>M:\n print(-1)\nelse:\n print(N-np.sum(p))', 'import numpy as np\nN,M=map(int,input().split())\np=list(map(int,input().split()))\nif np.sum(p)>M:\n print(-1)\nelse:\n print(N-np.sum(p))', 'import numpy as np\nN,M=map(int,input().split())... | ['Runtime Error', 'Wrong Answer', 'Accepted'] | ['s727685169', 's877892698', 's397598373'] | [9852.0, 27784.0, 27772.0] | [21.0, 108.0, 105.0] | [116, 135, 135] |
p02706 | u090406054 | 2,000 | 1,048,576 | Takahashi has N days of summer vacation. His teacher gave him M summer assignments. It will take A_i days for him to do the i-th assignment. He cannot do multiple assignments on the same day, or hang out on a day he does an assignment. What is the maximum number of days Takahashi can hang out during the vacation if ... | ['n,m= map(int,input().split())\na = list(map(int,input().split()))\n\nhwdsum=0\nk=0\nwhile k<= m-1:\n hwdsum += a[k]\n k+=1\n \nif n-hwdsum>=0:\n print(str(hwdsum))\n \nelse:\n print(str(-1))\n\n', 'n,m= map(int,input().split())\na = list(map(int,input().split()))\n\nhwdsum=0\nk=0\nwhile k<= m-1:\n sum += a[k]\... | ['Wrong Answer', 'Runtime Error', 'Accepted'] | ['s049274275', 's908827127', 's252050598'] | [10120.0, 9884.0, 10052.0] | [22.0, 22.0, 27.0] | [185, 164, 187] |
p02706 | u092646083 | 2,000 | 1,048,576 | Takahashi has N days of summer vacation. His teacher gave him M summer assignments. It will take A_i days for him to do the i-th assignment. He cannot do multiple assignments on the same day, or hang out on a day he does an assignment. What is the maximum number of days Takahashi can hang out during the vacation if ... | ['N, M = map(int, input().split())\nA = list(map(int, input().split()))\nflag = True\n \nfor i in A:\n N = N - i\n if N < 0:\n flag = False\n break\n \nif flag == True:\nprint(N)\nelse:\nprint(-1)', 'N, M = map(int, input().split())\nA = list(map(int, input().split()))\nflag = True\n\nfor i in A:\nN = N - i\n... | ['Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted'] | ['s166099639', 's644077402', 's747254796', 's069418670'] | [8976.0, 8960.0, 9028.0, 10064.0] | [20.0, 20.0, 23.0, 24.0] | [190, 176, 182, 194] |
p02706 | u100994727 | 2,000 | 1,048,576 | Takahashi has N days of summer vacation. His teacher gave him M summer assignments. It will take A_i days for him to do the i-th assignment. He cannot do multiple assignments on the same day, or hang out on a day he does an assignment. What is the maximum number of days Takahashi can hang out during the vacation if ... | ['def resolve():\n a,b = map(int, input().split())\n A = list(map(int, input().split()))\n count = 0\n\n for c in range(b):\n count += A[c]\n \n print(a - count)\n \n resolve()', 'def resolve():\n a,b = map(int, input().split())\n A = list(map(int, input().split()))\n count = 0\n\n ... | ['Runtime Error', 'Accepted'] | ['s413297644', 's824779075'] | [8936.0, 9876.0] | [24.0, 25.0] | [192, 264] |
p02706 | u101350975 | 2,000 | 1,048,576 | Takahashi has N days of summer vacation. His teacher gave him M summer assignments. It will take A_i days for him to do the i-th assignment. He cannot do multiple assignments on the same day, or hang out on a day he does an assignment. What is the maximum number of days Takahashi can hang out during the vacation if ... | ['N, M = map(int, input().split())\nA = list(map(int, input(),split()))\nsum = sum(A)\nif sum > N:\n ans = -1\nelse:\n ans = N - sum\nprint(ans)\n', 'N, M = map(int, input().split())\nA = list(map(int, input(),split()))\nsum = sum(A)\nif sum > N:\n ans = -1\nelse:\n ans = N - sum\nprint(ans)\n', 'N, M = map... | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s326276439', 's586737374', 's585884600'] | [9280.0, 9164.0, 10064.0] | [22.0, 23.0, 21.0] | [142, 142, 142] |
p02706 | u106816675 | 2,000 | 1,048,576 | Takahashi has N days of summer vacation. His teacher gave him M summer assignments. It will take A_i days for him to do the i-th assignment. He cannot do multiple assignments on the same day, or hang out on a day he does an assignment. What is the maximum number of days Takahashi can hang out during the vacation if ... | ['N, M = map(int, input().split())\nA = [int(x) for x in input().split()]\nsumA = 0\n\nfor i in A:\n sumA = sumA + A[i]\n\nif sumA > N:\n print(-1)\nelse:\n print(N-sumA)\n', 'N, M = map(int, input().split())\nA = list(map(int, input().split()))\nsumA = 0\ncnt = 0\n\nfor i in A:\n sumA = sumA + A[cnt]\n ... | ['Runtime Error', 'Accepted'] | ['s298287696', 's724912529'] | [9888.0, 10060.0] | [26.0, 24.0] | [168, 193] |
p02706 | u106954338 | 2,000 | 1,048,576 | Takahashi has N days of summer vacation. His teacher gave him M summer assignments. It will take A_i days for him to do the i-th assignment. He cannot do multiple assignments on the same day, or hang out on a day he does an assignment. What is the maximum number of days Takahashi can hang out during the vacation if ... | ['N = int(input())\nM = int(input())\nA = list(map(int(input().split)))\na = sum(A)\nif V >= 0:\n print(a)\nelse:\n print(-1)\n \n \n', 'N, M = map(int, input().sprit())\nA = list(map(int, input().split()))\na = sum(A)\nans = N -a\nif ans >= 0:\n print(ans)\nelse:\n print(-1)\n \n \n', '... | ['Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted'] | ['s070655989', 's200414197', 's332233703', 's364227313', 's617645110', 's742254395', 's900551803', 's909424513', 's560474735'] | [9204.0, 9092.0, 9068.0, 9152.0, 9100.0, 9080.0, 9180.0, 9188.0, 10000.0] | [26.0, 20.0, 25.0, 24.0, 22.0, 22.0, 21.0, 24.0, 22.0] | [137, 153, 152, 154, 154, 153, 143, 161, 152] |
p02706 | u108375911 | 2,000 | 1,048,576 | Takahashi has N days of summer vacation. His teacher gave him M summer assignments. It will take A_i days for him to do the i-th assignment. He cannot do multiple assignments on the same day, or hang out on a day he does an assignment. What is the maximum number of days Takahashi can hang out during the vacation if ... | ['a = int(input())\nb = int(input())\nc = list(map(int,input().split()))\nd = sum(c)\n\nif (a-d) < 0:\n print(-1)\nelse:\n print(a-d)\n\n\n\n \n', "r = list(map(int,input().split()))\na = r[0]\nb = r[1]\nc = r[2:]\n\n\n\n\nwhile b > 0:\n a -= c[b]\n b -= 1\n \n if a < 0:\n print('-1')\n \... | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s768994702', 's972036782', 's314471874'] | [9172.0, 9124.0, 10180.0] | [20.0, 22.0, 24.0] | [138, 163, 128] |
p02706 | u115110170 | 2,000 | 1,048,576 | Takahashi has N days of summer vacation. His teacher gave him M summer assignments. It will take A_i days for him to do the i-th assignment. He cannot do multiple assignments on the same day, or hang out on a day he does an assignment. What is the maximum number of days Takahashi can hang out during the vacation if ... | ['n,m = map(int,input().split())\nls = list(map(int,input().split()))\nfor a in range(ls):\n n -= a\nprint(max(-1,n))', 'n,m = map(int,input().split())\nls = list(map(int,input().split()))\nfor a in ls:\n n -= a\nprint(max(-1,n))\n'] | ['Runtime Error', 'Accepted'] | ['s447567032', 's289918052'] | [9884.0, 9992.0] | [24.0, 24.0] | [112, 106] |
p02706 | u116118064 | 2,000 | 1,048,576 | Takahashi has N days of summer vacation. His teacher gave him M summer assignments. It will take A_i days for him to do the i-th assignment. He cannot do multiple assignments on the same day, or hang out on a day he does an assignment. What is the maximum number of days Takahashi can hang out during the vacation if ... | ['n,m=int(input.split())\ns=0\nfor i in input.split():\n s=s+i\nif s>n:\n print("-1")\nelse:\n print(n-s)\n\n', 'n,m=map(int, input().split())\ns=0\nfor i in input().split():\n s=s+int(i)\nif s>n:\n print("-1")\nelse:\n print(n-s)'] | ['Runtime Error', 'Accepted'] | ['s479004679', 's868472122'] | [9020.0, 9660.0] | [22.0, 24.0] | [101, 119] |
p02706 | u123872895 | 2,000 | 1,048,576 | Takahashi has N days of summer vacation. His teacher gave him M summer assignments. It will take A_i days for him to do the i-th assignment. He cannot do multiple assignments on the same day, or hang out on a day he does an assignment. What is the maximum number of days Takahashi can hang out during the vacation if ... | ['n,m = list(map(int, input().split()))\na = list(map(int, input().split()))\n\nprint(max(n - sum(a), -1)', 'n,m = list(map(int, input().split()))\na = list(map(int, input().split()))\n \nprint(max(n - sum(a), -1))'] | ['Runtime Error', 'Accepted'] | ['s543341124', 's581603616'] | [9036.0, 10120.0] | [25.0, 25.0] | [101, 102] |
p02706 | u127285813 | 2,000 | 1,048,576 | Takahashi has N days of summer vacation. His teacher gave him M summer assignments. It will take A_i days for him to do the i-th assignment. He cannot do multiple assignments on the same day, or hang out on a day he does an assignment. What is the maximum number of days Takahashi can hang out during the vacation if ... | ['N, M = map(int, input().split())\nA = list(map(int, input().split())\n \nprint(max(-1, N-sum(A)))', 'N, M = map(int, input().split())\nA = list(map(int, input().split()))\n\nprint(max(-1, N-sum(A)))'] | ['Runtime Error', 'Accepted'] | ['s742818043', 's863211956'] | [8992.0, 10040.0] | [22.0, 22.0] | [102, 94] |
p02706 | u127288756 | 2,000 | 1,048,576 | Takahashi has N days of summer vacation. His teacher gave him M summer assignments. It will take A_i days for him to do the i-th assignment. He cannot do multiple assignments on the same day, or hang out on a day he does an assignment. What is the maximum number of days Takahashi can hang out during the vacation if ... | ['N,M=map(int,input().split())\nA=map(int,input().split())\n\nif N < sum(A):\n print(-1)\nelse:\n print(N - sum(A))\n \n', 'N,M = map(int,input().split())\nA = list(map(int,input().split()))\n\nif N < sum(A):\n print(-1)\nelse:\n print(N - sum(A))'] | ['Wrong Answer', 'Accepted'] | ['s851376133', 's465515039'] | [9528.0, 9880.0] | [22.0, 24.0] | [113, 123] |
p02706 | u138045722 | 2,000 | 1,048,576 | Takahashi has N days of summer vacation. His teacher gave him M summer assignments. It will take A_i days for him to do the i-th assignment. He cannot do multiple assignments on the same day, or hang out on a day he does an assignment. What is the maximum number of days Takahashi can hang out during the vacation if ... | ['import numpy as np\n\nA=list(input().split())\n\nprint(A, A[0], int(A[0]))\n\nN=int(A[0])\nM=int(A[1])\n\nB=list(input().split())\n\nk=0\n\nfor i in range(len(B)):\n k+=int(B[i])\n\nprint(N-k if N-k>=0 else -1)\n', 'import numpy as np\n\nA=list(input().split())\n\n\nN=int(A[0])\nM=int(A[1])\n\nB=list(input().split... | ['Wrong Answer', 'Accepted'] | ['s534622454', 's744872416'] | [27516.0, 27448.0] | [106.0, 105.0] | [198, 171] |
p02706 | u148183225 | 2,000 | 1,048,576 | Takahashi has N days of summer vacation. His teacher gave him M summer assignments. It will take A_i days for him to do the i-th assignment. He cannot do multiple assignments on the same day, or hang out on a day he does an assignment. What is the maximum number of days Takahashi can hang out during the vacation if ... | ['N,M = map(int,input().split())\nA = list(map(int,input().split()))\nif sum(A) > N:\n print("-1")\nelse:\n print(M - sum(A))', 'N,M = map(int,input().split())\nA = list(map(int,input().split()))\nif sum(A) > N:\n print("-1")\nelse:\n print(N - sum(A))'] | ['Wrong Answer', 'Accepted'] | ['s135324287', 's269800519'] | [10056.0, 10056.0] | [21.0, 21.0] | [120, 120] |
p02706 | u157020659 | 2,000 | 1,048,576 | Takahashi has N days of summer vacation. His teacher gave him M summer assignments. It will take A_i days for him to do the i-th assignment. He cannot do multiple assignments on the same day, or hang out on a day he does an assignment. What is the maximum number of days Takahashi can hang out during the vacation if ... | ['import math\nr = int(input())\nprint(2 * r * math.pi)', 'n, m = map(int, input().split())\na = list(map(int, input().split()))\nans = n - sum(a) if n - sum(a) >= 0 else -1\nprint(ans)'] | ['Runtime Error', 'Accepted'] | ['s291420604', 's771035112'] | [9176.0, 9880.0] | [20.0, 23.0] | [51, 123] |
p02706 | u158126367 | 2,000 | 1,048,576 | Takahashi has N days of summer vacation. His teacher gave him M summer assignments. It will take A_i days for him to do the i-th assignment. He cannot do multiple assignments on the same day, or hang out on a day he does an assignment. What is the maximum number of days Takahashi can hang out during the vacation if ... | ['n = int(input())\nm = int(input())\nli = list(map(int,input().split()))\nif n - sum(li) >= 0:\n print(n - sum(li))\nelse:\n print(-1)', 'n = int(input())\nm = int(input())\nli = list(map(int,input().split()))\nif n - sum(li) >= 0:\n print(n - sum(li))\nelse:\n print(-1)', 'n,m = map(int,input().split())\n... | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s808177576', 's851305575', 's482525184'] | [9188.0, 9188.0, 9928.0] | [25.0, 21.0, 25.0] | [133, 133, 130] |
p02706 | u163725566 | 2,000 | 1,048,576 | Takahashi has N days of summer vacation. His teacher gave him M summer assignments. It will take A_i days for him to do the i-th assignment. He cannot do multiple assignments on the same day, or hang out on a day he does an assignment. What is the maximum number of days Takahashi can hang out during the vacation if ... | ['import math\nfrom sys import *\ninp=stdin.readline\n\nzip=zip \ndef linp(x):\n return list(map(int,x.split()))\ndef minp(x):\n return map(int,x.split())\n\nn,m=minp(inp())\na=linp(inp())\nprint(sum(a)-n)\n \n\n\n\n\n ', 'import math\nfrom sys import *\ninp=stdin.readline\n\nzip=zip \ndef linp(x):\n ret... | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s401529876', 's704685881', 's568136130'] | [9912.0, 9880.0, 10068.0] | [22.0, 22.0, 22.0] | [211, 253, 253] |
p02706 | u165114979 | 2,000 | 1,048,576 | Takahashi has N days of summer vacation. His teacher gave him M summer assignments. It will take A_i days for him to do the i-th assignment. He cannot do multiple assignments on the same day, or hang out on a day he does an assignment. What is the maximum number of days Takahashi can hang out during the vacation if ... | ['a, n = input().split()\na = int(a)\nn = int(n)\np = list(map(int, input().split()))\n\nc = 0\nfor i in range n:\n c += p[i]\n \nif c > a:\n print(-1)\nelse:\n print(a-c)\n', 'a, n = input().split()\na = int(a)\nn = int(n)\np = list(map(int, input().split()))\n\nc = 0\nfor i in range(n):\n c += p[i]\n \nif c > a... | ['Runtime Error', 'Accepted'] | ['s249801177', 's167740548'] | [8892.0, 10116.0] | [26.0, 33.0] | [162, 164] |
p02706 | u172214030 | 2,000 | 1,048,576 | Takahashi has N days of summer vacation. His teacher gave him M summer assignments. It will take A_i days for him to do the i-th assignment. He cannot do multiple assignments on the same day, or hang out on a day he does an assignment. What is the maximum number of days Takahashi can hang out during the vacation if ... | ['human_num = int(input())\n\nnyu = list(map(int, input().split(" ")))\n\nfor i in range(human_num):\n print(nyu.count(i + 1))', 'day_num, homework_num = map(int, input().split(" "))\n\nrequ_day = list(map(int, input().split()))\nsum_day = 0\n\nfor day in requ_day:\n sum_day += day\n \nactiv_day = day_num - sum_da... | ['Runtime Error', 'Accepted'] | ['s613719513', 's147743901'] | [9172.0, 10168.0] | [20.0, 23.0] | [122, 240] |
p02706 | u178439102 | 2,000 | 1,048,576 | Takahashi has N days of summer vacation. His teacher gave him M summer assignments. It will take A_i days for him to do the i-th assignment. He cannot do multiple assignments on the same day, or hang out on a day he does an assignment. What is the maximum number of days Takahashi can hang out during the vacation if ... | ['N, M = list(map(int, input().split()))\nA = list(map(int, input().split()))\nasoberuhi = N - sum(A)\nif asoberuhi < 0:\n print(asoberuhi)\nelse:\n print(-1)', 'N, M = list(map(int, input().split()))\nA = list(map(int, input().split()))\n\nasoberuhi = N - sum(A)\nif asoberuhi >= 0:\n print(asoberuhi)\nelse:\n... | ['Wrong Answer', 'Accepted'] | ['s875375224', 's117024151'] | [9876.0, 9960.0] | [24.0, 21.0] | [156, 158] |
p02706 | u180528413 | 2,000 | 1,048,576 | Takahashi has N days of summer vacation. His teacher gave him M summer assignments. It will take A_i days for him to do the i-th assignment. He cannot do multiple assignments on the same day, or hang out on a day he does an assignment. What is the maximum number of days Takahashi can hang out during the vacation if ... | ["n,m=map(int, input().split(' '))\na = list(map(int, input().split()))\nres = n-sum(a)\nprint(res if res >= 0 else -1", "n,m=map(int, input().split(' '))\na = list(map(int, input().split()))\nres = n-sum(a)\nprint(res if res >= 0 else -1)"] | ['Runtime Error', 'Accepted'] | ['s698118103', 's878816410'] | [9032.0, 9864.0] | [19.0, 24.0] | [113, 114] |
p02706 | u181195295 | 2,000 | 1,048,576 | Takahashi has N days of summer vacation. His teacher gave him M summer assignments. It will take A_i days for him to do the i-th assignment. He cannot do multiple assignments on the same day, or hang out on a day he does an assignment. What is the maximum number of days Takahashi can hang out during the vacation if ... | ['a, _ =map(int,input().split())\nli = [x for x in input().split()]\ns = sum(li)\nprint(a-s)', 'a, _ =map(int,input().split())\nli = [int(x) for x in input().split()]\ns = sum(li)\nprint(max(a-s, -1))\n'] | ['Runtime Error', 'Accepted'] | ['s103182787', 's513352796'] | [9592.0, 10044.0] | [21.0, 25.0] | [87, 102] |
p02706 | u184148551 | 2,000 | 1,048,576 | Takahashi has N days of summer vacation. His teacher gave him M summer assignments. It will take A_i days for him to do the i-th assignment. He cannot do multiple assignments on the same day, or hang out on a day he does an assignment. What is the maximum number of days Takahashi can hang out during the vacation if ... | ['\nN, M = map(int, input().split()) \nA = list(map(int, input().split()))\nfor i in range (M)\n\tN = N -A[i]\nif N>=0\n\tprint (N)\nelse\n\tprint (-1)', 'N, M = map(int, input().split()) \nA = list(map(int, input().split()))\nfor i in range (M):\n\tN = N -A[i]\nif N>=0:\n\tprint (N)\nelse:\n\tprint (-1)'] | ['Runtime Error', 'Accepted'] | ['s426230382', 's914940447'] | [8960.0, 9888.0] | [19.0, 23.0] | [138, 140] |
p02706 | u186121428 | 2,000 | 1,048,576 | Takahashi has N days of summer vacation. His teacher gave him M summer assignments. It will take A_i days for him to do the i-th assignment. He cannot do multiple assignments on the same day, or hang out on a day he does an assignment. What is the maximum number of days Takahashi can hang out during the vacation if ... | ["N, M = map(int, input().split())\nA = list(map(int, input().split()))\nans = sum(A) if N > sum(A) else 'No'\nprint(ans)", 'N, M = map(int, input().split())\nA = list(map(int, input().split()))\nans = N - sum(A) if N >= sum(A) else -1\nprint(ans)'] | ['Wrong Answer', 'Accepted'] | ['s287049465', 's836644116'] | [9984.0, 9988.0] | [25.0, 21.0] | [116, 119] |
p02706 | u187193817 | 2,000 | 1,048,576 | Takahashi has N days of summer vacation. His teacher gave him M summer assignments. It will take A_i days for him to do the i-th assignment. He cannot do multiple assignments on the same day, or hang out on a day he does an assignment. What is the maximum number of days Takahashi can hang out during the vacation if ... | ['n , m = map(int, input().split())\na = list(map(int, input().split()))\nprint(max(n - sum(a)), -1)', 'n , m = map(int, input().split())\na = list(map(int, input().split()))\n\nprint(max(n - sum(a), -1))'] | ['Runtime Error', 'Accepted'] | ['s976889615', 's768088471'] | [10056.0, 10000.0] | [23.0, 21.0] | [96, 97] |
p02706 | u189513668 | 2,000 | 1,048,576 | Takahashi has N days of summer vacation. His teacher gave him M summer assignments. It will take A_i days for him to do the i-th assignment. He cannot do multiple assignments on the same day, or hang out on a day he does an assignment. What is the maximum number of days Takahashi can hang out during the vacation if ... | ['N, M = map(int, input().split())\n\nA = 0\nfor i in range(M):\n s = int(input())\n A += s\n\nsub = N - A\n\nif sub >= 0:\n print(sub)\nelse:\n print(-1)', 'N, M = map(int, input().split())\n\nA = list(map(int, input().split()))\n\nsub = N - sum(A)\n\nif sub >= 0:\n print(sub)\nelse:\n print(-1)'] | ['Runtime Error', 'Accepted'] | ['s765273068', 's369398460'] | [9172.0, 10028.0] | [23.0, 21.0] | [152, 136] |
p02706 | u189806337 | 2,000 | 1,048,576 | Takahashi has N days of summer vacation. His teacher gave him M summer assignments. It will take A_i days for him to do the i-th assignment. He cannot do multiple assignments on the same day, or hang out on a day he does an assignment. What is the maximum number of days Takahashi can hang out during the vacation if ... | ["n,m = map(int,input().split())\na = list(map(int,input().split()))\n\nif N-sum(a) >= 0:\n\tprint(N-sum(a))\nelse:\n\tprint('-1')", "n,m = map(int,input().split())\na = list(map(int,input().split()))\n \nif n-sum(a) >= 0:\n\tprint(n-sum(a))\nelse:\n\tprint('-1')"] | ['Runtime Error', 'Accepted'] | ['s267680170', 's498570455'] | [9880.0, 9876.0] | [22.0, 26.0] | [120, 121] |
p02706 | u195355592 | 2,000 | 1,048,576 | Takahashi has N days of summer vacation. His teacher gave him M summer assignments. It will take A_i days for him to do the i-th assignment. He cannot do multiple assignments on the same day, or hang out on a day he does an assignment. What is the maximum number of days Takahashi can hang out during the vacation if ... | ['N,M = input().split()\nN = int(N)\nM = int(M)\n\ntemp = sum(input().split())\n\nif N - temp > -1:\n print(N - temp)\nelse:\n print("-1")', 'N,M = input().split()\nN = int(N)\nM = int(M)\n\ntemp = sum(list(map(int,input().split())))\n\nif N - temp > -1:\n print(N - temp)\nelse:\n print("-1")\n'] | ['Runtime Error', 'Accepted'] | ['s665646801', 's457260016'] | [9664.0, 10060.0] | [22.0, 22.0] | [129, 145] |
p02706 | u201993393 | 2,000 | 1,048,576 | Takahashi has N days of summer vacation. His teacher gave him M summer assignments. It will take A_i days for him to do the i-th assignment. He cannot do multiple assignments on the same day, or hang out on a day he does an assignment. What is the maximum number of days Takahashi can hang out during the vacation if ... | ['N, M = map(int, input().split())\nA = list(map(int, input().split())\n\nprint(max(N - sum(A), - 1)) \n ', 'N, M = map(int, input().split())\nA = list(map(int, input().split()))\n\nprint(max(N - sum(A), -1))'] | ['Runtime Error', 'Accepted'] | ['s257071431', 's084100363'] | [9016.0, 10052.0] | [21.0, 23.0] | [115, 96] |
p02706 | u203471639 | 2,000 | 1,048,576 | Takahashi has N days of summer vacation. His teacher gave him M summer assignments. It will take A_i days for him to do the i-th assignment. He cannot do multiple assignments on the same day, or hang out on a day he does an assignment. What is the maximum number of days Takahashi can hang out during the vacation if ... | ['n, m = map(int, input.split())\na = list(map(int, input.split()))\nfinal = sum(a)\nif n > 0:\n print(n - a)\nelse:\n print(-1)\n ', 'N, M = map(int, input().split())\nA = list(map(int, input().split()))\ndaytofinish = sum(A)\nif N-daytofinish < 0:\n print(-1)\nelse:\n print(N-daytofinish)'] | ['Runtime Error', 'Accepted'] | ['s944368181', 's562311445'] | [9096.0, 9860.0] | [24.0, 21.0] | [131, 156] |
p02706 | u205087376 | 2,000 | 1,048,576 | Takahashi has N days of summer vacation. His teacher gave him M summer assignments. It will take A_i days for him to do the i-th assignment. He cannot do multiple assignments on the same day, or hang out on a day he does an assignment. What is the maximum number of days Takahashi can hang out during the vacation if ... | ["n,m = map(int,input().split())\na = [map(int,input().split()) for i in range(m)]\nb = sum(a)\nif n-a<0:\n print('-1')\nelse:\n print(int(n-a))", "n,m = map(int,input().split())\ntry:\n a = list(map(int,input().split()))\n b = int(sum(a))\nexcept EOFError:\n pass\nif int(n-b)<0:\n print('-1')\nelse:\n print(int... | ['Runtime Error', 'Accepted'] | ['s018689310', 's650329557'] | [9672.0, 9880.0] | [23.0, 22.0] | [138, 167] |
p02706 | u208309047 | 2,000 | 1,048,576 | Takahashi has N days of summer vacation. His teacher gave him M summer assignments. It will take A_i days for him to do the i-th assignment. He cannot do multiple assignments on the same day, or hang out on a day he does an assignment. What is the maximum number of days Takahashi can hang out during the vacation if ... | ['N,M = map(int, input().split())\nA = list(map(int, input().split()))\nsum = 0\n\nfor i in range(M):\n sum += A[i]\n\nprint(sum)\nans = N - sum\nif(ans >= 0):\n print(ans)\nelse:\n print(-1)\n\n', 'N,M = map(int, input().split())\nA = list(map(int, input().split()))\nsum = 0\n\nfor i in range(M):\n sum += ... | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s195738794', 's284499736', 's986484835'] | [9876.0, 9928.0, 9876.0] | [24.0, 24.0, 23.0] | [188, 149, 176] |
p02706 | u218071226 | 2,000 | 1,048,576 | Takahashi has N days of summer vacation. His teacher gave him M summer assignments. It will take A_i days for him to do the i-th assignment. He cannot do multiple assignments on the same day, or hang out on a day he does an assignment. What is the maximum number of days Takahashi can hang out during the vacation if ... | ['n, m = map(int, input().split())\nl = sum(map(int, input().split()))\nprint(n-s if s <= n else -1)', 'n, m = map(int, input().split())\ns = sum(map(int, input().split()))\nprint(n-s if s <= n else -1)'] | ['Runtime Error', 'Accepted'] | ['s462729709', 's766156004'] | [9544.0, 9532.0] | [23.0, 22.0] | [96, 96] |
p02706 | u218341628 | 2,000 | 1,048,576 | Takahashi has N days of summer vacation. His teacher gave him M summer assignments. It will take A_i days for him to do the i-th assignment. He cannot do multiple assignments on the same day, or hang out on a day he does an assignment. What is the maximum number of days Takahashi can hang out during the vacation if ... | ['vacationDayCount, homeworkCount = map(int, input().split())\nrequiredDayList = list(map(int, input.split()))\n\nplayableDayCount = vacationDayCount - sum(requiredDayList)\n\nif(playableDayCount >= 0):\n print(playableDayCount)\nelse:\n print(-1)', 'vacationDayCount, homeworkCount = map(int, input().split())\nre... | ['Runtime Error', 'Accepted'] | ['s257892023', 's376446236'] | [9180.0, 10052.0] | [26.0, 23.0] | [243, 245] |
p02706 | u221061152 | 2,000 | 1,048,576 | Takahashi has N days of summer vacation. His teacher gave him M summer assignments. It will take A_i days for him to do the i-th assignment. He cannot do multiple assignments on the same day, or hang out on a day he does an assignment. What is the maximum number of days Takahashi can hang out during the vacation if ... | ['n,m=map(int,input().split())\n\nprint( max( -1,sum( list(map(int,input().split() ) ) ) ) )', 'n,m=map(int,input().split())\nA=sum(list(map(int,input().split())))\nprint(max(-1,N-A))', 'n,m=map(int,input().split())\nA=list(map(int,input().split()))\nprint(max(-1,n-sum(A)))'] | ['Wrong Answer', 'Runtime Error', 'Accepted'] | ['s704052589', 's772995892', 's617932002'] | [9908.0, 9980.0, 9872.0] | [33.0, 30.0, 30.0] | [88, 85, 85] |
p02706 | u221888299 | 2,000 | 1,048,576 | Takahashi has N days of summer vacation. His teacher gave him M summer assignments. It will take A_i days for him to do the i-th assignment. He cannot do multiple assignments on the same day, or hang out on a day he does an assignment. What is the maximum number of days Takahashi can hang out during the vacation if ... | ['N,M = map(int, input().split())\nA = list(map(int, input().split()))\nAA = 0\nfor i in range(M):\n AA = AA+A[i]\nprint(AA)\nif N-(AA) >= 0:\n print(N-AA)\nelse:\n print(-1)', 'N,M = map(int, input().split())\nA = list(map(int, input().split()))\nAA = 0\nfor i in range(M):\n AA = AA+A[i]\nif N-(AA) >= 0:\n... | ['Wrong Answer', 'Accepted'] | ['s584613425', 's012271141'] | [10124.0, 10064.0] | [24.0, 23.0] | [172, 162] |
p02706 | u231484984 | 2,000 | 1,048,576 | Takahashi has N days of summer vacation. His teacher gave him M summer assignments. It will take A_i days for him to do the i-th assignment. He cannot do multiple assignments on the same day, or hang out on a day he does an assignment. What is the maximum number of days Takahashi can hang out during the vacation if ... | ['N,M = map(int, input().split())\nA = map(int, input().split())\nif N >= sum(A):\n print((N)-(sum(A)))\nelse:\n print("-1")\n', 'N,M = map(int, input().split())\nA = map(int, input().split())\nZ = sum(A)\nif (N) >= (Z):\n print((N)-(Z))\nelse:\n print("-1")'] | ['Wrong Answer', 'Accepted'] | ['s379228656', 's583180666'] | [9664.0, 9664.0] | [26.0, 24.0] | [124, 128] |
p02706 | u232860859 | 2,000 | 1,048,576 | Takahashi has N days of summer vacation. His teacher gave him M summer assignments. It will take A_i days for him to do the i-th assignment. He cannot do multiple assignments on the same day, or hang out on a day he does an assignment. What is the maximum number of days Takahashi can hang out during the vacation if ... | ["N, M = [int(s) for s in input().split(' ')]\nA = [int(s) for s in input().split(' ')]\n\ntask_days = sum(A)\n\nif N < task_days:\n return -1\nelse:\n return N - task_days", "N, M = [int(s) for s in input().split(' ')]\nA = [int(s) for s in input().split(' ')]\n\ntask_days = sum(A)\n\nif N < task_days:\n prin... | ['Runtime Error', 'Accepted'] | ['s883637070', 's344386225'] | [9100.0, 10192.0] | [23.0, 21.0] | [168, 168] |
p02706 | u235066013 | 2,000 | 1,048,576 | Takahashi has N days of summer vacation. His teacher gave him M summer assignments. It will take A_i days for him to do the i-th assignment. He cannot do multiple assignments on the same day, or hang out on a day he does an assignment. What is the maximum number of days Takahashi can hang out during the vacation if ... | ["n,m=[int(i)for i in input()]\nlist=[int(i) for i in input().split()]\na=n-sum(list)\nif a>=0:\n print(a)\nelse:\n print('-1')", "n,m=[int(i)for i in input().split()]\nlist=[int(i) for i in input().split()]\na=n-sum(list)\nif a>=0:\n print(a)\nelse:\n print('-1')"] | ['Runtime Error', 'Accepted'] | ['s274946643', 's763832800'] | [9120.0, 9988.0] | [20.0, 23.0] | [121, 129] |
p02706 | u237634011 | 2,000 | 1,048,576 | Takahashi has N days of summer vacation. His teacher gave him M summer assignments. It will take A_i days for him to do the i-th assignment. He cannot do multiple assignments on the same day, or hang out on a day he does an assignment. What is the maximum number of days Takahashi can hang out during the vacation if ... | ['n, m = map(int, input().split())\na = list(map(int, input().split()))\n\nfor i in range(m):\n ans = a[i]\n \nprint(n - ans)', 'n, m = map(int, input().split())\na = list(map(int, input().split()))\n \nprint(max(-1, n - sum(a)))\n'] | ['Wrong Answer', 'Accepted'] | ['s903802389', 's162996258'] | [10012.0, 9868.0] | [30.0, 31.0] | [119, 99] |
p02706 | u239528020 | 2,000 | 1,048,576 | Takahashi has N days of summer vacation. His teacher gave him M summer assignments. It will take A_i days for him to do the i-th assignment. He cannot do multiple assignments on the same day, or hang out on a day he does an assignment. What is the maximum number of days Takahashi can hang out during the vacation if ... | ['#!/usr/bin/env python3\n\nn, m = list(map(int, input().split()))\na = list(map(int, input().split()))\n\nsum_a = sum(a)\nif sum_a > n:\n print(-1)\nelse:\n print(sum_a-n)\n', '#!/usr/bin/env python3\n\nn, m = list(map(int, input().split()))\na = list(map(int, input().split()))\n\nsum_a = sum(a)\nif sum_a > n:\n... | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s443399534', 's755220543', 's052013691'] | [9892.0, 9880.0, 9892.0] | [24.0, 22.0, 26.0] | [168, 168, 168] |
p02706 | u250664216 | 2,000 | 1,048,576 | Takahashi has N days of summer vacation. His teacher gave him M summer assignments. It will take A_i days for him to do the i-th assignment. He cannot do multiple assignments on the same day, or hang out on a day he does an assignment. What is the maximum number of days Takahashi can hang out during the vacation if ... | ['n,m = map(int, input().split())\nan = list(map(int, input().split()))\nsum_a = sum(an)\nif an - sum_a < 0:\n print(-1)\nelse:\n print(an-sum_a)', 'n,m = map(int, input().split())\nan = list(map(int, input().split()))\nsum_a = sum(an)\nif n - sum_a < 0:\n print(-1)\nelse:\n print(n-sum_a)'] | ['Runtime Error', 'Accepted'] | ['s865621677', 's118440307'] | [9872.0, 10184.0] | [23.0, 21.0] | [143, 141] |
p02706 | u252964975 | 2,000 | 1,048,576 | Takahashi has N days of summer vacation. His teacher gave him M summer assignments. It will take A_i days for him to do the i-th assignment. He cannot do multiple assignments on the same day, or hang out on a day he does an assignment. What is the maximum number of days Takahashi can hang out during the vacation if ... | ['N,M=map(int, input().split())\nA=list(map(int, input().split()))\nif sum(A)>=N:\n print(N-sum(A))\nelse:\n print(-1)', 'N,M=map(int, input().split())\nA=list(map(int, input().split()))\nif sum(A)<=N:\n print(N-sum(A))\nelse:\n print(-1)\n'] | ['Wrong Answer', 'Accepted'] | ['s176578588', 's054952924'] | [10056.0, 10044.0] | [23.0, 24.0] | [113, 114] |
p02706 | u255422179 | 2,000 | 1,048,576 | Takahashi has N days of summer vacation. His teacher gave him M summer assignments. It will take A_i days for him to do the i-th assignment. He cannot do multiple assignments on the same day, or hang out on a day he does an assignment. What is the maximum number of days Takahashi can hang out during the vacation if ... | ['n,m = map(int,input().split())\na = [int(i) for i in input().split()]\ns = sum(a)\nif(n=>s):\n print(n-s)\nelse:\n print("-1")', 'n,m = map(int,input().split())\na = [int(i) for i in input().split()]\ns = sum(a)\nif(n>=s):\n print(n-s)\nelse:\n print("-1")'] | ['Runtime Error', 'Accepted'] | ['s559579881', 's934664590'] | [8840.0, 10196.0] | [25.0, 23.0] | [122, 122] |
p02706 | u257265865 | 2,000 | 1,048,576 | Takahashi has N days of summer vacation. His teacher gave him M summer assignments. It will take A_i days for him to do the i-th assignment. He cannot do multiple assignments on the same day, or hang out on a day he does an assignment. What is the maximum number of days Takahashi can hang out during the vacation if ... | ['N M = map(int,input().split())\nList = list(map(int,input().split()))\nprint(N-sum(List) if N-sum(List) >= 0 else -1)\n', 'N M = map(int,input().split())\nList = [map(int,input().split())]\nprint(N-sum(List) if N-sum(List) >= 0 else -1)', 'N M = map(int,input().split())\nList = list(map(int,input().split()))\nprint(N... | ['Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted'] | ['s257356182', 's413808461', 's622570313', 's281826180'] | [8948.0, 8944.0, 9012.0, 10016.0] | [22.0, 20.0, 20.0, 22.0] | [116, 111, 116, 114] |
p02706 | u257442624 | 2,000 | 1,048,576 | Takahashi has N days of summer vacation. His teacher gave him M summer assignments. It will take A_i days for him to do the i-th assignment. He cannot do multiple assignments on the same day, or hang out on a day he does an assignment. What is the maximum number of days Takahashi can hang out during the vacation if ... | ['NM = list(map(int, input().split()))\nN, M = NM[0],NM[1]\na = list(map(int, input().split()))\n\nif sum(a)> N:\n print(-1)\nelse:\n print(N - sum(A))', 'NM = list(map(int, input().split())\nN, M = NM[0],NM[1]\na = list(map(int, input().split()))\nx = 0\nfor i in range(M):\n x += a[i]\n\nif x > N:\n print... | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s610609302', 's799102741', 's847623846'] | [10044.0, 8924.0, 10048.0] | [22.0, 21.0, 20.0] | [149, 177, 149] |
p02706 | u257695767 | 2,000 | 1,048,576 | Takahashi has N days of summer vacation. His teacher gave him M summer assignments. It will take A_i days for him to do the i-th assignment. He cannot do multiple assignments on the same day, or hang out on a day he does an assignment. What is the maximum number of days Takahashi can hang out during the vacation if ... | ['a = [int(x) for x in input().split() if x != "0"]\n\nif a[0]-(sum(a)-a[0]-a[1]) >= 0 :{\n\tprint(a[0]-(sum(a)-a[0]-a[1]))\n\t}\nelse :{\n\tprint(-1)\n\t}', 'N,M= map(int, input().split())\nA = list(map(int, input().split()))\n\n\nif N-sum(A) >= 0 :{\n\tprint(N-sum(A))\n\t}\nelse :{\n\tprint(-1)\n\t}'] | ['Wrong Answer', 'Accepted'] | ['s697875956', 's282401111'] | [9176.0, 10096.0] | [20.0, 24.0] | [142, 130] |
p02706 | u268314634 | 2,000 | 1,048,576 | Takahashi has N days of summer vacation. His teacher gave him M summer assignments. It will take A_i days for him to do the i-th assignment. He cannot do multiple assignments on the same day, or hang out on a day he does an assignment. What is the maximum number of days Takahashi can hang out during the vacation if ... | ['n,m = map(int, input().split())\na= list(map(int, input().split()))\nif sum(a)<=n:\n print("1")\nelse:\n print("-1")', '\nn,m = map(int, input().split())\na= sum(list(map(int, input().split())))\nif n-a>=0:\n print(n-a)\nelse:\n print("-1")\n\n\n'] | ['Wrong Answer', 'Accepted'] | ['s546617855', 's373838300'] | [9852.0, 10176.0] | [31.0, 31.0] | [117, 123] |
p02706 | u269778596 | 2,000 | 1,048,576 | Takahashi has N days of summer vacation. His teacher gave him M summer assignments. It will take A_i days for him to do the i-th assignment. He cannot do multiple assignments on the same day, or hang out on a day he does an assignment. What is the maximum number of days Takahashi can hang out during the vacation if ... | ['m,n = int(input())\nli = list(map(int,input().split()))\nif sum(li)>m:\n print(-1)\nelse:\n print(m - sum(li))', 'm,n = list(map(int,input().split()))\nli = list(map(int,input().split()))\nif sum(li)>m:\n print(-1)\nelse:\n print(m - sum(li))\n'] | ['Runtime Error', 'Accepted'] | ['s599089137', 's825497980'] | [9180.0, 9876.0] | [24.0, 23.0] | [107, 126] |
p02706 | u270886147 | 2,000 | 1,048,576 | Takahashi has N days of summer vacation. His teacher gave him M summer assignments. It will take A_i days for him to do the i-th assignment. He cannot do multiple assignments on the same day, or hang out on a day he does an assignment. What is the maximum number of days Takahashi can hang out during the vacation if ... | ['N = int(input())\nM = int(input())\n\nA = [input()for i in range(M)]\n\nx = N\n\nfor j in range(M):\n x = x - int(A[j])\n j += 1\n\nif x < 0 :\n print(-1)\n\nelse :\n print(x)\n', 'N,M = (input().strip().split())\n\n\nA = list(map(int,input().strip().split()))\n\nx = int(N)\n\nfor j in range(int(M)):\n ... | ['Runtime Error', 'Accepted'] | ['s826625844', 's101628779'] | [9192.0, 10028.0] | [22.0, 21.0] | [186, 207] |
p02706 | u271063202 | 2,000 | 1,048,576 | Takahashi has N days of summer vacation. His teacher gave him M summer assignments. It will take A_i days for him to do the i-th assignment. He cannot do multiple assignments on the same day, or hang out on a day he does an assignment. What is the maximum number of days Takahashi can hang out during the vacation if ... | ['n,m = map(int,input().split())\na = [map(int,input().split())]\nprint(max(n-sum(a)),-1)\n', 'n,m = map(int,input().split())\na = list(map(int,input().split()))\nprint(max(n-sum(a),-1))\n'] | ['Runtime Error', 'Accepted'] | ['s842790069', 's693043821'] | [9580.0, 10000.0] | [25.0, 31.0] | [86, 90] |
p02706 | u276686572 | 2,000 | 1,048,576 | Takahashi has N days of summer vacation. His teacher gave him M summer assignments. It will take A_i days for him to do the i-th assignment. He cannot do multiple assignments on the same day, or hang out on a day he does an assignment. What is the maximum number of days Takahashi can hang out during the vacation if ... | ['arr = list(map(int, input().split()))\nais = list(map(int, input().split()))\n\ndays,tasks = arr[0],arr[1]\n\ndef main(days, ais):\n sum = 0\n for i in ais:\n sum += 0\n if sum > days: return -1\n\n return days - sum\n\nprint(main(days, ais))\n', 'arr = list(map(int, input().split()))\nais = list(map(int, in... | ['Wrong Answer', 'Accepted'] | ['s288938196', 's954746857'] | [9940.0, 9852.0] | [30.0, 33.0] | [239, 239] |
p02706 | u277314812 | 2,000 | 1,048,576 | Takahashi has N days of summer vacation. His teacher gave him M summer assignments. It will take A_i days for him to do the i-th assignment. He cannot do multiple assignments on the same day, or hang out on a day he does an assignment. What is the maximum number of days Takahashi can hang out during the vacation if ... | ['n, m = input().split()\na = list(map(int, input().split()))\nprint(max(n-sum(a),-1))', 'n, m = map(int,input().split())\na = list(map(int, input().split()))\nprint(max(n-sum(a),-1))'] | ['Runtime Error', 'Accepted'] | ['s414154136', 's784470616'] | [9984.0, 10064.0] | [25.0, 24.0] | [82, 91] |
p02706 | u277353449 | 2,000 | 1,048,576 | Takahashi has N days of summer vacation. His teacher gave him M summer assignments. It will take A_i days for him to do the i-th assignment. He cannot do multiple assignments on the same day, or hang out on a day he does an assignment. What is the maximum number of days Takahashi can hang out during the vacation if ... | ['n,m=map(int,input().split())\na=list(map(int,input().split()))\nif n-sum(a)<=0:\n print(-1)\nelse print(n-sum(a))', 'n,m=map(int,input().split())\na=list(map(int,input().split()))\nif n-sum(a)<0:\n print(-1)\nelse:\n print(n-sum(a))'] | ['Runtime Error', 'Accepted'] | ['s845870808', 's515819743'] | [9028.0, 10056.0] | [21.0, 22.0] | [110, 116] |
p02706 | u284167015 | 2,000 | 1,048,576 | Takahashi has N days of summer vacation. His teacher gave him M summer assignments. It will take A_i days for him to do the i-th assignment. He cannot do multiple assignments on the same day, or hang out on a day he does an assignment. What is the maximum number of days Takahashi can hang out during the vacation if ... | ['N = int(input())\nM = int(input())\n\nA = 0\n\nfor i in range(M):\n A += int(input())\n\nif M < A:\n print(N-A)\n\nelse:\n print(-1)', 'N = int(input())\nM = int(input())\n\nA = 0\n\nfor i in range(M):\n A += int(input())\n\nif M < A:\n print(N-A)\n\nelse:\n print(-1)', 'N = int(input())\n\nA = []\n\nfor i in r... | ['Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Wrong Answer', 'Accepted'] | ['s117777530', 's143360512', 's288715981', 's675725520', 's790436885', 's928815309', 's975650508', 's698799648'] | [9112.0, 9188.0, 9216.0, 9180.0, 9176.0, 9180.0, 9452.0, 9876.0] | [24.0, 20.0, 21.0, 25.0, 21.0, 23.0, 24.0, 24.0] | [123, 123, 227, 123, 129, 123, 122, 129] |
p02706 | u290160862 | 2,000 | 1,048,576 | Takahashi has N days of summer vacation. His teacher gave him M summer assignments. It will take A_i days for him to do the i-th assignment. He cannot do multiple assignments on the same day, or hang out on a day he does an assignment. What is the maximum number of days Takahashi can hang out during the vacation if ... | ['import numpy as np\ntmp = np.array(list(map(int, input().split())))\nN = tmp[0]\nM = tmp[1]\nA = np.array(tmp[2:])\nNeeded = np.sum(A)\nif Needed > N:\n print(str(-1))\nelse:\n print(str(N - Needed))', 'import numpy as np\n\ntmp = np.array(list(map(int, input().split())))\nN = tmp[0]\nA = tmp[2:]\n\nNeeded = np... | ['Wrong Answer', 'Wrong Answer', 'Runtime Error', 'Accepted'] | ['s331530204', 's624115371', 's859185576', 's557100075'] | [27200.0, 27192.0, 27120.0, 27940.0] | [106.0, 106.0, 103.0, 101.0] | [196, 168, 175, 169] |
p02706 | u295585689 | 2,000 | 1,048,576 | Takahashi has N days of summer vacation. His teacher gave him M summer assignments. It will take A_i days for him to do the i-th assignment. He cannot do multiple assignments on the same day, or hang out on a day he does an assignment. What is the maximum number of days Takahashi can hang out during the vacation if ... | ['n,m = input().split()\na = [i for i in input.split()]\nif sum(a)>n:\n print(-1)\nelse:\n print(m-sum(a))', 'n,m = (int(x) for x in input().split())\na = [int(i) for i in input().split()]\nif sum(a)>n:\n print(-1)\nelse:\n print(n-sum(a))'] | ['Runtime Error', 'Accepted'] | ['s015092607', 's445657270'] | [9048.0, 9888.0] | [19.0, 24.0] | [105, 130] |
p02706 | u296989351 | 2,000 | 1,048,576 | Takahashi has N days of summer vacation. His teacher gave him M summer assignments. It will take A_i days for him to do the i-th assignment. He cannot do multiple assignments on the same day, or hang out on a day he does an assignment. What is the maximum number of days Takahashi can hang out during the vacation if ... | ['n,m = map(int,input().split())\na = list(map(int,iuput().split()))\nx = n - sum(a)\nif x >= 0:\n print(x)\nelse:\n print("-1")', 'n,m = map(int,input().split())\na = list(map(int,iuput().split()))\na_sum = sum(a)\nx = n - a_sum\nif x >= 0:\n print(x)\nelse:\n print(-1)', 'n,m = map(int,input().split())\na... | ['Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted'] | ['s138532932', 's450063366', 's466449073', 's742738527'] | [9116.0, 9168.0, 9148.0, 10004.0] | [23.0, 21.0, 23.0, 23.0] | [126, 138, 124, 159] |
p02706 | u302292660 | 2,000 | 1,048,576 | Takahashi has N days of summer vacation. His teacher gave him M summer assignments. It will take A_i days for him to do the i-th assignment. He cannot do multiple assignments on the same day, or hang out on a day he does an assignment. What is the maximum number of days Takahashi can hang out during the vacation if ... | ['m,n = map(int,input().split())\nl = list(map(int,input().split()))\nfor i in range(n):\n s += l[i]\nprint(max(m-s,-1))', 'm,n = map(int,input().split())\nl = list(map(int,input().split()))\ns = 0\nfor i in range(n):\n s += l[i]\nprint(max(m-s,-1))'] | ['Runtime Error', 'Accepted'] | ['s363302898', 's406276484'] | [10060.0, 10192.0] | [24.0, 23.0] | [115, 121] |
p02706 | u303739137 | 2,000 | 1,048,576 | Takahashi has N days of summer vacation. His teacher gave him M summer assignments. It will take A_i days for him to do the i-th assignment. He cannot do multiple assignments on the same day, or hang out on a day he does an assignment. What is the maximum number of days Takahashi can hang out during the vacation if ... | ['n, m = map(int, input().split())\naa = list(map(int, input().split()))\nprint(min(-1,n - sum(aa)))', 'n, m = map(int, input().split())\naa = list(map(int, input().split()))\nprint(max(-1,n - sum(aa)))'] | ['Wrong Answer', 'Accepted'] | ['s104478361', 's438905300'] | [10012.0, 9880.0] | [23.0, 22.0] | [96, 96] |
p02706 | u305892818 | 2,000 | 1,048,576 | Takahashi has N days of summer vacation. His teacher gave him M summer assignments. It will take A_i days for him to do the i-th assignment. He cannot do multiple assignments on the same day, or hang out on a day he does an assignment. What is the maximum number of days Takahashi can hang out during the vacation if ... | ['N = input()\nM = input()\nsumA = 0\nfor i in range(int(M)):\n sumA += int(input())\nplayday = int(N)-sumA\nif playday >= 0:\n print(playday)\nelse:\n print(-1)', 'N = int(input())\nM = int(input())\nfor i in range(M):\n N = N - int(input())\nif N >= 0:\n print(N)\nelse:\n print(-1)', 'N = int(input... | ['Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted'] | ['s008760037', 's153814894', 's450159817', 's766558076'] | [9200.0, 9120.0, 9108.0, 9820.0] | [25.0, 23.0, 23.0, 26.0] | [159, 122, 122, 189] |
p02706 | u306033313 | 2,000 | 1,048,576 | Takahashi has N days of summer vacation. His teacher gave him M summer assignments. It will take A_i days for him to do the i-th assignment. He cannot do multiple assignments on the same day, or hang out on a day he does an assignment. What is the maximum number of days Takahashi can hang out during the vacation if ... | ['n, m = map(int, input().split())\nlis = list(map(int, input().split()))\n\nprint(lis)\nans = n\nfor i in range(m):\n ans -= lis[i]\nif ans >= 0:\n print(ans)\nelse:\n print("-1")', 'n, m = map(int, input().split())\nlis = list(map(int, input().split()))\n\n\nans = n\nfor i in range(m):\n ans -= lis[i]\nif... | ['Wrong Answer', 'Accepted'] | ['s184969364', 's058811601'] | [10116.0, 9876.0] | [25.0, 25.0] | [177, 167] |
p02706 | u306260540 | 2,000 | 1,048,576 | Takahashi has N days of summer vacation. His teacher gave him M summer assignments. It will take A_i days for him to do the i-th assignment. He cannot do multiple assignments on the same day, or hang out on a day he does an assignment. What is the maximum number of days Takahashi can hang out during the vacation if ... | ['n, m = map(int, input.split())\na = list(map(int, input.split()))\nsum = 0\nfor i in a:\n sum += i\nif n >= sum:\n print(n - sum)\nelse:\n print(-1)', 'n, m = map(int, input().split())\na = list(map(int, input().split()))\nsum = 0\nfor i in a:\n sum += i\nif n >= sum:\n print(n - sum)\nelse:\n print... | ['Runtime Error', 'Accepted'] | ['s961273839', 's734819441'] | [9108.0, 9988.0] | [20.0, 21.0] | [149, 154] |
p02706 | u307622233 | 2,000 | 1,048,576 | Takahashi has N days of summer vacation. His teacher gave him M summer assignments. It will take A_i days for him to do the i-th assignment. He cannot do multiple assignments on the same day, or hang out on a day he does an assignment. What is the maximum number of days Takahashi can hang out during the vacation if ... | ['n, m = map(int, input().split())\na = list(i for i in input().suplt)\n\nall_homework_day = sum(a)\n\nif all_homework_day <= n:\n play_day = all_homework_day\nelse:\n play_day = -1\n\nprint(play_day)', 'n, m = map(int, input().split())\na = list(int(i) for i in input().split())\n\nall_homework_day = sum(a)\n\nif... | ['Runtime Error', 'Accepted'] | ['s478975380', 's492239292'] | [9196.0, 10044.0] | [22.0, 21.0] | [194, 206] |
p02706 | u309120194 | 2,000 | 1,048,576 | Takahashi has N days of summer vacation. His teacher gave him M summer assignments. It will take A_i days for him to do the i-th assignment. He cannot do multiple assignments on the same day, or hang out on a day he does an assignment. What is the maximum number of days Takahashi can hang out during the vacation if ... | ['N, M = map(int, input().split()) \nA = [int(input()) for _ in range(M)]\n\ns = sum(A)\nans = -1\nif N >= s: ans = N - s\nprint(ans)', 'N, M = map(int, input().spit())\nA = [input() for _ in range(M)]\n\ns = sum(A)\nans = -1\nif N >= s: ans = N - s\nprint(ans)', 'N, M = map(int, input().split()) \nA = list(map(int, in... | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s032427931', 's561127222', 's478567594'] | [9156.0, 9036.0, 9856.0] | [24.0, 25.0, 32.0] | [125, 118, 160] |
p02706 | u310937700 | 2,000 | 1,048,576 | Takahashi has N days of summer vacation. His teacher gave him M summer assignments. It will take A_i days for him to do the i-th assignment. He cannot do multiple assignments on the same day, or hang out on a day he does an assignment. What is the maximum number of days Takahashi can hang out during the vacation if ... | ['N,M = map(int, input().split())\nlist = list(map(int, input().split()))\n\ni=0\nsum=0\n\nwhile i<=M:\n sum=sum+list[i]\n i=i+1\n \nif sum>N:\n print("-1")\n \nelse:\n print(sum-N)', 'N,M = map(int, input().split())\nlist_1 = list(map(int, input().split()))\n \ni=0\nsum=0\n \nwhile i<=M:\n sum=sum+list_1[i]\n ... | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s434361134', 's771090303', 's247526196'] | [10056.0, 10192.0, 10000.0] | [23.0, 26.0, 21.0] | [171, 177, 181] |
p02706 | u312078744 | 2,000 | 1,048,576 | Takahashi has N days of summer vacation. His teacher gave him M summer assignments. It will take A_i days for him to do the i-th assignment. He cannot do multiple assignments on the same day, or hang out on a day he does an assignment. What is the maximum number of days Takahashi can hang out during the vacation if ... | ["N, M = map(int, input().split())\n\nheight = [input() for i in range(M)]\nsum = N - sum(height)\n\nif (sum >= 0):\n print(sum)\nelse:\n print('-1')\n", "import numpy as np\nN, M = map(int, input().split())\ndata = np.array(input().split(), dtype=np.int64)\n\n#height = [int(input()) for _ in range(M)]\nsum = N -... | ['Runtime Error', 'Accepted'] | ['s108019328', 's093685063'] | [9156.0, 27784.0] | [20.0, 110.0] | [146, 221] |
p02706 | u314050667 | 2,000 | 1,048,576 | Takahashi has N days of summer vacation. His teacher gave him M summer assignments. It will take A_i days for him to do the i-th assignment. He cannot do multiple assignments on the same day, or hang out on a day he does an assignment. What is the maximum number of days Takahashi can hang out during the vacation if ... | ['N, M = map(int, input().split())\nA = np.array(list(map(int, input().split())))\ntot = np.sum(A)\n\nif tot > N:\n\tprint(-1)\nelse:\n\tprint(N-tot)', 'import numpy as np\nimport sys\nread = sys.stdin.read\nreadline = sys.stdin.readline\nreadlines = sys.stdin.readlines\n\nN, M = map(int, input().split())\nA = np.array... | ['Runtime Error', 'Accepted'] | ['s197644375', 's440744817'] | [9180.0, 27780.0] | [22.0, 105.0] | [138, 253] |
p02706 | u316649390 | 2,000 | 1,048,576 | Takahashi has N days of summer vacation. His teacher gave him M summer assignments. It will take A_i days for him to do the i-th assignment. He cannot do multiple assignments on the same day, or hang out on a day he does an assignment. What is the maximum number of days Takahashi can hang out during the vacation if ... | ['n,m = map(int,input().split())\nA = list(map(int,input(),split()))\na = int(sum(A))\n \nif n >= a:\n print(n-a)\nelse:\n print(-1)', 'n,m = map(int,input().split())\nA = list(map(int,input(),split()))\na = sum(A)\n\nif n>=a:\n print(n-a)\nelse:\n print(-1)', 'N, M = map(int, input().split())\nA = list(map(int, in... | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s275666611', 's759129242', 's829817418'] | [9208.0, 9276.0, 9888.0] | [22.0, 23.0, 24.0] | [125, 117, 120] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.