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 |
|---|---|---|---|---|---|---|---|---|---|---|
p02996 | u429003912 | 2,000 | 1,048,576 | Kizahashi, who was appointed as the administrator of ABC at National Problem Workshop in the Kingdom of AtCoder, got too excited and took on too many jobs. Let the current time be time 0. Kizahashi has N jobs numbered 1 to N. It takes A_i units of time for Kizahashi to complete Job i. The deadline for Job i is time B... | ['N = int(input())\ndata = [map(int, input().split()) for i in range(N)]\n\nds = sorted(data, key=lambda x: x[1])\n\nnow = 0\n\nfor i in range(N) :\n if now + ds[i][0] > ds[i][1] :\n print("No")\n break\n else :\n now = now + ds[0]\n \n if i == N-1 :\n print("Yes)', 'N = int(input())\ndata = [list(map(i... | ['Runtime Error', 'Accepted'] | ['s748034421', 's396828227'] | [3064.0, 53596.0] | [17.0, 1051.0] | [263, 272] |
p02996 | u434967413 | 2,000 | 1,048,576 | Kizahashi, who was appointed as the administrator of ABC at National Problem Workshop in the Kingdom of AtCoder, got too excited and took on too many jobs. Let the current time be time 0. Kizahashi has N jobs numbered 1 to N. It takes A_i units of time for Kizahashi to complete Job i. The deadline for Job i is time B... | ['N = int(input())\nA_B = [list(map(int, input().split())) for _ in range(N)]\nA_B.sort(key=lambda x: x[1])\ncount = 0\nprint(A_B)\nfor i in range(N):\n if count + A_B[i][0] <= A_B[i][1]:\n count += A_B[i][0]\n continue\n print("No")\n break\nelse:\n print("Yes")\n', 'N = int(input())\nA_B = [... | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s163382020', 's611644081', 's875744117'] | [62504.0, 62504.0, 53724.0] | [1082.0, 1084.0, 965.0] | [276, 288, 265] |
p02996 | u441575327 | 2,000 | 1,048,576 | Kizahashi, who was appointed as the administrator of ABC at National Problem Workshop in the Kingdom of AtCoder, got too excited and took on too many jobs. Let the current time be time 0. Kizahashi has N jobs numbered 1 to N. It takes A_i units of time for Kizahashi to complete Job i. The deadline for Job i is time B... | ['N = int(input())\n\nAB = []\nfor i in range(N):\n AB.append(list(map(int, input().split())))\n\nAB.sort(key=lambda x: x[1],reverse=True)\nprint(AB)\ntime = AB[0][1]\nfor i in range(1,N):\n if time-AB[i-1][0] < AB[i][1]:\n time = time-AB[i-1][0]\n else:\n time = AB[i][1]\n print(i,time)\ntime... | ['Wrong Answer', 'Accepted'] | ['s178061554', 's609548651'] | [62628.0, 53848.0] | [1408.0, 1003.0] | [387, 350] |
p02996 | u442251195 | 2,000 | 1,048,576 | Kizahashi, who was appointed as the administrator of ABC at National Problem Workshop in the Kingdom of AtCoder, got too excited and took on too many jobs. Let the current time be time 0. Kizahashi has N jobs numbered 1 to N. It takes A_i units of time for Kizahashi to complete Job i. The deadline for Job i is time B... | ['\nn = int(input())\na = []\ni = 0\nwhile i < n:\n a.append(list(map(int, input().split())))\n i += 1\n\na.sort(key = lambda x: x[1])\n\ni = 0\nt = 0\nwhile i < n:\n t += a[i][0]\n if t > a[i][1]:\n break\n i += 1\n\nprint("YES" if i >= n else "NO")\n', '\nn = int(input())\na = []\ni = 0\nwhile i... | ['Wrong Answer', 'Accepted'] | ['s252930612', 's118182612'] | [53716.0, 53716.0] | [1011.0, 1059.0] | [253, 252] |
p02996 | u451017206 | 2,000 | 1,048,576 | Kizahashi, who was appointed as the administrator of ABC at National Problem Workshop in the Kingdom of AtCoder, got too excited and took on too many jobs. Let the current time be time 0. Kizahashi has N jobs numbered 1 to N. It takes A_i units of time for Kizahashi to complete Job i. The deadline for Job i is time B... | ["N = int(input())\nl = [[int(j) for j in input().split()] for i in range(N)]\nl = sorted(l, lambda x:x[1])\ns = 0\nans = 'Yes'\nfor a,b in l:\n s += a\n if s > b:\n ans = 'No'\n break\n\nprint('Yes')", "N = int(input())\nl = [[int(j) for j in input().split()] for i in range(N)]\nl = sorted(l, key=l... | ['Runtime Error', 'Accepted'] | ['s388066247', 's692831596'] | [39480.0, 42716.0] | [609.0, 883.0] | [207, 209] |
p02996 | u452066060 | 2,000 | 1,048,576 | Kizahashi, who was appointed as the administrator of ABC at National Problem Workshop in the Kingdom of AtCoder, got too excited and took on too many jobs. Let the current time be time 0. Kizahashi has N jobs numbered 1 to N. It takes A_i units of time for Kizahashi to complete Job i. The deadline for Job i is time B... | ['n = int(input())\nba = []\nfor i in range(n):\n a, b = (int(j) for j in input().split())\n tmp = []\n tmp.append(b)\n tmp.append(a)\n ba.append(tmp)\nba.sort()\nprint(ba)\ns = 0\nf = True\nfor i in range(n):\n s += ba[i][1]\n if ba[i][0] < s:\n f = False\n break\nif f:\n print("Y... | ['Wrong Answer', 'Accepted'] | ['s978016261', 's684696408'] | [50072.0, 38824.0] | [1306.0, 1215.0] | [326, 318] |
p02996 | u452512115 | 2,000 | 1,048,576 | Kizahashi, who was appointed as the administrator of ABC at National Problem Workshop in the Kingdom of AtCoder, got too excited and took on too many jobs. Let the current time be time 0. Kizahashi has N jobs numbered 1 to N. It takes A_i units of time for Kizahashi to complete Job i. The deadline for Job i is time B... | ['N = int(input())\n\nlst = []\nfor i in range(N):\n N, K = map(int, input().split())\n lst.append((N, K))\n\nlst.sort(key=lambda tup: tup[1])\ncount = 0\nfor x in lst:\n if count > x[0]:\n print("No")\n exit()\n count += x[1]\n\nprint("Yes")\n', 'N = int(input())\n\nlst = []\nfor i in range(N):\n N, K = map... | ['Wrong Answer', 'Accepted'] | ['s223957250', 's162290339'] | [31860.0, 31808.0] | [710.0, 783.0] | [236, 233] |
p02996 | u460745860 | 2,000 | 1,048,576 | Kizahashi, who was appointed as the administrator of ABC at National Problem Workshop in the Kingdom of AtCoder, got too excited and took on too many jobs. Let the current time be time 0. Kizahashi has N jobs numbered 1 to N. It takes A_i units of time for Kizahashi to complete Job i. The deadline for Job i is time B... | ['N = int(input())\nA_B = [list(map(int,input().split())) for i in range(N)]\nA_B = sorted(A_B,key=itemgetter(1))\n\ns=0\nfor a_b in A_B:\n s+=a_b[0]\n lim = a_b[1]\n if s > lim:\n print("No")\n exit()\nprint("Yes")\n', 'import sys\nfrom operator import itemgetter\ninput = sys.stdin.readline\nN = int(input())\... | ['Runtime Error', 'Accepted'] | ['s453500308', 's121091159'] | [50356.0, 55288.0] | [657.0, 681.0] | [223, 295] |
p02996 | u464244643 | 2,000 | 1,048,576 | Kizahashi, who was appointed as the administrator of ABC at National Problem Workshop in the Kingdom of AtCoder, got too excited and took on too many jobs. Let the current time be time 0. Kizahashi has N jobs numbered 1 to N. It takes A_i units of time for Kizahashi to complete Job i. The deadline for Job i is time B... | ['import sys\ninput = sys.stdin.readline\n\n\ndef main():\n AB = []\n n = int(input())\n for i in range(n):\n a, b = map(int, input().split())\n AB.append([a, b])\n AB = sorted(AB, key=lambda x: (x[1], -x[0]))\n time = 0\n for span, dead in zip(AB):\n time += span\n if time... | ['Runtime Error', 'Accepted'] | ['s531558055', 's613810025'] | [58544.0, 58500.0] | [657.0, 699.0] | [424, 419] |
p02996 | u481101428 | 2,000 | 1,048,576 | Kizahashi, who was appointed as the administrator of ABC at National Problem Workshop in the Kingdom of AtCoder, got too excited and took on too many jobs. Let the current time be time 0. Kizahashi has N jobs numbered 1 to N. It takes A_i units of time for Kizahashi to complete Job i. The deadline for Job i is time B... | ['\nN = int(input())\na = [0] * N\nb = [0] * N\nc = [0] *N\n\n\nfor i in range(N):\n a[i],b[i] = map(int,input().split())\n c[i] = [b[i],a[i]]\n \nc.sort()\nsums = 0\ncorrect = 1\nfor i in range(N):\n sums+=c[i][1]\n print(sums)\n if c[i][0] < sums:\n correct=0\n break\n \nif corre... | ['Wrong Answer', 'Wrong Answer', 'Runtime Error', 'Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s084096648', 's534147133', 's861370335', 's960622837', 's966295841', 's585816464'] | [40108.0, 46480.0, 38844.0, 40288.0, 38800.0, 38844.0] | [1202.0, 1318.0, 973.0, 1044.0, 1037.0, 1097.0] | [339, 351, 346, 322, 322, 355] |
p02996 | u493520238 | 2,000 | 1,048,576 | Kizahashi, who was appointed as the administrator of ABC at National Problem Workshop in the Kingdom of AtCoder, got too excited and took on too many jobs. Let the current time be time 0. Kizahashi has N jobs numbered 1 to N. It takes A_i units of time for Kizahashi to complete Job i. The deadline for Job i is time B... | ['def main():\n n = int(input())\n abl = []\n for _ in range(n):\n a, b = map(int, input().split()) \n abl.append([a,b])\n\n abl.sort(key=lambda x:x[1])\n curr_time = 0\n for curr_ab in abl:\n print(curr_time)\n a,b = curr_ab\n curr_time += a\n if curr_time > ... | ['Wrong Answer', 'Accepted'] | ['s874096077', 's201607500'] | [38048.0, 38048.0] | [1000.0, 790.0] | [407, 409] |
p02996 | u494058663 | 2,000 | 1,048,576 | Kizahashi, who was appointed as the administrator of ABC at National Problem Workshop in the Kingdom of AtCoder, got too excited and took on too many jobs. Let the current time be time 0. Kizahashi has N jobs numbered 1 to N. It takes A_i units of time for Kizahashi to complete Job i. The deadline for Job i is time B... | ["import sys\nN = int(input())\nList = []\nfor i in range(N):\n tmp_a,tmp_b = map(int,input().split())\n List.append([tmp_b,tmp_a])\nList.sort()\nSum_a= 0\n\nfor i in range(N):\n Sum_a += List[i][1]\n if Sum_a > List[i][0]:\n print('No')\n sys.exit()\nprint('YES')\n", "import sys\nN = int(inpu... | ['Wrong Answer', 'Accepted'] | ['s761939459', 's229172730'] | [35620.0, 35748.0] | [1040.0, 1030.0] | [275, 274] |
p02996 | u494379309 | 2,000 | 1,048,576 | Kizahashi, who was appointed as the administrator of ABC at National Problem Workshop in the Kingdom of AtCoder, got too excited and took on too many jobs. Let the current time be time 0. Kizahashi has N jobs numbered 1 to N. It takes A_i units of time for Kizahashi to complete Job i. The deadline for Job i is time B... | ['n = int(input())\n\ntasks = []\nfor _ in range(n):\n a,b = list(map(int,input().split(" ")))\n tasks.append(a,b)\n\ntasks = sorted(tasks,key = lambda x:x[1])\n\nnow_time = 0\nflag = True\nfor a,b in tasks:\n if now_time + a > b:\n flag = False\n break\n now_time += a\nif flag:\n print("Yes")\nelse:\n prin... | ['Runtime Error', 'Accepted'] | ['s107928918', 's269729742'] | [3188.0, 33400.0] | [18.0, 863.0] | [306, 308] |
p02996 | u500944229 | 2,000 | 1,048,576 | Kizahashi, who was appointed as the administrator of ABC at National Problem Workshop in the Kingdom of AtCoder, got too excited and took on too many jobs. Let the current time be time 0. Kizahashi has N jobs numbered 1 to N. It takes A_i units of time for Kizahashi to complete Job i. The deadline for Job i is time B... | ["n = int(input())\na_b_list = [list(map(int,input().split())) for x in range(n)]\na_b_list_kai = [[int(a_b_list[x]),int(a_b_list[x+1])] for x in range(0,n*2,2)]\nsorted(a_b_list_kai,key = lambda x:x[1])\nlimit = 0\nresult = 0\nsum_task = 0\nfor x in a_b_list_kai:\n sum_task += x[0]\n limit = max(limit,x[1])\n ... | ['Runtime Error', 'Accepted'] | ['s488648346', 's495053492'] | [50336.0, 55252.0] | [641.0, 983.0] | [404, 346] |
p02996 | u513900925 | 2,000 | 1,048,576 | Kizahashi, who was appointed as the administrator of ABC at National Problem Workshop in the Kingdom of AtCoder, got too excited and took on too many jobs. Let the current time be time 0. Kizahashi has N jobs numbered 1 to N. It takes A_i units of time for Kizahashi to complete Job i. The deadline for Job i is time B... | ['num1 = 2\nnum2 = 3\nchk = 0\nN,K =map(int,input().split())\nif K > (N-1)*(N-2)//2:\n\tprint(-1)\nelse:\n\tfor i in range(2,N+1):\n\t\tprint("1"+" "+str(i))\n\tleft = (N-1)*(N-2)//2 - K\n\tfor i in range(left):\n\t\t\tif N >= num2 :\n\t\t\t\tif chk == 1:\n\t\t\t\t\tnum2 += 1\n\t\t\t\t\tchk = 0\n\t\t\t\tprint(str(num1)... | ['Runtime Error', 'Accepted'] | ['s954290909', 's907178404'] | [3064.0, 43092.0] | [17.0, 848.0] | [400, 359] |
p02996 | u544637026 | 2,000 | 1,048,576 | Kizahashi, who was appointed as the administrator of ABC at National Problem Workshop in the Kingdom of AtCoder, got too excited and took on too many jobs. Let the current time be time 0. Kizahashi has N jobs numbered 1 to N. It takes A_i units of time for Kizahashi to complete Job i. The deadline for Job i is time B... | ['n,k = map(int,input().split())\ns= n\nans=[]\nfreeNode = [2]\ncur=2\nans.append([1,2])\nif n==2 :\n if k>0:\n print(-1)\n else:\n print(1)\n print(1, 2)\n exit()\nelse:\n s=0\n c=1\n if (n-2)*(n-1)//2<k:\n print(-1)\n exit()\n else:\n while(1):\n ... | ['Runtime Error', 'Accepted'] | ['s614148535', 's724664118'] | [3192.0, 58560.0] | [18.0, 1337.0] | [1142, 249] |
p02996 | u547608423 | 2,000 | 1,048,576 | Kizahashi, who was appointed as the administrator of ABC at National Problem Workshop in the Kingdom of AtCoder, got too excited and took on too many jobs. Let the current time be time 0. Kizahashi has N jobs numbered 1 to N. It takes A_i units of time for Kizahashi to complete Job i. The deadline for Job i is time B... | ['N=int(input())\nAB={}\nB=[]\nbase=0\nanswer="Yes"\n\nfor i in range(N):\n a,b=map(int,input().split())\n if b not in AB.keys():\n AB[b]=a\n B.append(b)\n else:\n AB[b]+=a\n \nB=sorted(B)\n\nfor j in B:\n base+=AB[j]\n print(base,j)\n if base>j:\n answer="No"\n\npri... | ['Wrong Answer', 'Accepted'] | ['s969111479', 's236006177'] | [34304.0, 32648.0] | [1052.0, 817.0] | [306, 307] |
p02996 | u548303713 | 2,000 | 1,048,576 | Kizahashi, who was appointed as the administrator of ABC at National Problem Workshop in the Kingdom of AtCoder, got too excited and took on too many jobs. Let the current time be time 0. Kizahashi has N jobs numbered 1 to N. It takes A_i units of time for Kizahashi to complete Job i. The deadline for Job i is time B... | ['30\n384 8895\n1725 9791\n170 1024\n4 11105\n2 6\n578 1815\n702 3352\n143 5141\n1420 6980\n24 1602\n849 999\n76 7586\n85 5570\n444 4991\n719 11090\n470 10708\n1137 4547\n455 9003\n110 9901\n15 8578\n368 3692\n104 1286\n3 4\n366 12143\n7 6649\n610 2374\n152 7324\n4 7042\n292 11386\n334 5720', 'n=int(input())\ninfo=[]\n... | ['Runtime Error', 'Accepted'] | ['s832167456', 's064811350'] | [2940.0, 39700.0] | [17.0, 900.0] | [259, 271] |
p02996 | u556225812 | 2,000 | 1,048,576 | Kizahashi, who was appointed as the administrator of ABC at National Problem Workshop in the Kingdom of AtCoder, got too excited and took on too many jobs. Let the current time be time 0. Kizahashi has N jobs numbered 1 to N. It takes A_i units of time for Kizahashi to complete Job i. The deadline for Job i is time B... | ["#131d\nN = int(input())\nlst = []\nfor i in range(N):\n a, b = map(int, input())\n lst.append([b, a])\nlst = sorted(lst)\n\nlim = 0\ntime = 0\nflag = 0\nfor i in lst:\n lim = i[0]\n if time + i[1] <= lim:\n time += i[1]\n else:\n flag = 1\n break\nif flag == 0:\n print('Yes')\ne... | ['Runtime Error', 'Accepted'] | ['s950199284', 's169748965'] | [3064.0, 37272.0] | [17.0, 1113.0] | [318, 326] |
p02996 | u556589653 | 2,000 | 1,048,576 | Kizahashi, who was appointed as the administrator of ABC at National Problem Workshop in the Kingdom of AtCoder, got too excited and took on too many jobs. Let the current time be time 0. Kizahashi has N jobs numbered 1 to N. It takes A_i units of time for Kizahashi to complete Job i. The deadline for Job i is time B... | ['N = int(input())\nls = []\nnow = 0\nsimekiri = 0\nflag = 0\nfor i in range(N):\n a,b = map(int,input().split())\n ls.append([b,a])\nls.sort()\nprint(ls)\nfor i in range(len(ls)):\n simekiri = ls[i][0]\n now += ls[i][1]\n if now > simekiri:\n print("No")\n flag += 1\n break\nif flag... | ['Wrong Answer', 'Accepted'] | ['s395740695', 's729440638'] | [47000.0, 35624.0] | [1216.0, 1029.0] | [324, 315] |
p02996 | u560988566 | 2,000 | 1,048,576 | Kizahashi, who was appointed as the administrator of ABC at National Problem Workshop in the Kingdom of AtCoder, got too excited and took on too many jobs. Let the current time be time 0. Kizahashi has N jobs numbered 1 to N. It takes A_i units of time for Kizahashi to complete Job i. The deadline for Job i is time B... | ['import heapq\n\nn = int(input())\nabs = [tuple(map(int, input().split())) for _ in range(n)]\n\npq = []\n\nfor ab in abs:\n a,b = ab[0],ab[1]\n heapq.heappush(pq, tuple([b,a]))\n \ndl = 0\ntc = 0\n\nans = "Yes"\n\nfor i in range(n):\n ba = pq.pop()\n dl = ba[0]\n tc += ba[1]\n if dl < tc:\n ans = "No"\n ... | ['Wrong Answer', 'Runtime Error', 'Accepted'] | ['s344805240', 's771734233', 's082784206'] | [42956.0, 28752.0, 43004.0] | [756.0, 585.0, 800.0] | [312, 311, 442] |
p02996 | u561862393 | 2,000 | 1,048,576 | Kizahashi, who was appointed as the administrator of ABC at National Problem Workshop in the Kingdom of AtCoder, got too excited and took on too many jobs. Let the current time be time 0. Kizahashi has N jobs numbered 1 to N. It takes A_i units of time for Kizahashi to complete Job i. The deadline for Job i is time B... | ['n = int(input())\n\n task_lis = [[int(r) for i in input().split()] for _ in range(n)]\n\n\nsum_a = 0\nch_over = 1\n\nfor i in range(n):\n sum_a += task_lis[i][1]\n if task_lis[i][0] < sum_a:\n ch_over = 0\n break\n\nif ch_over == 0:\n print("No")\nelse:\n print("Yes")\n', 'n = int(input())\n... | ['Runtime Error', 'Runtime Error', 'Runtime Error', 'Wrong Answer', 'Wrong Answer', 'Runtime Error', 'Accepted'] | ['s327959749', 's629580497', 's666710990', 's729513154', 's733019757', 's827317659', 's284372870'] | [2940.0, 2940.0, 3188.0, 40308.0, 42836.0, 2940.0, 42836.0] | [19.0, 17.0, 18.0, 975.0, 815.0, 17.0, 956.0] | [278, 307, 419, 284, 305, 286, 305] |
p02996 | u568855891 | 2,000 | 1,048,576 | Kizahashi, who was appointed as the administrator of ABC at National Problem Workshop in the Kingdom of AtCoder, got too excited and took on too many jobs. Let the current time be time 0. Kizahashi has N jobs numbered 1 to N. It takes A_i units of time for Kizahashi to complete Job i. The deadline for Job i is time B... | ['N = int(input())\nAB = []\nfor i in range(N):\n AB_1,AB_2 = map(int,input().split())\n AB.append([AB_1,AB_2])\nAB.sort(key=lambda AB: AB[0],reverse=True)\nAB.sort(key=lambda AB: AB[1])\ntime = 0\ncount = 0\nwhile count < N:\n for i in range(N):\n time += AB[i][0]\n if time > AB[i][1]:\n ans = "No"\n ... | ['Time Limit Exceeded', 'Accepted'] | ['s814480938', 's005824230'] | [38024.0, 38084.0] | [2106.0, 1016.0] | [311, 256] |
p02996 | u587589241 | 2,000 | 1,048,576 | Kizahashi, who was appointed as the administrator of ABC at National Problem Workshop in the Kingdom of AtCoder, got too excited and took on too many jobs. Let the current time be time 0. Kizahashi has N jobs numbered 1 to N. It takes A_i units of time for Kizahashi to complete Job i. The deadline for Job i is time B... | ['n=int(input())\nl=[]\nfor i in range(n):\n a,b=map(int,input().split())\n l.append((a,b))\nl.sort(key=lambda x:x[1])\ntmp=0\nfor i in range(n):\n tmp+=l[i][0]\n if tmp>l[i][1]:\n print("NO")\n exit()\nprint("YES")', 'n=int(input())\nl=[]\nfor i in range(n):\n a,b=map(int,input().split())\... | ['Wrong Answer', 'Accepted'] | ['s071968991', 's751528994'] | [37512.0, 37364.0] | [535.0, 535.0] | [227, 227] |
p02996 | u595375942 | 2,000 | 1,048,576 | Kizahashi, who was appointed as the administrator of ABC at National Problem Workshop in the Kingdom of AtCoder, got too excited and took on too many jobs. Let the current time be time 0. Kizahashi has N jobs numbered 1 to N. It takes A_i units of time for Kizahashi to complete Job i. The deadline for Job i is time B... | ["N = int(input())\nA = []\nB = []\nfor _ in range(N):\n a, b = map(int, input().split())\n A.append(a)\n B.append(b)\nC = list(zip(B, A))\nC.sort()\nB, A = zip(*C)\nt = 0\nfor c in C:\n t += c[1]\n if t <= c[0]:\n continue\n else:\n print('no')\n exit()\nprint('yes')\n", "N = int... | ['Wrong Answer', 'Accepted'] | ['s437883704', 's609536741'] | [53032.0, 53332.0] | [790.0, 765.0] | [288, 288] |
p02996 | u598860476 | 2,000 | 1,048,576 | Kizahashi, who was appointed as the administrator of ABC at National Problem Workshop in the Kingdom of AtCoder, got too excited and took on too many jobs. Let the current time be time 0. Kizahashi has N jobs numbered 1 to N. It takes A_i units of time for Kizahashi to complete Job i. The deadline for Job i is time B... | ["N = int(input())\nX = []\nfor _ in range(N):\n buffX = list(map(int, input().split()))\n X.append(buffX)\n\nX.sort(key=lambda x: x[1])\nprint(X)\n\nresult = True\ntime = 0\nfor i in range(N):\n time += X[i][0]\n if time > X[i][1]:\n result = False\n break\n\nprint( 'Yes' if result else 'No' ... | ['Wrong Answer', 'Accepted'] | ['s629568815', 's627142719'] | [62504.0, 53724.0] | [1131.0, 991.0] | [303, 294] |
p02996 | u600402037 | 2,000 | 1,048,576 | Kizahashi, who was appointed as the administrator of ABC at National Problem Workshop in the Kingdom of AtCoder, got too excited and took on too many jobs. Let the current time be time 0. Kizahashi has N jobs numbered 1 to N. It takes A_i units of time for Kizahashi to complete Job i. The deadline for Job i is time B... | ['a = [int(input()) for i in range(1)]\nn = a[0]\nworks = [list(map(int, input().split())) for i in range(n)]\n#print(works) \nworks = sorted(works, key=lambda x: x[1])\nprint(works)\nwork_time = 0\nfor w in works:\n work_time += w[0]\n if work_time > w[1]:\n print("No")\n break\nelse:\n print("Yes")', 'a = [... | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s365163974', 's431787086', 's316214711'] | [62596.0, 62596.0, 62368.0] | [1109.0, 1071.0, 612.0] | [296, 310, 305] |
p02996 | u602677143 | 2,000 | 1,048,576 | Kizahashi, who was appointed as the administrator of ABC at National Problem Workshop in the Kingdom of AtCoder, got too excited and took on too many jobs. Let the current time be time 0. Kizahashi has N jobs numbered 1 to N. It takes A_i units of time for Kizahashi to complete Job i. The deadline for Job i is time B... | ['import sys\n\nn = int(input())\nab = []\nfor i in range(n):\n a,b = map(int,input().split())\n ab.append([a,b])\n \nab.sort(key=lambda x:x[1])\n\nlimit = 0\nfor i in range(n):\n limit += ab[i][0]\n if limit < ab[i][1]:\n print("No")\n sys.exit()\n\nprint("Yes")', 'import sys\n\nn = int(in... | ['Wrong Answer', 'Accepted'] | ['s303679016', 's547850494'] | [38028.0, 38028.0] | [905.0, 912.0] | [273, 273] |
p02996 | u606392530 | 2,000 | 1,048,576 | Kizahashi, who was appointed as the administrator of ABC at National Problem Workshop in the Kingdom of AtCoder, got too excited and took on too many jobs. Let the current time be time 0. Kizahashi has N jobs numbered 1 to N. It takes A_i units of time for Kizahashi to complete Job i. The deadline for Job i is time B... | ['n=int(input())\nd=[]\njudge=True\nbag=[]\nfor i in range(n):\n a,b=map(int,input().split())\n d.append([a,b])\nd.sort(key=itemgetter(1))\n \nfor j in range(len(d)):\n bag.append(d[j][0])\n if sum(bag)>d[j][1]:\n judge=False\nelse:\n if judge==True:\n print("Yes")\n else:\n ... | ['Runtime Error', 'Accepted'] | ['s527451205', 's302249231'] | [34828.0, 41320.0] | [644.0, 877.0] | [314, 250] |
p02996 | u616117610 | 2,000 | 1,048,576 | Kizahashi, who was appointed as the administrator of ABC at National Problem Workshop in the Kingdom of AtCoder, got too excited and took on too many jobs. Let the current time be time 0. Kizahashi has N jobs numbered 1 to N. It takes A_i units of time for Kizahashi to complete Job i. The deadline for Job i is time B... | ['a, b, c, d = map(int, input().split())\n\nimport fractions\nimport math\n\nx = int(int(b//c) - int(math.ceil(a/c)) + 1)\ny = int(int(b//d) - int(math.ceil(a/d)) + 1)\ne = int(int(c*d)//int(fractions.gcd(c,d)))\nz = int(int(b//e) - int(math.ceil(a/e)) + 1)\n\nprint(int(b-a+1-x-y+z))\n', 'n = int(input())\n\nx = []\nf... | ['Runtime Error', 'Accepted'] | ['s914006310', 's080660577'] | [3064.0, 66288.0] | [17.0, 1207.0] | [273, 248] |
p02996 | u643817184 | 2,000 | 1,048,576 | Kizahashi, who was appointed as the administrator of ABC at National Problem Workshop in the Kingdom of AtCoder, got too excited and took on too many jobs. Let the current time be time 0. Kizahashi has N jobs numbered 1 to N. It takes A_i units of time for Kizahashi to complete Job i. The deadline for Job i is time B... | ['N = int(input())\nAB = [[int(x) for x in input().split(" ")] for _ in range(N)]\nAB = sorted(AB, key=lambda e: e[1])\n\ntime = 0\n\nfor i, a, b in AB:\n time += a\n if time > b:\n print("No")\n break\nelse:\n print("Yes")\n', 'N = int(input())\nAB = [[int(x) for x in input().split(" ")] for _ i... | ['Runtime Error', 'Accepted'] | ['s752024133', 's863910283'] | [42708.0, 43196.0] | [900.0, 950.0] | [233, 232] |
p02996 | u644360640 | 2,000 | 1,048,576 | Kizahashi, who was appointed as the administrator of ABC at National Problem Workshop in the Kingdom of AtCoder, got too excited and took on too many jobs. Let the current time be time 0. Kizahashi has N jobs numbered 1 to N. It takes A_i units of time for Kizahashi to complete Job i. The deadline for Job i is time B... | ["N = int(input())\nAB = [list(map(int,input().split())) for i in range(N)]\nAB.sort(key = lambda AB:AB[1])\nsum = 0\nflag = 0\nfor i in range(len(AB)):\n print(i)\n sum += AB[i][0]\n if sum > AB[i][1]:\n flag = 1\n\nif flag == 0:\n print('Yes')\nelse:\n print('No')", "N = int(input())\nAB = [list... | ['Wrong Answer', 'Accepted'] | ['s944647280', 's565406282'] | [53728.0, 53728.0] | [1080.0, 920.0] | [272, 259] |
p02996 | u655048024 | 2,000 | 1,048,576 | Kizahashi, who was appointed as the administrator of ABC at National Problem Workshop in the Kingdom of AtCoder, got too excited and took on too many jobs. Let the current time be time 0. Kizahashi has N jobs numbered 1 to N. It takes A_i units of time for Kizahashi to complete Job i. The deadline for Job i is time B... | ['import itemgetter\nN = int(input())\ntask = []\nfor i in range(N):\n M = list(map(int,input().split()))\n task.append(M)\ntask.sort(key = itemgetter(1))\nK = 0\nans = 1\nfor i in range(N):\n K += task[i,0]\n if (K>task[i,1]):\n ans = 0\n break\nif ans:\n print("Yes")\nelse:\n print("No")\n ', 'N = int(in... | ['Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted'] | ['s180516401', 's395863441', 's747029153', 's778544909', 's897800683', 's717137680'] | [3064.0, 51172.0, 50360.0, 3060.0, 2940.0, 51172.0] | [18.0, 1168.0, 703.0, 18.0, 17.0, 1278.0] | [286, 271, 250, 267, 288, 274] |
p02996 | u666198201 | 2,000 | 1,048,576 | Kizahashi, who was appointed as the administrator of ABC at National Problem Workshop in the Kingdom of AtCoder, got too excited and took on too many jobs. Let the current time be time 0. Kizahashi has N jobs numbered 1 to N. It takes A_i units of time for Kizahashi to complete Job i. The deadline for Job i is time B... | ["N=int(input())\nA=[]\nB=[]\nlen=len(B)\nstr='Yes'\ntotal=0\ntime=0\nfor i in range(N):\n a,b = map(int, input().split())\n A.append(a)\n B.append(b)\nB.sort()\nAB=B+A\ntime=min(B)\nfor j in range(N):\n time += AB[j]\n total +=AB[j+len+1]\n if total>time:\n str='No'\nprint(str)", "N=int(input(... | ['Wrong Answer', 'Runtime Error', 'Accepted'] | ['s571187899', 's937424168', 's834092012'] | [20608.0, 3064.0, 35640.0] | [799.0, 17.0, 1090.0] | [283, 280, 291] |
p02996 | u667469290 | 2,000 | 1,048,576 | Kizahashi, who was appointed as the administrator of ABC at National Problem Workshop in the Kingdom of AtCoder, got too excited and took on too many jobs. Let the current time be time 0. Kizahashi has N jobs numbered 1 to N. It takes A_i units of time for Kizahashi to complete Job i. The deadline for Job i is time B... | ["# -*- coding: utf-8 -*-\ndef solve():\n N = int(input())\n Limit = dict()\n for i in range(N):\n A, B = map(int, input().split())\n New = not B in Limit.keys()\n Limit[B] = Limit.get(B,0) + A\n if Limit[B] > B:\n return 'No'\n else:\n for k in Limit.ke... | ['Wrong Answer', 'Accepted'] | ['s321732434', 's691468684'] | [3064.0, 28756.0] | [19.0, 956.0] | [659, 479] |
p02996 | u669573977 | 2,000 | 1,048,576 | Kizahashi, who was appointed as the administrator of ABC at National Problem Workshop in the Kingdom of AtCoder, got too excited and took on too many jobs. Let the current time be time 0. Kizahashi has N jobs numbered 1 to N. It takes A_i units of time for Kizahashi to complete Job i. The deadline for Job i is time B... | ["#!/Library/Frameworks/Python.framework/Versions/3.5/bin/python3\nfrom operator import itemgetter\n\nn = int(input())\nl = []\nfor i in range(n):\n a, b = list(map(int, input().split()))\n l.append([a, b])\n\nl.sort(key=itemgetter(1))\nt = 0\nfor i in l:\n t += i[0]\n if t > i[1]:\n print('NO')\n ... | ['Wrong Answer', 'Accepted'] | ['s009066520', 's082574100'] | [39008.0, 39008.0] | [972.0, 955.0] | [329, 329] |
p02996 | u672316981 | 2,000 | 1,048,576 | Kizahashi, who was appointed as the administrator of ABC at National Problem Workshop in the Kingdom of AtCoder, got too excited and took on too many jobs. Let the current time be time 0. Kizahashi has N jobs numbered 1 to N. It takes A_i units of time for Kizahashi to complete Job i. The deadline for Job i is time B... | ["def main():\n n = int(input())\n ab_lst = [list(map(int, input().split())) for _ in range(n)]\n\n ba_lst = [0] * n\n for i in range(n):\n a = ab_lst[i][0]\n b = ab_lst[i][1]\n ba = [b, a]\n ba_lst[i] = ba\n ba_lst.sort()\n\n lst = []\n b = ba_lst[0][0]\n a = ba_lst[... | ['Runtime Error', 'Accepted'] | ['s319782981', 's848700720'] | [86596.0, 79256.0] | [1197.0, 1097.0] | [1004, 1018] |
p02996 | u677121387 | 2,000 | 1,048,576 | Kizahashi, who was appointed as the administrator of ABC at National Problem Workshop in the Kingdom of AtCoder, got too excited and took on too many jobs. Let the current time be time 0. Kizahashi has N jobs numbered 1 to N. It takes A_i units of time for Kizahashi to complete Job i. The deadline for Job i is time B... | ['n = int(input())\nab = [list(map(int,input().split())) for i in range(n)]\n\nab.sort(key= lambda x:x[1],reverse = True)\ntime = ab[0][1]\n\nfor i in range(n):\n time -= ab[i][0]\nelse:\n if time >= 0:\n ans = "yes"\n else:\n ans = "No"\n\nprint(ans)', 'n = int(input())\nab = [list(map(int,input... | ['Wrong Answer', 'Accepted'] | ['s201750903', 's769934164'] | [53856.0, 53600.0] | [914.0, 945.0] | [258, 242] |
p02996 | u686036872 | 2,000 | 1,048,576 | Kizahashi, who was appointed as the administrator of ABC at National Problem Workshop in the Kingdom of AtCoder, got too excited and took on too many jobs. Let the current time be time 0. Kizahashi has N jobs numbered 1 to N. It takes A_i units of time for Kizahashi to complete Job i. The deadline for Job i is time B... | ['N = int(input())\n\nA = []\nfor i in range(N):\n A.append(list(map(int, input().split())))\n\nA.sort(lambda x: x[1], x[0])\n\ngokei = 0\nfor i in A:\n gokei += i[0]\n if gokei > i[1]:\n print("No")\nelse:\n print("Yes")', 'N = int(input())\n\nA = []\nfor i in range(N):\n A.append(list(map(int, i... | ['Runtime Error', 'Accepted'] | ['s734735055', 's345388065'] | [43972.0, 59704.0] | [430.0, 726.0] | [224, 244] |
p02996 | u688219499 | 2,000 | 1,048,576 | Kizahashi, who was appointed as the administrator of ABC at National Problem Workshop in the Kingdom of AtCoder, got too excited and took on too many jobs. Let the current time be time 0. Kizahashi has N jobs numbered 1 to N. It takes A_i units of time for Kizahashi to complete Job i. The deadline for Job i is time B... | ['n = int(input())\na = [0] * n\nb = [0] * n\nsa = [0] * n\nfor i in range(n):\n a[i], b[i] = map(int, input().split())\nc = b.copy()\nc.sort()\nwa = 0\nfor i in c:\n wa += a[b.index(i)]\n print(wa, b[c.index(i)])\n if wa > b[b.index(i)]:\n print("No")\n exit()\nprint("Yes")', 'n = int(input()... | ['Wrong Answer', 'Accepted'] | ['s873941742', 's871078971'] | [27036.0, 46856.0] | [2206.0, 629.0] | [284, 261] |
p02996 | u698919163 | 2,000 | 1,048,576 | Kizahashi, who was appointed as the administrator of ABC at National Problem Workshop in the Kingdom of AtCoder, got too excited and took on too many jobs. Let the current time be time 0. Kizahashi has N jobs numbered 1 to N. It takes A_i units of time for Kizahashi to complete Job i. The deadline for Job i is time B... | ["N = int(input())\nAB = [list(map(int,input().split())) for i in range(N)]\n\nsort_AB = sorted(AB, key= lambda x: x[1])\nans = 'Yes'\ntmp = 0\n\nfor i in range(N):\n tmp += sortedAB[i][0]\n if tmp > sortedAB[i][1]:\n ans = 'No'\n break\n \nprint(ans)", "N = int(input())\nAB = [list(map(int,i... | ['Runtime Error', 'Accepted'] | ['s775990128', 's282905624'] | [48684.0, 48496.0] | [538.0, 580.0] | [263, 261] |
p02996 | u701318346 | 2,000 | 1,048,576 | Kizahashi, who was appointed as the administrator of ABC at National Problem Workshop in the Kingdom of AtCoder, got too excited and took on too many jobs. Let the current time be time 0. Kizahashi has N jobs numbered 1 to N. It takes A_i units of time for Kizahashi to complete Job i. The deadline for Job i is time B... | ["N = int(input())\nAB = [list(map(int, input().split())) for _ in range(N)]\n\nAB = sorted(AB, key=lambda x: x[1])\nnow = 0\nans = 'Yes'\n\nfor i in range(N):\n now += AB[i][0]\n if now <= AB[i][1]:\n pass\n else:\n ans = 'No'\n\nprint(AB)", "N = int(input())\nAB = [list(map(int, input().split()... | ['Wrong Answer', 'Accepted'] | ['s999228252', 's730860077'] | [62540.0, 53720.0] | [1085.0, 910.0] | [270, 259] |
p02996 | u703214333 | 2,000 | 1,048,576 | Kizahashi, who was appointed as the administrator of ABC at National Problem Workshop in the Kingdom of AtCoder, got too excited and took on too many jobs. Let the current time be time 0. Kizahashi has N jobs numbered 1 to N. It takes A_i units of time for Kizahashi to complete Job i. The deadline for Job i is time B... | ['#ABC131D\nn=int(input())\nl=[]\nfor i in range(n):\n a,b=map(int,input().split())\n l.append([a,b])\nl=sorted(l,key=lambda x:x[1])\ndeadline=0\ntmp=0\nfor i in range(n):\n tmp=l[i][1]\n deadline+=l[i][0]\n if tmp<deadline\n print("No")\n exit()\nprint("Yes")', '#ABC131D\nn=int(input())\nl... | ['Runtime Error', 'Accepted'] | ['s037277516', 's213098041'] | [2940.0, 39584.0] | [17.0, 994.0] | [272, 274] |
p02996 | u714300041 | 2,000 | 1,048,576 | Kizahashi, who was appointed as the administrator of ABC at National Problem Workshop in the Kingdom of AtCoder, got too excited and took on too many jobs. Let the current time be time 0. Kizahashi has N jobs numbered 1 to N. It takes A_i units of time for Kizahashi to complete Job i. The deadline for Job i is time B... | ['import numpy as np\n\nN = int(input())\n\nA = []\nB = []\nfor _ in range(N):\n a, b = map(int, input().split())\n A.append(a)\n B.append(b)\n\n\ndef yes_or_no():\n for c in C:\n if c < 0:\n return 0\n \n sorted_index = np.argsort(B)\n sum_A = [A[sorted_index[0]]]\n for i in r... | ['Runtime Error', 'Accepted'] | ['s794602659', 's008602986'] | [26612.0, 35944.0] | [739.0, 890.0] | [558, 538] |
p02996 | u720384347 | 2,000 | 1,048,576 | Kizahashi, who was appointed as the administrator of ABC at National Problem Workshop in the Kingdom of AtCoder, got too excited and took on too many jobs. Let the current time be time 0. Kizahashi has N jobs numbered 1 to N. It takes A_i units of time for Kizahashi to complete Job i. The deadline for Job i is time B... | ['N = int(input())\n#N=5\n#A,B = [2,1,1,4,3],[4,9,8,9,12]\nA,B = [],[]\nfor i in range(N):\n a,b = input().split()\n A.append(int(a))\n B.append(int(b))\n\n\nimport numpy as np\nC = np.array([A,B])\n\nC = C[:,C[1,:].argsort()]\nA,B = C[0],C[1]\nprint(C)\ni=0\nwhile(i<N):\n n=0\n #ind = i+n\n while((i+... | ['Wrong Answer', 'Accepted'] | ['s855002724', 's582152076'] | [34688.0, 34548.0] | [1155.0, 1074.0] | [769, 760] |
p02996 | u723444827 | 2,000 | 1,048,576 | Kizahashi, who was appointed as the administrator of ABC at National Problem Workshop in the Kingdom of AtCoder, got too excited and took on too many jobs. Let the current time be time 0. Kizahashi has N jobs numbered 1 to N. It takes A_i units of time for Kizahashi to complete Job i. The deadline for Job i is time B... | ['N = int(input())\ntask_list = [list(map(int, input().split())) for i in range(N)]\n\nprint(task_list)\n\ntask_list.sort(key=lambda task_list: task_list[1])\ntime = 0\nflag = True\n\nfor i in range(N):\n x = task_list[i]\n time += x[0]\n if time > x[1]:\n flag = False\n break\n\nif flag:\n pr... | ['Wrong Answer', 'Accepted'] | ['s457688423', 's903129060'] | [61108.0, 53724.0] | [1014.0, 948.0] | [747, 1173] |
p02996 | u729417323 | 2,000 | 1,048,576 | Kizahashi, who was appointed as the administrator of ABC at National Problem Workshop in the Kingdom of AtCoder, got too excited and took on too many jobs. Let the current time be time 0. Kizahashi has N jobs numbered 1 to N. It takes A_i units of time for Kizahashi to complete Job i. The deadline for Job i is time B... | ["# --*-coding:utf-8-*--\n\n\ndef f(AB):\n s = 0\n for a, b in sorted(AB, key=lambda x:x[1]):\n s += a\n\n if s > b:\n return 'No'\n\n return 'Yes'\n\n\ndef main():\n N = int(input())\n AB = [tuple(map(int, input().split())) for i in range(N)]\n print(f(AB))\n\n", "# --*-cod... | ['Wrong Answer', 'Accepted'] | ['s357270394', 's731932676'] | [2940.0, 33460.0] | [18.0, 743.0] | [285, 324] |
p02996 | u732870425 | 2,000 | 1,048,576 | Kizahashi, who was appointed as the administrator of ABC at National Problem Workshop in the Kingdom of AtCoder, got too excited and took on too many jobs. Let the current time be time 0. Kizahashi has N jobs numbered 1 to N. It takes A_i units of time for Kizahashi to complete Job i. The deadline for Job i is time B... | ['N = int(input())\nAB = [list(map(int, input().split())) for _ in range(N)]\n\nAB.sort(key=lambda x:(x[1],x[0]), reverse=True)\ntime = 0\nfor A, B in AB:\n time += A\n if B < time:\n print("No")\n break\nelse:\n print("Yes")\n', 'N = int(input())\nAB = [set(map(int, input().split())) for _ in ra... | ['Wrong Answer', 'Runtime Error', 'Accepted'] | ['s660670338', 's928575503', 's651639742'] | [66252.0, 60444.0, 66348.0] | [1090.0, 713.0, 1051.0] | [236, 221, 222] |
p02996 | u735186902 | 2,000 | 1,048,576 | Kizahashi, who was appointed as the administrator of ABC at National Problem Workshop in the Kingdom of AtCoder, got too excited and took on too many jobs. Let the current time be time 0. Kizahashi has N jobs numbered 1 to N. It takes A_i units of time for Kizahashi to complete Job i. The deadline for Job i is time B... | ["N = int(input())\nX = [list(map(int, input().split())) for _ in range(N)]\nX.sort(key = lambda X:X[1])\ntime = 0\nans = 'Yes'\nfor i in range(N):\n time += X[0][i]\n line = X[i][1]\n if line < time :\n ans = 'No'\nprint(ans)", "N = int(input())\nX = [list(map(int, input().split())) for _ in range(N)]\nX.sort(ke... | ['Runtime Error', 'Accepted'] | ['s598625721', 's157855590'] | [53660.0, 53660.0] | [866.0, 946.0] | [220, 220] |
p02996 | u743154453 | 2,000 | 1,048,576 | Kizahashi, who was appointed as the administrator of ABC at National Problem Workshop in the Kingdom of AtCoder, got too excited and took on too many jobs. Let the current time be time 0. Kizahashi has N jobs numbered 1 to N. It takes A_i units of time for Kizahashi to complete Job i. The deadline for Job i is time B... | ["n = int(input())\na = [0] * n\nb = [0] * n\ntask = []\n\nfor i in range(n):\n a[i],b[i] = map(int, input().split())\n temp = [a[i],b[i]]\n task.append(temp)\n \ntask.sort(key=lambda x: x[1])\nsuma = 0\noutput = 'Yes'\n\nfor i in range(n):\n suma += task[i][0]\n if suma > task[i][i]:\n output = 'No'\n brea... | ['Runtime Error', 'Accepted'] | ['s237751397', 's410083737'] | [41244.0, 41768.0] | [889.0, 952.0] | [317, 317] |
p02996 | u748241164 | 2,000 | 1,048,576 | Kizahashi, who was appointed as the administrator of ABC at National Problem Workshop in the Kingdom of AtCoder, got too excited and took on too many jobs. Let the current time be time 0. Kizahashi has N jobs numbered 1 to N. It takes A_i units of time for Kizahashi to complete Job i. The deadline for Job i is time B... | ['N = int(input())\ns = [list(input().split( )) for i in range(N)]\n#print(s[1][0])\nt = sorted(s, key=lambda x:int(x[1]), reverse = True)\n#print(t)\ncount = 0\nsum1 = sum([int(t[j][0]) for j in range(len(t))])\nfor i in range(len(t)):\n if int(t[i][1]) < sum1 :\n sum1 = sum1 - int(t[i][0])\n else:\n count += ... | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s212278799', 's744660703', 's795174163'] | [61404.0, 61624.0, 61404.0] | [966.0, 1462.0, 946.0] | [358, 394, 390] |
p02996 | u757578286 | 2,000 | 1,048,576 | Kizahashi, who was appointed as the administrator of ABC at National Problem Workshop in the Kingdom of AtCoder, got too excited and took on too many jobs. Let the current time be time 0. Kizahashi has N jobs numbered 1 to N. It takes A_i units of time for Kizahashi to complete Job i. The deadline for Job i is time B... | ["a = [int(input()) for i in range(1)]\nn = a[0] \nworks = [list(map(int, input().split())) for i in range(n)]\n#print(works)\nworks = sorted(works, key=lambda x: x[1])\n\ntime = 0\nflag = 0\n#print(works[1][0])\n\nfor k in range(n):\n time += works[k][0]\n if time > works[k][1]:\n flag = 1\n \nif flag == 0:\n ... | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s241011331', 's375139058', 's129195391'] | [55256.0, 55256.0, 55256.0] | [975.0, 1146.0, 1043.0] | [335, 349, 345] |
p02996 | u764956288 | 2,000 | 1,048,576 | Kizahashi, who was appointed as the administrator of ABC at National Problem Workshop in the Kingdom of AtCoder, got too excited and took on too many jobs. Let the current time be time 0. Kizahashi has N jobs numbered 1 to N. It takes A_i units of time for Kizahashi to complete Job i. The deadline for Job i is time B... | ["\ndef code_for_D(test=None):\n\n N = int(input())\n\n works = [map(int, input().split()) for _ in range(N)]\n works = sorted(works, key=lambda x: x[1])\n\n time_now = 0\n time_by = 0\n answer = 'Yes'\n\n for i in range(N):\n time_now += works[0]\n time_by = works[1]\n \n ... | ['Runtime Error', 'Accepted'] | ['s287632574', 's118837822'] | [3064.0, 55244.0] | [18.0, 930.0] | [452, 423] |
p02996 | u767664985 | 2,000 | 1,048,576 | Kizahashi, who was appointed as the administrator of ABC at National Problem Workshop in the Kingdom of AtCoder, got too excited and took on too many jobs. Let the current time be time 0. Kizahashi has N jobs numbered 1 to N. It takes A_i units of time for Kizahashi to complete Job i. The deadline for Job i is time B... | ['\nN = int(input())\nX = [list(map(int, input().split())) for _ in range(N)]\nX = sorted(X, key=lambda x: x[1]) \n\nres = 0\nfor i in range(N):\n res += A[i]\n if res > B[i]:\n print("No")\n exit()\nprint("Yes")\n', '\nN = int(input())\nX = [list(map(int, input().split())) for _ in range(N)]\nX = ... | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s455158420', 's699597268', 's816851916'] | [55264.0, 55196.0, 55264.0] | [910.0, 896.0, 1043.0] | [325, 331, 331] |
p02996 | u769095634 | 2,000 | 1,048,576 | Kizahashi, who was appointed as the administrator of ABC at National Problem Workshop in the Kingdom of AtCoder, got too excited and took on too many jobs. Let the current time be time 0. Kizahashi has N jobs numbered 1 to N. It takes A_i units of time for Kizahashi to complete Job i. The deadline for Job i is time B... | ['from sys import\ninput = sys.stdin.readline\n\nn = int(input())\ntask = []\ntime_total = [-1 for i in range(n)]\nfor i in range(n):\n task.append([int(i) for i in input().split()])\ntask_sorted = sorted(task, key = lambda x:x[1])\ntime_total[0] = task_sorted[0][0]\nfor i in range(n - 1):\n time_total[i + 1] = t... | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s659333563', 's790238888', 's032660751'] | [2940.0, 3064.0, 47608.0] | [18.0, 17.0, 756.0] | [452, 457, 451] |
p02996 | u785134189 | 2,000 | 1,048,576 | Kizahashi, who was appointed as the administrator of ABC at National Problem Workshop in the Kingdom of AtCoder, got too excited and took on too many jobs. Let the current time be time 0. Kizahashi has N jobs numbered 1 to N. It takes A_i units of time for Kizahashi to complete Job i. The deadline for Job i is time B... | ['N = int(input())\nA = [None for _ in range(N)]\nB = [None for _ in range(N)]\nendflg = [0 for _ in range(N)]\nfor i in range(N):\n A[i],B[i] = map(int,input().split())\ntime = 0\n \nz = zip(B,A)\ns = sorted(z)\nfor i in range(N):\n if time + s[i][1] <= s[i][0]:\n time = time + = s[i][1]\n endflg[i] = 1\n els... | ['Runtime Error', 'Wrong Answer', 'Accepted'] | ['s051731402', 's464167797', 's573693513'] | [3064.0, 20396.0, 35640.0] | [17.0, 2104.0, 925.0] | [393, 421, 392] |
p02996 | u788068140 | 2,000 | 1,048,576 | Kizahashi, who was appointed as the administrator of ABC at National Problem Workshop in the Kingdom of AtCoder, got too excited and took on too many jobs. Let the current time be time 0. Kizahashi has N jobs numbered 1 to N. It takes A_i units of time for Kizahashi to complete Job i. The deadline for Job i is time B... | ['def calculate(list):\n current = 0\n for item in list:\n current += item[0]\n if current > item[1]:\n return False\n\n return True\n\nN = int(input())\n\narr = []\nfor i in range(N):\n arr.append([int(s) for s in input().split(" ")])\n\narr2 = sorted(arr,key=lambda x:x[1])\n\nresu... | ['Wrong Answer', 'Accepted'] | ['s912459069', 's340847550'] | [42828.0, 42764.0] | [873.0, 890.0] | [336, 372] |
p02996 | u795630164 | 2,000 | 1,048,576 | Kizahashi, who was appointed as the administrator of ABC at National Problem Workshop in the Kingdom of AtCoder, got too excited and took on too many jobs. Let the current time be time 0. Kizahashi has N jobs numbered 1 to N. It takes A_i units of time for Kizahashi to complete Job i. The deadline for Job i is time B... | ["N = int(input())\n\ntask = [0] * (10 ** 9 + 1)\nM = 0\nfor _ in range(N):\n a, b = map(int, input().split())\n task[b] += a\n if b > M:\n M = b\n\nt = 0\nans = 'Yes'\nfor i in range(M+1):\n t += task[i]\n if t > i:\n ans = 'No'\n break\n\nprint(ans)\n\n\n\n", "N = int(input())\n\nt... | ['Runtime Error', 'Accepted'] | ['s254138518', 's972157148'] | [3060.0, 29444.0] | [19.0, 852.0] | [271, 233] |
p02996 | u798260206 | 2,000 | 1,048,576 | Kizahashi, who was appointed as the administrator of ABC at National Problem Workshop in the Kingdom of AtCoder, got too excited and took on too many jobs. Let the current time be time 0. Kizahashi has N jobs numbered 1 to N. It takes A_i units of time for Kizahashi to complete Job i. The deadline for Job i is time B... | [' int(input())\n \nA = []\nB = []\nfor i in range(n):\n a, b = map(int, input().split())\n A.append(a)\n B.append(b)\n \nC = zip(B, A)\nC = sorted(C)\nB, A = zip(*C)\n \nans = 1\nt = 0\nfor i, j in zip(A, B):\n t += i\n if t <= j:\n continue\n else:\n print("No")\n ans = 0\n ... | ['Runtime Error', 'Accepted'] | ['s859705212', 's616851139'] | [2940.0, 49144.0] | [17.0, 1083.0] | [329, 321] |
p02996 | u799691369 | 2,000 | 1,048,576 | Kizahashi, who was appointed as the administrator of ABC at National Problem Workshop in the Kingdom of AtCoder, got too excited and took on too many jobs. Let the current time be time 0. Kizahashi has N jobs numbered 1 to N. It takes A_i units of time for Kizahashi to complete Job i. The deadline for Job i is time B... | ["n = int(input())\n\ni = 0\nab = []\nwhile i < n:\n a, b = map(int, input().split())\n ab.append((a, b)) \n i += 1\n\nab.sort(key=lambda x: x[1])\n\ndays = ab[0][0]\n\ni = 1\nans = 'Yes'\nwhile i < n:\n days += ab[i][0]\n print(days)\n if days > ab[i][1]:\n ans = 'No'\n break\n i += ... | ['Wrong Answer', 'Accepted'] | ['s142049946', 's804850850'] | [31872.0, 31872.0] | [1009.0, 850.0] | [309, 285] |
p02996 | u802963389 | 2,000 | 1,048,576 | Kizahashi, who was appointed as the administrator of ABC at National Problem Workshop in the Kingdom of AtCoder, got too excited and took on too many jobs. Let the current time be time 0. Kizahashi has N jobs numbered 1 to N. It takes A_i units of time for Kizahashi to complete Job i. The deadline for Job i is time B... | ['c = 10**9+7\n\nn, k = map(int, input().split())\n\ndef combinations_count_mod(n, r):\n ret = 1\n for i in range(r):\n ret *= (n-i)/(r-i) % c\n return ret\n\nfor i in range(1, k+1):\n a = combinations_count_mod(k-1, i-1) \n if n-k > i-1:\n# if n-k-i >= 1:\n b = (combinations_count_mod(n-k-1, i-1) * ((n-k... | ['Runtime Error', 'Accepted'] | ['s021134636', 's409009368'] | [3064.0, 53600.0] | [19.0, 913.0] | [427, 205] |
p02996 | u807864121 | 2,000 | 1,048,576 | Kizahashi, who was appointed as the administrator of ABC at National Problem Workshop in the Kingdom of AtCoder, got too excited and took on too many jobs. Let the current time be time 0. Kizahashi has N jobs numbered 1 to N. It takes A_i units of time for Kizahashi to complete Job i. The deadline for Job i is time B... | ["N = int(input())\nL = [tuple(map(int, input().split())) for _ in range(N)]\nL.sort(key=lambda x: x[1])\nwork = 0\nfor n in range(N):\n work += L[0][n]\n if work > L[1][n]:\n print('No')\n exit()\nprint('Yes')", "N = int(input())\nL = [tuple(map(int, input().split())) for _ in range(N)]\nL.sort(key=lambda x: x... | ['Runtime Error', 'Accepted'] | ['s035265302', 's499059238'] | [31824.0, 31836.0] | [732.0, 806.0] | [207, 207] |
p02996 | u814271993 | 2,000 | 1,048,576 | Kizahashi, who was appointed as the administrator of ABC at National Problem Workshop in the Kingdom of AtCoder, got too excited and took on too many jobs. Let the current time be time 0. Kizahashi has N jobs numbered 1 to N. It takes A_i units of time for Kizahashi to complete Job i. The deadline for Job i is time B... | ['5\n2 4\n1 9\n1 8\n4 9\n3 12', "N=int(input())\nba=[list(map(int,input().split()))[::-1]for _ in range(N)]\nba.sort()\n \ntime=0\nans='Yes'\nfor b,a in ba:\n time+=a\n if time>b:\n ans='No'\nprint(ans)"] | ['Runtime Error', 'Accepted'] | ['s425767020', 's076660174'] | [8936.0, 38188.0] | [27.0, 759.0] | [22, 172] |
p02996 | u827141374 | 2,000 | 1,048,576 | Kizahashi, who was appointed as the administrator of ABC at National Problem Workshop in the Kingdom of AtCoder, got too excited and took on too many jobs. Let the current time be time 0. Kizahashi has N jobs numbered 1 to N. It takes A_i units of time for Kizahashi to complete Job i. The deadline for Job i is time B... | ["N = int(input())\nA = [0] * N\nB = [0] * N\nAB = [0] * N\nBA = [0] * N\nneed = {}\nfor i in range(N):\n A[i], B[i] = [int(x) for x in input().split()]\n need[B[i]] = A[i]\n BA[i] = [B[i], A[i]]\nlist.sort(BA)\nt = 0\nfail = 0\nfor n in range(N):å\n t += BA[n][1]\n if t > BA[n][0]:\n fail = 1\n ... | ['Runtime Error', 'Accepted'] | ['s135523878', 's202307924'] | [3064.0, 40408.0] | [21.0, 1156.0] | [361, 327] |
p02996 | u845333844 | 2,000 | 1,048,576 | Kizahashi, who was appointed as the administrator of ABC at National Problem Workshop in the Kingdom of AtCoder, got too excited and took on too many jobs. Let the current time be time 0. Kizahashi has N jobs numbered 1 to N. It takes A_i units of time for Kizahashi to complete Job i. The deadline for Job i is time B... | ["for i in range(n):\n x,y=map(int,input().split())\n l.append([x,y])\n\nl=sorted(l,key=lambda x:x[1])\nt=0\nans='Yes'\nfor i in range(n):\n if t+l[i][0]<=l[i][1]:\n t+=l[i][0]\n else:\n ans='No'\nprint(ans)", "n=int(input())\nl=[]\nfor i in range(n):\n x,y=map(int,input().split())\n l.a... | ['Runtime Error', 'Accepted'] | ['s091106572', 's714572233'] | [3060.0, 39708.0] | [20.0, 1175.0] | [219, 239] |
p02996 | u848654125 | 2,000 | 1,048,576 | Kizahashi, who was appointed as the administrator of ABC at National Problem Workshop in the Kingdom of AtCoder, got too excited and took on too many jobs. Let the current time be time 0. Kizahashi has N jobs numbered 1 to N. It takes A_i units of time for Kizahashi to complete Job i. The deadline for Job i is time B... | ['N = int(input())\nl = []\nfor i in range(N):\n l.append(list(map(int, input().split())))\n \nl = sp.array(sorted(l, key=lambda x: x[1]))\n\na = sp.cumsum(l[:,0])\nb = l[:,1]\n\nc = b-a\nt = True\nfor i in c:\n if i < 0:\n t = False\n print("No")\n\nif t:\n print("Yes")', 'import scipy as sp\... | ['Runtime Error', 'Accepted'] | ['s586096261', 's640377277'] | [50360.0, 64376.0] | [706.0, 1251.0] | [277, 306] |
p02996 | u860002137 | 2,000 | 1,048,576 | Kizahashi, who was appointed as the administrator of ABC at National Problem Workshop in the Kingdom of AtCoder, got too excited and took on too many jobs. Let the current time be time 0. Kizahashi has N jobs numbered 1 to N. It takes A_i units of time for Kizahashi to complete Job i. The deadline for Job i is time B... | ['import sys\nimport numpy as np\n\nn = int(input())\n\na = []\nb = []\n\nfor i in range(n):\n x, y = map(int, input().split())\n a.append(x)\n b.append(y)\n\na = np.array(a)\nb = np.array(b)\n\ndiff = b - a\n\nli = []\nfor x, y, z in zip(diff, a, b):\n li.append((x, y, z))\n\nli = sort()\nli = li[::-1]\n\n... | ['Runtime Error', 'Runtime Error', 'Runtime Error', 'Wrong Answer', 'Accepted'] | ['s109231907', 's269068074', 's358217236', 's681265629', 's894756088'] | [51348.0, 51396.0, 51396.0, 52936.0, 53728.0] | [882.0, 871.0, 870.0, 1377.0, 914.0] | [407, 408, 407, 405, 222] |
p02996 | u864013199 | 2,000 | 1,048,576 | Kizahashi, who was appointed as the administrator of ABC at National Problem Workshop in the Kingdom of AtCoder, got too excited and took on too many jobs. Let the current time be time 0. Kizahashi has N jobs numbered 1 to N. It takes A_i units of time for Kizahashi to complete Job i. The deadline for Job i is time B... | ['N = int(input())\nA = [list(map(int,input().split())) for _ in range(N)]\nA = sorted(A,key=lambda x:x[1])\nt = 0\nprint(A)\nfor i in range(N):\n t += A[i][0]\n if t > A[i][1]:\n print("No")\n exit()\nprint("Yes")', 'N = int(input())\nA = [list(map(int,input().split())) for _ in range(N)]\nA = sort... | ['Wrong Answer', 'Accepted'] | ['s238610016', 's567119428'] | [62608.0, 55264.0] | [1132.0, 1021.0] | [222, 213] |
p02996 | u870532455 | 2,000 | 1,048,576 | Kizahashi, who was appointed as the administrator of ABC at National Problem Workshop in the Kingdom of AtCoder, got too excited and took on too many jobs. Let the current time be time 0. Kizahashi has N jobs numbered 1 to N. It takes A_i units of time for Kizahashi to complete Job i. The deadline for Job i is time B... | ['n = int(input())\nhoge = []\n\nfor i in range(n):\n hoge.append(list(map(int, input().split())))\nhoge.sort(key = lambda x: x[1])\n\ntotal = 0\nable = True\nfor i in hoge:\n total += i[0]\n if i[1]>total:\n able = False\n\nif able:\n print("Yes")\nelse:\n print("No")', 'n = int(input())\nhoge = ... | ['Wrong Answer', 'Accepted'] | ['s827729760', 's807417929'] | [53720.0, 53720.0] | [963.0, 962.0] | [272, 272] |
p02996 | u891884439 | 2,000 | 1,048,576 | Kizahashi, who was appointed as the administrator of ABC at National Problem Workshop in the Kingdom of AtCoder, got too excited and took on too many jobs. Let the current time be time 0. Kizahashi has N jobs numbered 1 to N. It takes A_i units of time for Kizahashi to complete Job i. The deadline for Job i is time B... | ["from operatpr import itemgetter\n\nN = int(input())\njob = [list(map(int, input().split())) for i in range(N)]\n\njob.sort(key = itemgetter(1))\n\ntime = 0\nflag = 0\nfor i in range(N):\n time += job[i][0]\n if time > job[i][1]:\n flag = 1\n print(flag) \n \nif flag == 0:\n print('Yes')\nelse... | ['Runtime Error', 'Runtime Error', 'Wrong Answer', 'Accepted'] | ['s458942928', 's610944230', 's883434094', 's064320320'] | [3064.0, 2940.0, 53732.0, 53600.0] | [17.0, 17.0, 1020.0, 910.0] | [318, 266, 323, 267] |
p02996 | u891945807 | 2,000 | 1,048,576 | Kizahashi, who was appointed as the administrator of ABC at National Problem Workshop in the Kingdom of AtCoder, got too excited and took on too many jobs. Let the current time be time 0. Kizahashi has N jobs numbered 1 to N. It takes A_i units of time for Kizahashi to complete Job i. The deadline for Job i is time B... | ["n = int(input())\na = []\nfor i in range(n):\n a.append(list(map(int,input().split())))\n\na.sort(key=lambda x: x[1])\n\nq = 0\nw = 0\nflg = 0\nfor j in range(n):\n q += j[0]\n w += j[1]\n if q > w :\n flg = 1\n break\n\nif flg == 0:\n print('Yes')\nelse:\n print('No')\n ", "n = int(input())\na = []\nfor... | ['Runtime Error', 'Accepted'] | ['s160710635', 's549213561'] | [53720.0, 53720.0] | [884.0, 985.0] | [264, 256] |
p02996 | u896741788 | 2,000 | 1,048,576 | Kizahashi, who was appointed as the administrator of ABC at National Problem Workshop in the Kingdom of AtCoder, got too excited and took on too many jobs. Let the current time be time 0. Kizahashi has N jobs numbered 1 to N. It takes A_i units of time for Kizahashi to complete Job i. The deadline for Job i is time B... | ['n=int(inuput())\nl=sorted(list(map(int,input().split())) for nd in range(n),key=lambda x:x[1])\nnow=0\nfor a,s in l:\n if a+now>s:print("No");exit()\n now+=a\nelse:print("Yes")', 'n=int(input())\nl=sorted(list(map(int,input().split())) for nd in range(n),key=lambda x:x[1])\nnow=0\nfor a,s in l:\n if a+now>s:print(... | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s472182650', 's549740253', 's645590885'] | [3064.0, 3056.0, 55264.0] | [18.0, 17.0, 1002.0] | [172, 172, 174] |
p02996 | u905268546 | 2,000 | 1,048,576 | Kizahashi, who was appointed as the administrator of ABC at National Problem Workshop in the Kingdom of AtCoder, got too excited and took on too many jobs. Let the current time be time 0. Kizahashi has N jobs numbered 1 to N. It takes A_i units of time for Kizahashi to complete Job i. The deadline for Job i is time B... | ['C:\\Users\\ryo-2\\Anaconda3\\python.exe C:/Users/ryo-2/PycharmProjects/atcoder/ABC131/ABC131_D.py\n30\n384 8895\n1725 9791\n170 1024\n4 11105\n2 6\n578 1815\n702 3352\n143 5141\n1420 6980\n24 1602\n849 999\n76 7586\n85 5570\n444 4991\n719 11090\n470 10708\n1137 4547\n455 9003\n110 9901\n15 8578\n368 3692\n104 1286\n3... | ['Runtime Error', 'Accepted'] | ['s255122474', 's640684711'] | [2940.0, 53628.0] | [17.0, 1189.0] | [393, 277] |
p02996 | u905582793 | 2,000 | 1,048,576 | Kizahashi, who was appointed as the administrator of ABC at National Problem Workshop in the Kingdom of AtCoder, got too excited and took on too many jobs. Let the current time be time 0. Kizahashi has N jobs numbered 1 to N. It takes A_i units of time for Kizahashi to complete Job i. The deadline for Job i is time B... | ['n=int(input())\na=[list(map(int,input().split())) for _ in range(n)]\na.sort(key=lambda x: x[1])\nt=0\nfor i in range(n):\n t+=a[0]\n if t>a[1]:\n print("No")\n break\n elif i==n-1:\n print("Yes")', 'import sys\nreadline=sys.stdin.buffer.readline\nn=int(input())\na=[list(map(int, readline().split())) for ... | ['Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted'] | ['s564404911', 's755300824', 's896028519', 's904316046'] | [53724.0, 51188.0, 3060.0, 53616.0] | [831.0, 343.0, 17.0, 619.0] | [198, 255, 254, 247] |
p02996 | u905715926 | 2,000 | 1,048,576 | Kizahashi, who was appointed as the administrator of ABC at National Problem Workshop in the Kingdom of AtCoder, got too excited and took on too many jobs. Let the current time be time 0. Kizahashi has N jobs numbered 1 to N. It takes A_i units of time for Kizahashi to complete Job i. The deadline for Job i is time B... | ['n = int(input())\nsche = []\nfor i in range(n):\n a,b = map(int,input().split())\n sche.append((b,a))\nsche.sort(reverse = True)\nnow = 1e18\nfor dead,ti in :\n if(dead > now):\n dead = now\n now -= ti\n\nif now < 0:\n print("No")\nelse:\n print("Yes")\n', 'n = int(input())\nsche = []\nfor i ... | ['Runtime Error', 'Accepted'] | ['s871052753', 's533305644'] | [2940.0, 29456.0] | [22.0, 848.0] | [263, 267] |
p02996 | u906428167 | 2,000 | 1,048,576 | Kizahashi, who was appointed as the administrator of ABC at National Problem Workshop in the Kingdom of AtCoder, got too excited and took on too many jobs. Let the current time be time 0. Kizahashi has N jobs numbered 1 to N. It takes A_i units of time for Kizahashi to complete Job i. The deadline for Job i is time B... | ["def solve():\n n = int(input())\n task = [0]*n\n for i in range(n):\n a,b = map(int,input().split())\n task[i] = [a,b]\n \n task = sorted(task, key= lambda x : x[1])\n print(task)\n\n time = 0\n due = 0\n\n for i in range(n):\n time += task[i][0]\n due = max(due,... | ['Wrong Answer', 'Accepted'] | ['s099081525', 's914919384'] | [47004.0, 39660.0] | [1045.0, 923.0] | [424, 407] |
p02996 | u907223098 | 2,000 | 1,048,576 | Kizahashi, who was appointed as the administrator of ABC at National Problem Workshop in the Kingdom of AtCoder, got too excited and took on too many jobs. Let the current time be time 0. Kizahashi has N jobs numbered 1 to N. It takes A_i units of time for Kizahashi to complete Job i. The deadline for Job i is time B... | ['n=int(input())\na=[]\nfor i in range(n):\n m,n=(int(i) for i in input().split())\n a.append([n,m])\na.sort()\nr="Yes"\ns=0\nfor i in range(n):\n s=s+a[i][1]\n if s>a[i][0]:\n r="No"\n break\nprint(r)', 'l=int(input())\na=[]\nfor i in range(l):\n m,n=(int(i) for i in input().split())\n a.append([n,m])\na.s... | ['Runtime Error', 'Accepted'] | ['s367847474', 's158937066'] | [35656.0, 35648.0] | [1125.0, 1098.0] | [196, 196] |
p02996 | u908383794 | 2,000 | 1,048,576 | Kizahashi, who was appointed as the administrator of ABC at National Problem Workshop in the Kingdom of AtCoder, got too excited and took on too many jobs. Let the current time be time 0. Kizahashi has N jobs numbered 1 to N. It takes A_i units of time for Kizahashi to complete Job i. The deadline for Job i is time B... | ["# Now = 0\n# Work Number = N\n# Work Id = i\n# Work Time = Ai\n# Work DeadLine = Bi\n\nN = int(input())\nworks = [[int(i) for i in input().split()] for _ in range(N)]\nelapsed = 0\n\nworks.sort(key=lambda x: x[1])\n\nfor work in works:\n time, deadline = work\n print(elapsed, time, deadline)\n if elapsed + t... | ['Wrong Answer', 'Accepted'] | ['s743724919', 's679226806'] | [42916.0, 41172.0] | [1196.0, 846.0] | [411, 295] |
p02996 | u910830417 | 2,000 | 1,048,576 | Kizahashi, who was appointed as the administrator of ABC at National Problem Workshop in the Kingdom of AtCoder, got too excited and took on too many jobs. Let the current time be time 0. Kizahashi has N jobs numbered 1 to N. It takes A_i units of time for Kizahashi to complete Job i. The deadline for Job i is time B... | ['import fractions\na, b, c, d = map(int, input().split())\n \ndef wareruzu(x):\n if b < x:\n return 0\n if b == x:\n return 1\n start_a = a if a % x == 0 else a - (a % x) + x\n end_b = b - (b % x)\n m = end_b - start_a\n return int(m / x) + 1\n \nall_n = b - a + 1\nprint(all_n - wareruz... | ['Runtime Error', 'Accepted'] | ['s258260040', 's520603163'] | [5048.0, 53720.0] | [36.0, 922.0] | [362, 296] |
p02996 | u912179452 | 2,000 | 1,048,576 | Kizahashi, who was appointed as the administrator of ABC at National Problem Workshop in the Kingdom of AtCoder, got too excited and took on too many jobs. Let the current time be time 0. Kizahashi has N jobs numbered 1 to N. It takes A_i units of time for Kizahashi to complete Job i. The deadline for Job i is time B... | ['N = int(input())\nA = []\nfor i in range(N):\n a, b = map(int, input().split())\n A.append([a, b])\n\nprint(A)\nB = sorted(A, key=lambda x: x[1])\n\n\ncount = 0\nlimit = 0\nfor i in range(N):\n count += B[i][0]\n if count <= B[i][1]:\n continue\n else:\n print("No")\n exit()\nprint... | ['Wrong Answer', 'Accepted'] | ['s318810246', 's764027081'] | [45540.0, 39692.0] | [1031.0, 915.0] | [344, 345] |
p02996 | u919017918 | 2,000 | 1,048,576 | Kizahashi, who was appointed as the administrator of ABC at National Problem Workshop in the Kingdom of AtCoder, got too excited and took on too many jobs. Let the current time be time 0. Kizahashi has N jobs numbered 1 to N. It takes A_i units of time for Kizahashi to complete Job i. The deadline for Job i is time B... | ['30\n384 8895\n1725 9791\n170 1024\n4 11105\n2 6\n578 1815\n702 3352\n143 5141\n1420 6980\n24 1602\n849 999\n76 7586\n85 5570\n444 4991\n719 11090\n470 10708\n1137 4547\n455 9003\n110 9901\n15 8578\n368 3692\n104 1286\n3 4\n366 12143\n7 6649\n610 2374\n152 7324\n4 7042\n292 11386\n334 5720', "import sys\n\nN = int(inp... | ['Runtime Error', 'Accepted'] | ['s821387369', 's952711500'] | [2940.0, 39632.0] | [17.0, 856.0] | [259, 293] |
p02996 | u922952729 | 2,000 | 1,048,576 | Kizahashi, who was appointed as the administrator of ABC at National Problem Workshop in the Kingdom of AtCoder, got too excited and took on too many jobs. Let the current time be time 0. Kizahashi has N jobs numbered 1 to N. It takes A_i units of time for Kizahashi to complete Job i. The deadline for Job i is time B... | ['N=int(input())\ntasks={}\nfor i in range(N):\n A,B=[int(i) for i in input().split(" ")]\n tasks[B]=tasks.get(B,0)+A\n\ntime=0\ntasks=sorted(tasks.items(),key=lambda w:w[0])\nfor task in tasks:\n time+=task[1]\n if time>task[0]:\n print("NO")\n break\nelse:\n print("YES")\n', 'N=int(input(... | ['Wrong Answer', 'Accepted'] | ['s123219327', 's090223619'] | [43832.0, 43840.0] | [916.0, 942.0] | [287, 287] |
p02996 | u927839462 | 2,000 | 1,048,576 | Kizahashi, who was appointed as the administrator of ABC at National Problem Workshop in the Kingdom of AtCoder, got too excited and took on too many jobs. Let the current time be time 0. Kizahashi has N jobs numbered 1 to N. It takes A_i units of time for Kizahashi to complete Job i. The deadline for Job i is time B... | ["n=int(input())\nab = [list(map(int, input().split())) for _ in range(n)]\nab.sort(key=lambda x: x[1])\n#print(ab)\nk=0\nanswer=1\nfor t in range(n):\n k+=ab[t][0]\n print([k,answer])\n if k>ab[t][1]:\n answer=answer*0\nif answer==1:\n print('Yes')\nelse:\n print('No')", "n=int(input())\nab = [li... | ['Wrong Answer', 'Runtime Error', 'Runtime Error', 'Wrong Answer', 'Runtime Error', 'Accepted'] | ['s021304436', 's129432957', 's395290123', 's587951072', 's636249613', 's269930089'] | [53600.0, 2940.0, 62508.0, 62508.0, 53600.0, 53600.0] | [1190.0, 17.0, 1030.0, 1322.0, 913.0, 980.0] | [276, 277, 266, 275, 286, 277] |
p02996 | u932913455 | 2,000 | 1,048,576 | Kizahashi, who was appointed as the administrator of ABC at National Problem Workshop in the Kingdom of AtCoder, got too excited and took on too many jobs. Let the current time be time 0. Kizahashi has N jobs numbered 1 to N. It takes A_i units of time for Kizahashi to complete Job i. The deadline for Job i is time B... | ["import sys\nN = int(input())\nA, B = [], []\nfor _ in range(N): \n a, b = (int(x) for x in input().split()) ... | ['Wrong Answer', 'Accepted'] | ['s358401575', 's848761451'] | [31216.0, 30408.0] | [1397.0, 983.0] | [2385, 1975] |
p02996 | u936378263 | 2,000 | 1,048,576 | Kizahashi, who was appointed as the administrator of ABC at National Problem Workshop in the Kingdom of AtCoder, got too excited and took on too many jobs. Let the current time be time 0. Kizahashi has N jobs numbered 1 to N. It takes A_i units of time for Kizahashi to complete Job i. The deadline for Job i is time B... | ['from operator import itemgetter\nfrom itertools import accumulate\nimport numpy as np\nN = int(input())\nwork = []\nfor i in range(N):\n a, b = map(int, input().split())\n work.append([a, b])\n\nwork = sorted(work, key=itemgetter(1,0))\nwork = np.array(work)\n\nans = "Yes"\nfor idx, time in enumerate(list(accumulat... | ['Wrong Answer', 'Accepted'] | ['s236620735', 's967713691'] | [61356.0, 62012.0] | [2111.0, 1416.0] | [401, 382] |
p02996 | u951480280 | 2,000 | 1,048,576 | Kizahashi, who was appointed as the administrator of ABC at National Problem Workshop in the Kingdom of AtCoder, got too excited and took on too many jobs. Let the current time be time 0. Kizahashi has N jobs numbered 1 to N. It takes A_i units of time for Kizahashi to complete Job i. The deadline for Job i is time B... | ["n = int(input())\ntsk = []\nfor i in range(n):\n\ta,b = map(int,input().split())\n\ttsk.append([a,b])\n\ntsk.sort(key = lambda x:x[1])\n\nt = 0\nans = 'Yes'\n\nfor i in range(n):\n\tl = tsk[i]\n\tt += l[0]\n\tif t<=l[1]:\n\t\tans = 'No'\n\t\tbreak\nprint(ans)", "n = int(input())\ntsk = []\nfor i in range(n):\n\ta,b =... | ['Wrong Answer', 'Accepted'] | ['s461186368', 's768400936'] | [40500.0, 40784.0] | [655.0, 658.0] | [233, 234] |
p02996 | u952669998 | 2,000 | 1,048,576 | Kizahashi, who was appointed as the administrator of ABC at National Problem Workshop in the Kingdom of AtCoder, got too excited and took on too many jobs. Let the current time be time 0. Kizahashi has N jobs numbered 1 to N. It takes A_i units of time for Kizahashi to complete Job i. The deadline for Job i is time B... | ['N = int(input())\ntask = [list(map(int,input().split())) for i in range(N)]\ntask.sort(key= lambda x:x[1])\n\ncurtime = 0\nfor i in task:\n curtime += i[0]\n if curtime > i[1]:\n print("No")\n break\n print(curtime)\nif curtime <= task[-1][1]:\n print("Yes")', 'N = int(input())\ntask = [list(map(int,input()... | ['Wrong Answer', 'Accepted'] | ['s941395135', 's606198101'] | [53596.0, 53724.0] | [1038.0, 906.0] | [256, 233] |
p02996 | u970899068 | 2,000 | 1,048,576 | Kizahashi, who was appointed as the administrator of ABC at National Problem Workshop in the Kingdom of AtCoder, got too excited and took on too many jobs. Let the current time be time 0. Kizahashi has N jobs numbered 1 to N. It takes A_i units of time for Kizahashi to complete Job i. The deadline for Job i is time B... | ['import math\na,b,c,d=map(int, input().split())\ndef gcd(a, b):\n\twhile b:\n\t\ta, b = b, a % b\n\treturn a\n\t\ne = round(c * d / gcd(c, d))\n\nf=(a-1)//c\ng=b//c\nh=(a-1)//d \nk=b//d\nl=(a-1)//e\nm=b//e\n\nx=(b-a+1)\ny=g-f\nz=k-h\nw=m-l\nprint(f,g,h,k,l,m)\nprint(x-y-z+w)', "n=int(input())\ns=[list(map(int, input()... | ['Runtime Error', 'Accepted'] | ['s066155635', 's066188184'] | [3064.0, 53600.0] | [17.0, 987.0] | [248, 222] |
p02996 | u973900850 | 2,000 | 1,048,576 | Kizahashi, who was appointed as the administrator of ABC at National Problem Workshop in the Kingdom of AtCoder, got too excited and took on too many jobs. Let the current time be time 0. Kizahashi has N jobs numbered 1 to N. It takes A_i units of time for Kizahashi to complete Job i. The deadline for Job i is time B... | ['x = int(input())\njob = []\ntime = []\nfor i in range(x):\n j, t = list(map(int, input().split()))\n job.append(j)\n time.append(t)\njt = 0\ntt = 0\nf = 0\nfor i in range(x):\n if job[i] >= time[i]:\n pass\n else:\n print("No")\n f = 1\n break\n jt += job[i]\n if tt < ... | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s506110110', 's948589416', 's231874668'] | [17568.0, 26372.0, 37984.0] | [661.0, 774.0, 1130.0] | [421, 438, 305] |
p02996 | u975481854 | 2,000 | 1,048,576 | Kizahashi, who was appointed as the administrator of ABC at National Problem Workshop in the Kingdom of AtCoder, got too excited and took on too many jobs. Let the current time be time 0. Kizahashi has N jobs numbered 1 to N. It takes A_i units of time for Kizahashi to complete Job i. The deadline for Job i is time B... | ["n = int(input())\nlis = []\nfor i in range(n):\n a,b = list(map(int,input().split()))\n lis.append([a,b])\nlis.sort(key=lambda x:x[1])\nprint(lis)\nans = 0\ntime = 0\nfor item in lis:\n time += item[0]\n if time > item[1]:\n ans += 1\n\nif ans == 0:\n print('Yes')\nelse:\n print('No')", "n = ... | ['Wrong Answer', 'Accepted'] | ['s709427396', 's424697757'] | [47780.0, 38872.0] | [1103.0, 979.0] | [293, 282] |
p02996 | u981931040 | 2,000 | 1,048,576 | Kizahashi, who was appointed as the administrator of ABC at National Problem Workshop in the Kingdom of AtCoder, got too excited and took on too many jobs. Let the current time be time 0. Kizahashi has N jobs numbered 1 to N. It takes A_i units of time for Kizahashi to complete Job i. The deadline for Job i is time B... | ['N = int (input())\nwork = []\nwork_time = 0\nflag = 0\n\nfor i in range(N):\n work.append(list(map(int , input().split())))\nprint(work)\nwork = sorted(work , key = lambda x: x[1])\n#work.sort()\n#sort(work)\n#print()\n#print("sorting ... ")\n#print()\n#print(work)\nfor i in range(N):\n work_time += work[i][0]\... | ['Wrong Answer', 'Accepted'] | ['s661379263', 's576235009'] | [61104.0, 53660.0] | [1106.0, 910.0] | [417, 206] |
p02996 | u987001487 | 2,000 | 1,048,576 | Kizahashi, who was appointed as the administrator of ABC at National Problem Workshop in the Kingdom of AtCoder, got too excited and took on too many jobs. Let the current time be time 0. Kizahashi has N jobs numbered 1 to N. It takes A_i units of time for Kizahashi to complete Job i. The deadline for Job i is time B... | ['import numpy as np\nimport sys\n\nif __name__ == \'__main__\':\n n = int(input())\n works = np.array([[int(i) for i in input().split()] for i in range(n)])\n col_num = 1\n sorted_works = works[np.argsort(works[:, col_num])]\n print(sorted_works)\n time = 0\n for i in range(n):\n time += so... | ['Wrong Answer', 'Accepted'] | ['s328567044', 's620860094'] | [49976.0, 52016.0] | [1050.0, 1054.0] | [457, 433] |
p02996 | u988586873 | 2,000 | 1,048,576 | Kizahashi, who was appointed as the administrator of ABC at National Problem Workshop in the Kingdom of AtCoder, got too excited and took on too many jobs. Let the current time be time 0. Kizahashi has N jobs numbered 1 to N. It takes A_i units of time for Kizahashi to complete Job i. The deadline for Job i is time B... | ['n = int(input())\ntask = []\n\nfor i in range(n):\n task.append([int(j) for j in input().split()])\n\ntask.sort(key = lambda x:x[1])', 'n = int(input())\ntask = []\nfor i in range(n):\n task.append([int(j) for j in input().split()])\n\n', 'n = int(input())\ntask = [int(j) for j in input().split()]\n\nfor i in r... | ['Wrong Answer', 'Wrong Answer', 'Runtime Error', 'Accepted'] | ['s078248984', 's270790890', 's418502070', 's297362072'] | [41168.0, 37928.0, 37924.0, 42460.0] | [790.0, 618.0, 630.0, 879.0] | [129, 98, 160, 296] |
p02996 | u993587645 | 2,000 | 1,048,576 | Kizahashi, who was appointed as the administrator of ABC at National Problem Workshop in the Kingdom of AtCoder, got too excited and took on too many jobs. Let the current time be time 0. Kizahashi has N jobs numbered 1 to N. It takes A_i units of time for Kizahashi to complete Job i. The deadline for Job i is time B... | ['import sys\nn = int(input())\nli = sorted(map(lambda x: list(map(int, x.split()[::-1])), sys.stdin.readlines()))\nprint(li)\nsum = 0\nflag = "Yes"\nfor x, y in li:\n sum += y\n if x < sum:\n flag = "No"\n break\n \nprint(flag)\n ', 'import sys\nn = int(input())\nli = sorted(map(lambda x: list(map(int, x... | ['Wrong Answer', 'Accepted'] | ['s623628912', 's428726160'] | [64772.0, 64784.0] | [912.0, 795.0] | [230, 220] |
p02996 | u993622994 | 2,000 | 1,048,576 | Kizahashi, who was appointed as the administrator of ABC at National Problem Workshop in the Kingdom of AtCoder, got too excited and took on too many jobs. Let the current time be time 0. Kizahashi has N jobs numbered 1 to N. It takes A_i units of time for Kizahashi to complete Job i. The deadline for Job i is time B... | ["n = int(input())\nab = [list(map(int, input().split())) for i in range(n)]\nab.sort(key=lambda x:(x[0], x[1]))\n\ncost = ab[0][0]\nlimit = ab[0][1]\n\nfor i in range(1, n):\n cost += ab[i][0]\n limit = ab[i][1]\n if limit < cost:\n print('No')\n exit()\n\nprint('Yes')", "n = int(input())\nab = ... | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s010665660', 's879484205', 's445283258'] | [66328.0, 53600.0, 53600.0] | [1044.0, 1065.0, 923.0] | [277, 286, 252] |
p02996 | u995004106 | 2,000 | 1,048,576 | Kizahashi, who was appointed as the administrator of ABC at National Problem Workshop in the Kingdom of AtCoder, got too excited and took on too many jobs. Let the current time be time 0. Kizahashi has N jobs numbered 1 to N. It takes A_i units of time for Kizahashi to complete Job i. The deadline for Job i is time B... | ['N=int(input())\ntask=[list(map(int,input().split())) for _ in range(N)]\ntime=0\nflag=1\ntask.sort(lambda x:x[1])\n#print(task)\nfor i in range(N):\n time=time+task[i][0]\n if not(time<=task[i][1]):\n flag=0\n break\nif flag==1:\n print("Yes")\nelse:\n print("No")\n', 'N=int(input())\ntask=[... | ['Runtime Error', 'Accepted'] | ['s643834037', 's418971760'] | [50360.0, 53728.0] | [642.0, 924.0] | [277, 280] |
p02998 | u102461423 | 2,000 | 1,048,576 | There are N dots in a two-dimensional plane. The coordinates of the i-th dot are (x_i, y_i). We will repeat the following operation as long as possible: * Choose four integers a, b, c, d (a \neq c, b \neq d) such that there are dots at exactly three of the positions (a, b), (a, d), (c, b) and (c, d), and add a dot ... | ['import numpy as np\nfrom scipy.sparse import *\n\nU = 10\nN = int(input())\nXY = np.array([input().split() for _ in range(N)], dtype=np.int32)\n\ngraph = csr_matrix((np.ones(N,dtype=np.bool), (XY[:,0], U + XY[:,1])), (2*U+1, 2*U+1))\n_, component = csgraph.connected_components(graph)\n\nX_cnt = np.bincount(component[... | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s052757648', 's336831700', 's000753062'] | [48408.0, 50448.0, 25800.0] | [393.0, 385.0, 317.0] | [499, 506, 813] |
p02998 | u256315261 | 2,000 | 1,048,576 | There are N dots in a two-dimensional plane. The coordinates of the i-th dot are (x_i, y_i). We will repeat the following operation as long as possible: * Choose four integers a, b, c, d (a \neq c, b \neq d) such that there are dots at exactly three of the positions (a, b), (a, d), (c, b) and (c, d), and add a dot ... | ['from collections import defaultdict\nn = int(input())\ndx = defaultdict(list)\ndy = defaultdict(list)\npts = []\nfor _ in range(n):\n x, y = map(int, input().split())\n dx[x].append(y)\n dy[y].append(x)\n pts.append((x, y))\n\nvx, vy = set(), set()\ncnt = 0\nfor x, y in pts:\n sx, sy = [x], [y]\n xs... | ['Wrong Answer', 'Runtime Error', 'Runtime Error', 'Accepted'] | ['s525776725', 's804292741', 's810886777', 's135604163'] | [43808.0, 3064.0, 35804.0, 46864.0] | [2106.0, 17.0, 409.0, 663.0] | [833, 833, 520, 869] |
p02998 | u333945892 | 2,000 | 1,048,576 | There are N dots in a two-dimensional plane. The coordinates of the i-th dot are (x_i, y_i). We will repeat the following operation as long as possible: * Choose four integers a, b, c, d (a \neq c, b \neq d) such that there are dots at exactly three of the positions (a, b), (a, d), (c, b) and (c, d), and add a dot ... | ["from collections import defaultdict,deque\nimport sys,heapq,bisect,math,itertools,string,queue\nsys.setrecursionlimit(10**8)\nINF = float('inf')\nmod = 10**9+7\neps = 10**-7\ndef inpl(): return list(map(int, input().split()))\ndef inpl_str(): return list(input().split())\n\nclass UnionFind:\n def __init__(self,N):... | ['Runtime Error', 'Accepted'] | ['s318638058', 's285906948'] | [43428.0, 44268.0] | [960.0, 1121.0] | [1791, 2240] |
p02998 | u407311141 | 2,000 | 1,048,576 | There are N dots in a two-dimensional plane. The coordinates of the i-th dot are (x_i, y_i). We will repeat the following operation as long as possible: * Choose four integers a, b, c, d (a \neq c, b \neq d) such that there are dots at exactly three of the positions (a, b), (a, d), (c, b) and (c, d), and add a dot ... | ['import sys\nsys.setrecursionlimit(10**5)\nv = 100005\nvisited = [False]*(2*v)\ncount = [0, 0]\n\ndef dfs(a):\n visited[a] = True\n count[a//v] += 1\n for i in vertex[a]:\n if not visited[i]:\n dfs(i)\n\ninput = sys.stdin.readline\nN = int(input())\nvertex = [[] for _ in range(v*2)]\nfor _ i... | ['Wrong Answer', 'Accepted'] | ['s804549433', 's585174610'] | [85040.0, 85040.0] | [597.0, 582.0] | [562, 543] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.