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 |
|---|---|---|---|---|---|---|---|---|---|---|
p02995 | u894471318 | 2,000 | 1,048,576 | You are given four integers A, B, C, and D. Find the number of integers between A and B (inclusive) that can be evenly divided by neither C nor D. | ['import numpy as np\n\na, b, c, d = [int(i) for i in input().split()]\n\nnum = np.arange(b - a + 1) + a\nprint(num[num % (c * d) != 0].shape[0])', "import numpy as np\nimport math\n\ndef gcd(a, b):\n while b:\n a, b = b, a % b\n return a\n\na, b, c, d = [int(i) for i in input().split()]\n#\n#num = np.aran... | ['Runtime Error', 'Wrong Answer', 'Accepted'] | ['s471396073', 's807637559', 's500294183'] | [20696.0, 12424.0, 12516.0] | [329.0, 149.0, 153.0] | [138, 872, 900] |
p02995 | u896206464 | 2,000 | 1,048,576 | You are given four integers A, B, C, and D. Find the number of integers between A and B (inclusive) that can be evenly divided by neither C nor D. | ['A, B, C, D = [int(_) for _ in input().split()]\n\nimport math\ndef dvi_num(b, c):\n return math.floor(b / c)\n\ndef lcm(a, b):\n return a * b / math.gcd(a, b)\n\ndef dvi_num2(b, c, d):\n return b - dvi_num(b,c) - dvi_num(b,d) + dvi_num(b, lcm(c, d))\n\nans = dvi_num2(B, C, D) - dvi_num2(A - 1, C, D)\nprint([... | ['Runtime Error', 'Accepted'] | ['s778785245', 's256203909'] | [3064.0, 3064.0] | [18.0, 17.0] | [359, 296] |
p02995 | u897895794 | 2,000 | 1,048,576 | You are given four integers A, B, C, and D. Find the number of integers between A and B (inclusive) that can be evenly divided by neither C nor D. | ["import math\n\ndef gcd(x, y):\n if y == 0:\n return x\n return gcd(y, x % y)\n\n\ndef solve():\n a, b, c, d = [int(i) for i in input().split()]\n\n ab = b - a + 1\n e = c * d / gcd(c, d)\n\n div = math.floor(ab / c) + math.floor(ab / d) - math.floor(ab / e)\n\n print(ab - div - 1)\n\n #... | ['Wrong Answer', 'Accepted'] | ['s419740632', 's139182552'] | [3060.0, 3060.0] | [17.0, 17.0] | [386, 470] |
p02995 | u898967808 | 2,000 | 1,048,576 | You are given four integers A, B, C, and D. Find the number of integers between A and B (inclusive) that can be evenly divided by neither C nor D. | ['def gcd(a,b):\n while b:\n a,b = b,a%b\n return a\n\na,b,c,d=map(int,input().split())\nal = b-a+1\n\nx = int(b/c) -int((a-1)/c)\ny = int(b/d) -int((a-1)/d)\nlcm_xy = int(c*d/math.gcd(c,d))\nxy = int(b/lcm_xy) -int((a-1)/lcm_xy)\n\nprint(al-(x+y-xy))', 'import math\na,b,c,d=map(int,input().split())\nal = b-a+1\n\... | ['Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted'] | ['s090710891', 's099936591', 's133174510', 's261837048', 's419453821', 's419574357', 's509553644', 's588757382', 's664903968', 's582432022'] | [3064.0, 3064.0, 3060.0, 3064.0, 3064.0, 3064.0, 3064.0, 3064.0, 3064.0, 3064.0] | [17.0, 18.0, 18.0, 17.0, 17.0, 18.0, 18.0, 17.0, 18.0, 17.0] | [241, 224, 310, 337, 310, 330, 342, 309, 222, 281] |
p02995 | u905715926 | 2,000 | 1,048,576 | You are given four integers A, B, C, and D. Find the number of integers between A and B (inclusive) that can be evenly divided by neither C nor D. | ['from fraction import lcm\n\na,b,c,d = map(int,input().split())\na-=1\nprint(b//c+b//d-a//c-a//d-b//(c*d/lcm(c,d)))\n', "import sys\nimport bisect\n\nsys.setrecursionlimit(1 << 25)\nread = sys.stdin.readline\ndef gcd(a,b):\n r = a%b;\n while r > 0:\n a = b\n b = r\n r = a%b\n return b\nde... | ['Runtime Error', 'Accepted'] | ['s168272656', 's386715353'] | [2940.0, 3064.0] | [17.0, 18.0] | [111, 517] |
p02995 | u907223098 | 2,000 | 1,048,576 | You are given four integers A, B, C, and D. Find the number of integers between A and B (inclusive) that can be evenly divided by neither C nor D. | ['def unchi(x,m,n):\n r=x//m+x//n-x//(m*n)\n return r\na,b,c,d=(int(i) for i in input().split())\nprint(unchi(b,c,d)-unchi(a,c,d))', 'def unchi(x,m,n):\n a=x//m+x//n-x//(m*n)\n return a\na,b,c,d=(int(i) for i in input().split())\nprint(unchi(b,c,d)-unchi(a,c,d))', 'def gcd(a, b):\n\twhile b:\n\t\ta, b = b, a % b\n\... | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s620082459', 's724686365', 's850651901'] | [2940.0, 2940.0, 3060.0] | [18.0, 17.0, 17.0] | [128, 128, 201] |
p02995 | u908481359 | 2,000 | 1,048,576 | You are given four integers A, B, C, and D. Find the number of integers between A and B (inclusive) that can be evenly divided by neither C nor D. | ["def lcm(a,b):\n return a*b//gcd(a,b)\n\ndef su(a,b,c,d):\n count = 0\n for _ in range(a//c, (b+1)//c):\n count += 1\n for _ in range(a//d, (b+1)//d):\n count += 1\n for _ in range(a//lcm(c,d), (b+1)//lcm(c,d)):\n count -= 1\n\n print(b+1-a-count)\n \ndef main():\n a,b,c,d ... | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s209462835', 's299497566', 's983545969'] | [3064.0, 3064.0, 3064.0] | [2104.0, 2104.0, 17.0] | [388, 261, 275] |
p02995 | u912179452 | 2,000 | 1,048,576 | You are given four integers A, B, C, and D. Find the number of integers between A and B (inclusive) that can be evenly divided by neither C nor D. | ['import math\n\n\ndef lcm(x, y):\n return (x * y) // math.gcd(x, y)\n\na,b,c,d= map(int, input().split())\n\n\n\n\n\n\n\nbsep = (b // c) + (b // d) - (b // lem(c, d))\nasep = (a-1) // c + (a-1) // d - (a-1) // lem(c, d)\n\nans = total - bsep + asep\nprint(ans)\n', 'import math\n\ndef lcm(x, y):\n return (x * y) ... | ['Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Wrong Answer', 'Runtime Error', 'Accepted'] | ['s130211129', 's732303091', 's780465265', 's806934411', 's892055776', 's983712599', 's569004514'] | [3060.0, 3064.0, 3064.0, 3064.0, 3060.0, 3060.0, 3060.0] | [18.0, 19.0, 17.0, 18.0, 17.0, 17.0, 18.0] | [769, 617, 775, 624, 288, 769, 286] |
p02995 | u918845030 | 2,000 | 1,048,576 | You are given four integers A, B, C, and D. Find the number of integers between A and B (inclusive) that can be evenly divided by neither C nor D. | ['def input_from_console():\n a, b, c, d = map(int, input().split())\n return a, b, c, d\n\n\ndef solve(a, b, c, d):\n def how_many(to, divide):\n n = to // divide\n return n\n count_by_c = how_many(b, c) - how_many(a - 1, c)\n count_by_d = how_many(b, d) - how_many(a - 1, d)\n count_by_... | ['Wrong Answer', 'Accepted'] | ['s755473749', 's563584776'] | [3064.0, 3064.0] | [17.0, 19.0] | [740, 1095] |
p02995 | u921178362 | 2,000 | 1,048,576 | You are given four integers A, B, C, and D. Find the number of integers between A and B (inclusive) that can be evenly divided by neither C nor D. | ['def gcd(a,b):\n while b:\n a,b = b,a%b\n return a\n\ndef lcm(a,b):\n return int(a*b/gcd(a,b))\n\ndef div(a,b,num):\n x = num/b\n sub = num%b\n if (a-1)/b != (a+sub)/b:\n x += 1\n return x\n\na,b,c,d = map(int,input().split())\n\nnum = b-a+1\nnumc = int(div(a,c,num))\nnumd = int(div(... | ['Wrong Answer', 'Accepted'] | ['s362293646', 's365842170'] | [3064.0, 3060.0] | [17.0, 17.0] | [384, 255] |
p02995 | u932868243 | 2,000 | 1,048,576 | You are given four integers A, B, C, and D. Find the number of integers between A and B (inclusive) that can be evenly divided by neither C nor D. | ['l=[]\nfor i in range(1,n+1):\n l.append(abs(l-1+i))\nmi=l.index(min(l))\nprint(n*(l-1)+sum(range(1,n+1))-l-mi)', 'import math\na,b,c,d=map(int,input().split())\nx=b//c-a//c\ny=b//d-a//d\ng=math.gcd(c,d)\nl=c*d//g\nz=b//l-a//l\nprint(b-a+1-x-y+z)', 'import math\na,b,c,d=map(int,input().split())\nx=b//c-(a-1)//c\ny=b/... | ['Runtime Error', 'Wrong Answer', 'Accepted'] | ['s228017603', 's492703971', 's251829395'] | [9032.0, 9164.0, 9148.0] | [22.0, 22.0, 22.0] | [107, 124, 136] |
p02995 | u934868410 | 2,000 | 1,048,576 | You are given four integers A, B, C, and D. Find the number of integers between A and B (inclusive) that can be evenly divided by neither C nor D. | ['import math\na,b,c,d = map(int, input().split())\ncd = math.gcd(cd)\n \ndef f(x,y,div):\n return int(max(x,y)/div) - int((min(x,y)-1) / div)\nprint(a-b+1- f(a,b,c) - f(a,b,d) + f(a,b,cd))', 'import math\na,b,c,d = map(int, input().split())\ncd = gcd(cd)\n\ndef f(x,y,div):\n return int(max(x,y)/div) - int((min(x,y)-... | ['Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted'] | ['s018067880', 's885044337', 's902575905', 's031181752'] | [3060.0, 3060.0, 3060.0, 3064.0] | [17.0, 17.0, 17.0, 17.0] | [182, 176, 184, 282] |
p02995 | u937642029 | 2,000 | 1,048,576 | You are given four integers A, B, C, and D. Find the number of integers between A and B (inclusive) that can be evenly divided by neither C nor D. | ['a,b,c,d= map(int,input().split())\ndef gcd(c,d):\n while d!=0:\n c,d=d,c%d\n return c\n\n\ndef lcm(c,d):\n return c*d//gcd(c,d)\n\na1=0\na2=0\nb1=0\nb2=0\ne1=0\ne2=0\n\n\ne=(c*d)/gcd(c,d)\n\nif(a-1>=c):\n a1=(a-1)//c\nelse:\n a1=0\n\nif(b>=c):\n b1=b//c\nelse:\n b1=0\n\nif(a-1>=d):\n a2... | ['Wrong Answer', 'Accepted'] | ['s672628525', 's626517727'] | [3064.0, 3064.0] | [19.0, 17.0] | [486, 491] |
p02995 | u943117333 | 2,000 | 1,048,576 | You are given four integers A, B, C, and D. Find the number of integers between A and B (inclusive) that can be evenly divided by neither C nor D. | ['from sys import stdin\nfrom fractions import gcd\na,b,c,d = [int(x) for x in stdin.readline().rstrip().split()]\n\nc_num = b//c-(a-1)//c\nd_num = b//d-(a-1)//d\n\nGCD = gcd(c,d_num)\n\nLCM = d*c/GCD\ncd_num = int(b//(LCM)-(a-1)//(LCM))\n\nprint(b-a+1-(c_num + d_num - cd_num))', 'from sys import stdin\n\na,b,c,d = [in... | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s521332141', 's697191474', 's615589553'] | [5076.0, 39028.0, 3064.0] | [35.0, 2104.0, 17.0] | [264, 223, 351] |
p02995 | u945181840 | 2,000 | 1,048,576 | You are given four integers A, B, C, and D. Find the number of integers between A and B (inclusive) that can be evenly divided by neither C nor D. | ['A, B, C, D = map(int, input().split())\n\ndef gcd(a, b):\n while b:\n a, b = b, a % b\n return a\n\ndef ans(x):\n return x - (x // C + x // D - x // (C * D / gcd(C, D)))\n\nprint(ans(B) - ans(A - 1))', 'A, B, C, D = map(int, input().split())\n\ndef gcd(a, b):\n while b:\n a, b = b, a % b\n ... | ['Wrong Answer', 'Accepted'] | ['s627427929', 's265275987'] | [3060.0, 3060.0] | [17.0, 17.0] | [205, 206] |
p02995 | u954774382 | 2,000 | 1,048,576 | You are given four integers A, B, C, and D. Find the number of integers between A and B (inclusive) that can be evenly divided by neither C nor D. | ['import math\na,b,c,d=map(int,input())\nans=0\n# print(a,b,c,d,b//c,a//c)\nans+=(b//c-a//c+(a%c==0))\n# print(ans)\nans+=(b//d-a//d+(a%d==0))\n# print(ans)\nlcm=c*d//math.gcd(c,d)\nans-=(b//lcm-a//lcm+(a%lcm==0))\nprint(b-a+1-ans)', 'import sys\nfrom functools import lru_cache, cmp_to_key\nfrom heapq import merge, hea... | ['Runtime Error', 'Accepted'] | ['s805273926', 's545761943'] | [3060.0, 5112.0] | [18.0, 36.0] | [219, 1230] |
p02995 | u955251526 | 2,000 | 1,048,576 | You are given four integers A, B, C, and D. Find the number of integers between A and B (inclusive) that can be evenly divided by neither C nor D. | ['a, b, c, d = map(int, input().split())\nans = b - a\nans += b // c + b // d - b // (c * d)\nans -= a // c + a // d - a // (c * d)\nprint(ans)', 'a, b, c, d = map(int, input().split())\nans = b - a\nprint(ans)\nans -= b // c + b // d - b // (c * d)\nprint(ans)\nans += a // c + a // d - a // (c * d)\nprint(ans)', 'a, b... | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s469494764', 's703378362', 's034862674'] | [2940.0, 3060.0, 3060.0] | [18.0, 17.0, 17.0] | [137, 159, 241] |
p02995 | u967594789 | 2,000 | 1,048,576 | You are given four integers A, B, C, and D. Find the number of integers between A and B (inclusive) that can be evenly divided by neither C nor D. | ['A,B,C,D = map(int, input().split())\n\nnrofC = (B // C) - ((A-1) // C)\nprint(nrofC)\nnrofD = (B // D) - ((A-1) // D)\nprint(nrofD)\nnrofCD = (B // (C*D)) - ((A-1) // (C*D))\nprint(nrofCD)\n\nprint((B-(A-1)) - nrofC - nrofD + nrofCD)\n', 'def gcd(a,b):\n while b!=0:\n a,b=b,a%b\n return a\n\nA,B,C,D ... | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s037662308', 's765996569', 's988398292'] | [3060.0, 3060.0, 3064.0] | [17.0, 17.0, 17.0] | [225, 278, 276] |
p02995 | u970308980 | 2,000 | 1,048,576 | You are given four integers A, B, C, and D. Find the number of integers between A and B (inclusive) that can be evenly divided by neither C nor D. | ['def abc():\n from math import ceil\n _a, _b, c, d = map(int, input().split())\n\n a = min(_a, _b)\n b = max(_a, _b)\n\n cnt_all = b - a + 1\n\n l = ceil(a / c)\n r = b // c\n cnt_c = r - l + 1\n\n l = ceil(a / d)\n r = b // d\n cnt_d = r - l + 1\n\n cd = lcm(c, d)\n l = ceil(a /... | ['Runtime Error', 'Accepted'] | ['s611155781', 's946336464'] | [3060.0, 3064.0] | [17.0, 17.0] | [399, 516] |
p02995 | u970899068 | 2,000 | 1,048,576 | You are given four integers A, B, C, and D. Find the number of integers between A and B (inclusive) that can be evenly divided by neither C nor D. | ['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 = (c * d / gcd(c, d))\nprint(e)\n\n\nf=math.ceil(a/c) \ng=math.ceil(b/c) \nh=math.ceil(a/d) \nk=math.ceil(b/d) \nl=math.ceil(a/e)\nm=math.ceil(b/e)\nx=b-a\ny=g-f\nz=k-h\nw=m-l\n\nprint(round(x-y-z+w))', ... | ['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s060790055', 's072671134', 's264526269', 's541041720', 's543187188', 's562123928', 's627315543'] | [3064.0, 3064.0, 3064.0, 3188.0, 3064.0, 3064.0, 3064.0] | [17.0, 17.0, 17.0, 19.0, 17.0, 17.0, 17.0] | [288, 319, 316, 309, 317, 248, 230] |
p02995 | u981332890 | 2,000 | 1,048,576 | You are given four integers A, B, C, and D. Find the number of integers between A and B (inclusive) that can be evenly divided by neither C nor D. | ["def euclid(x, y):\n x_1 = x\n y_1 = y\n a = x_1%y_1\n while a != 0:\n x_1 = y_1\n y_1 = a\n a = x_1%y_1\n return (x * y) / y_1\n\ndef dif(x, C, D):\n return x - (x//C) - (x//D) + (x//(euclid(C, D)))\n\ndef main():\n A, B, C, D = map(int, input().split())\n return dif(B, C,... | ['Wrong Answer', 'Accepted'] | ['s194576834', 's808252088'] | [3064.0, 3064.0] | [18.0, 17.0] | [371, 452] |
p02995 | u981931040 | 2,000 | 1,048,576 | You are given four integers A, B, C, and D. Find the number of integers between A and B (inclusive) that can be evenly divided by neither C nor D. | ['def gcd(a, b):\n while b != 0:\n a, b = b, a % b\n return a\n\ndef lcm(x, y):\n return (x * y) // gcd(x, y)¥\n\n\nA, B, C, D = map(int, input().split())\ncnt = B - A + 1\nall_range = B // C + B // D - B // lcm(C , D)\nsub_end = A - 1\nsub_range = sub_end // C + sub_end // D - sub_end // lcm(C , D)\npr... | ['Runtime Error', 'Accepted'] | ['s274177720', 's462350848'] | [3068.0, 3064.0] | [17.0, 17.0] | [339, 336] |
p02995 | u987164499 | 2,000 | 1,048,576 | You are given four integers A, B, C, and D. Find the number of integers between A and B (inclusive) that can be evenly divided by neither C nor D. | ['from sys import stdin\na,b,c,d = [int(x) for x in stdin.readline().rstrip().split()]\nprint(b-a+1-((b//c + b//d - b//(c*d)) - (a//c + a//d + a//(c*d))))', 'from math import gcd\n\ndef lcm(x, y):\n return (x * y)//gcd(x, y)\n\na,b,c,d = map(int,input().split())\n\ncd = lcm(c,d)\nab = b-a+1\n\nprint(ab-(b//c-(a-1)//... | ['Wrong Answer', 'Accepted'] | ['s776627253', 's032856332'] | [2940.0, 9144.0] | [17.0, 28.0] | [150, 189] |
p02995 | u993435350 | 2,000 | 1,048,576 | You are given four integers A, B, C, and D. Find the number of integers between A and B (inclusive) that can be evenly divided by neither C nor D. | ['A,B,C,D = map(int,input().split())\n\ncList = []\n\ndList = []\n\nnumList = []\n\nsupC = (B // C)\ninfC = (A // C)\n\nsupD = (B // D)\ninfD = (A // D)\n\nfor i in range(infC,supC+1):\n\tcList.append(i * C)\n\nfor i in range(infD,supD+1):\n\tdList.append(i * D)\n\t\nfor i in range(A,B+1):\n\tif i in cList or dList is ... | ['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s424374798', 's481985472', 's580248535', 's762929506', 's818395406'] | [615832.0, 3060.0, 3064.0, 831256.0, 3064.0] | [2142.0, 18.0, 17.0, 2153.0, 17.0] | [342, 216, 320, 365, 332] |
p02995 | u995102075 | 2,000 | 1,048,576 | You are given four integers A, B, C, and D. Find the number of integers between A and B (inclusive) that can be evenly divided by neither C nor D. | ['def gcd(a, b):\n while b != 0:\n a, b = b, a % b\n return a\n print(gcd(a, b))\n\n\ndef lcm(a, b):\n return a * b // gcd(a, b)\n print(lcm(a, b))\n\n\nA, B, C, D = map(int, input().split())\n\nc = B // C - A // C\nd = B // D - A // D\ncd = B // lcm(C, D) - A // lcm(C, D)\n\nnum = c + d - cd\nans... | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s263449007', 's376406873', 's130798704'] | [3060.0, 3060.0, 3060.0] | [17.0, 17.0, 17.0] | [329, 287, 305] |
p02995 | u995102267 | 2,000 | 1,048,576 | You are given four integers A, B, C, and D. Find the number of integers between A and B (inclusive) that can be evenly divided by neither C nor D. | ['A, B, C, D = map(int, input().split())\n\nC = min(C, D)\nD = max(C, D)\n\ndef gcd(x, y):\n while y != 0:\n x, y = y, x % y\n return x\n\nlcm = C * D // gcd(D, C)\n\na = A // C + 1\nb = B // C\nc = A // D + 1\nd = B // D\ne = A // lcm + 1\nf = B // lcm\n\nsingle_c, single_d, double = 0, 0, 0\n\nif a <= b:... | ['Wrong Answer', 'Accepted'] | ['s527650091', 's009424102'] | [3064.0, 3064.0] | [17.0, 19.0] | [510, 299] |
p02995 | u998169143 | 2,000 | 1,048,576 | You are given four integers A, B, C, and D. Find the number of integers between A and B (inclusive) that can be evenly divided by neither C nor D. | ['import numpy as np\nimport math\nA, B, C, D = [int(i) for i in input().split()]\n\ndef lcm(a, b, gcd):\n return a * b // gcd\n\nlarge = np.max([C, D])\nsmall = np.min([C, D])\n\n#def gcd(a, b):\n# while b:\n# a, b = b, a % b\n# return a\n\nwhile small != 0:\n large, small = small, large % small\n ... | ['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Runtime Error', 'Accepted'] | ['s393604252', 's467405046', 's544471775', 's966094708', 's479018409'] | [21492.0, 12408.0, 12436.0, 3064.0, 12544.0] | [311.0, 148.0, 154.0, 17.0, 156.0] | [643, 737, 509, 738, 443] |
p02996 | u000212387 | 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\nfor i in range(N):\n A[i],B[i]=map(int,input().split())\n C[i]=[A[i],B[i]]\nC.sort(key=lambda x:(x[1],x[0]))\nprint(C)\nt=0\nfor i in range(N):\n t+=C[i][0]\n if C[i][1]<t:\n print('No')\n exit()\nprint('Yes')", "\nN=int(input())\nA=[0]*N\nB=[0]*N... | ['Wrong Answer', 'Accepted'] | ['s782083262', 's589736585'] | [62836.0, 53840.0] | [1262.0, 1086.0] | [264, 255] |
p02996 | u003644389 | 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 = [[0]*2 for i in range(n)]\n\nfor i in range(n):\n\tab[i][0], ab[i][1] = map(int, input().split())\n\nab.sort(key=lambda x: x[1])\n\nprint(ab)\n\nws = 0\n\nfor i in range(n):\n\tws += ab[i][0]\n\tif ws > ab[i][1]:\n\t\tprint('No')\n\t\tbreak\nelse:\n\tprint('Yes')", "n = int(input())\n\nab = [... | ['Wrong Answer', 'Accepted'] | ['s385504451', 's566318599'] | [46948.0, 38040.0] | [1089.0, 913.0] | [261, 250] |
p02996 | u006251926 | 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() )\nfor i in range(N):\n C[i] = list(map(int, input().split() ) )\n \nC.sort(key= lambda s:(s[1],s[0]) )\n \n \njudge = "Yes"\ntime = 0\nfor i in range(N):\n time += C[i][0]\n if time > C[i][1]:\n judge = "No"\n break\nprint(judge)', 'N = int(input() )\nfor i in range(N):\n C[i] = (map(int, i... | ['Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted'] | ['s005087381', 's457571115', 's592043069', 's692257923', 's966508410'] | [3064.0, 3064.0, 3064.0, 3316.0, 38044.0] | [23.0, 17.0, 17.0, 21.0, 888.0] | [241, 227, 239, 235, 248] |
p02996 | u016572066 | 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 itertools\n\ndef input_ints():\n return list(map(int, input().split()))\n\ndef output_list(v):\n print(' '.join(str(x) for x in v))\n\ndef main():\n n = int(input())\n p = []\n for i in range(n):\n a, b = input_ints()\n p.append((b - a, b))\n p.sort()\n t = 0\n for i in ra... | ['Wrong Answer', 'Accepted'] | ['s016097585', 's781978671'] | [30996.0, 29552.0] | [1022.0, 940.0] | [465, 461] |
p02996 | u021019433 | 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 itertools import accumulate\n\nn = int(input())\na = sorted(tuple(map(int, input().split()))[::-1] for _ in range(n))\nc, d = zip(*a)\nprint('YNEOS'[any(x < y for x, y in zip(c, accumulate(d)))::2])\n", "from operator import itemgetter\nfrom itertools import accumulate\n\nn = int(input())\na = sorted((tuple(map(... | ['Wrong Answer', 'Wrong Answer', 'Runtime Error', 'Runtime Error', 'Accepted'] | ['s187436860', 's530021379', 's653559102', 's999676999', 's892373652'] | [46128.0, 45984.0, 97828.0, 2940.0, 31980.0] | [1108.0, 952.0, 1020.0, 17.0, 795.0] | [199, 257, 267, 277, 284] |
p02996 | u029452384 | 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 = np.zeros(N) \nB = np.zeros(N) \n\nfor i in range(N):\n A[i], B[i] = map(int, input().split())\n \nB1 = B[np.argsort(B)]\n\nans = "Yes"\n \nk = 0\nfor i in range(N):\n k += A[B1[i]]\n if k > B[B1[i]]:\n ans = "No"\n \nprint(ans)', 'import numpy as np\n... | ['Runtime Error', 'Accepted'] | ['s440542137', 's337695452'] | [18660.0, 17100.0] | [941.0, 1019.0] | [274, 271] |
p02996 | u046187684 | 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())', 'from operator import itemgetter\n\n\ndef solve(string):\n n, *ab = map(int, open(0).read().split())\n ab = sorted(zip(*[iter(ab)] * 2), key=itemgetter(1))\n past = 0\n for a, b in ab:\n past += a\n if past > b:\n return "No"\n return "Yes"\n\n\nif __name... | ['Runtime Error', 'Accepted'] | ['s963644779', 's335050522'] | [2940.0, 48716.0] | [18.0, 299.0] | [20, 319] |
p02996 | u047197186 | 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_lst = []\nb_lst = []\n\nfor i in range(0, n):\n a, b = [int(elem) for elem in input().split()]\n a_lst.append(a)\n b_lst.append(b)\n\ntmp = zip(b_lst, a_lst)\ntmp = sorted(tmp)\nb_lst, a_lst = zip(*tmp) \nprint(b_lst, a_lst)\n\nflag = 0\nsums = 0\nfor i in range(0, len(a_lst)):\n sum... | ['Wrong Answer', 'Accepted'] | ['s109345440', 's856021690'] | [49096.0, 49144.0] | [1189.0, 1101.0] | [423, 403] |
p02996 | u047816928 | 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(c) for c in input().split()] for _ in range(N)]\n\ns=0\npossible=True\nfor a, b in sorted(AB, key=lambda x:x[1]):\n s+=a\n if s>b:\n\tpossible = False\n break\n\nprint('Yes' if possible else 'No')", "N = int(input())\nAB = [[int(c) for c in input().split()] for _ in range(N)]... | ['Runtime Error', 'Accepted'] | ['s154686686', 's523127757'] | [2940.0, 42836.0] | [17.0, 837.0] | [226, 233] |
p02996 | u059210959 | 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... | ['# encoding:utf-8\nimport copy\nimport random\nimport bisect \nimport fractions \nimport math\nimport sys\n\nmod = 10**9+7\nsys.setrecursionlimit(mod) \n\ndef LI(): return list(map(int, sys.stdin.readline().split()))\n\nN = int(input())\nBA = [[] for i in range(N)]\nfor i in range(N):\n a,b = LI()\n BA[i] = (b,a... | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s078392053', 's981980545', 's619705666'] | [33852.0, 40248.0, 31932.0] | [673.0, 764.0, 709.0] | [614, 662, 583] |
p02996 | u073549161 | 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 tasks = []\n for i in range(n):\n a,b = map(int, input().split())\n tasks.append((a,b))\n\n tasks.sort(key=lambda x:x[1])\n #print(tasks)\n\n cur = 0\n c = True\n for i in range(n):\n cur += tasks[i][0]\n if cur > tasks[i][1]:\n c = Fa... | ['Runtime Error', 'Accepted'] | ['s188044805', 's483317354'] | [2940.0, 31860.0] | [17.0, 776.0] | [340, 284] |
p02996 | u075304271 | 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 functools\nimport math\nimport collections\nimport scipy\nimport fractions\nimport itertools\n\ndef solve():\n a, b, c, d = map(int, input().split())\n a -= 1\n lc = (c*d)//fractions.gcd(c,d)\n ans = (b-a)-(b//c-a//c)-(b//d-a//d)+(b//lc-a//lc)\n print(ans)\n return 0\n \nif __name__ =... | ['Runtime Error', 'Accepted'] | ['s356912184', 's190522236'] | [14328.0, 55208.0] | [184.0, 906.0] | [326, 355] |
p02996 | u076306174 | 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())\nList=[list(map(int,input().split())) for i in range(n)]\n#print(List)\n\nw=sorted(List, key=lambda x: x[1])\n\nt=0\nfor i in w:\n t=t+i[0]\n if t>i[1]:\n print("NO")\n sys.exit()\n\nprint("YES")\n ', 'import sys\n\nn=int(input())\nList=[list(map(int,input().split())) for i in ... | ['Wrong Answer', 'Accepted'] | ['s747194421', 's153005264'] | [55264.0, 55264.0] | [920.0, 926.0] | [222, 217] |
p02996 | u083960235 | 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 = list(map(int, input().split()))\n L.append(l)\n\nL.sort(key=lambda x: (x[1],x[0]))\n\ncnt = 0\nflag = True\nfor i in range(N):\n #cnt += L[0][i]\n print(L[i][0])\n cnt += L[i][0]\n #if cnt <= L[i][1]:\n if cnt > L[i][1]:\n flag = False\n ... | ['Wrong Answer', 'Accepted'] | ['s452387577', 's431420768'] | [66284.0, 66284.0] | [1293.0, 1332.0] | [370, 371] |
p02996 | u096616343 | 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())\nH = []\nfor _ in range(N):\n A, B = map(int,input().split())\n H.append((B - A, A))\nH.sort()\nt = 0\nfor i in range(N):\n S, A = H[i]\n if S < t:\n print("No")\n break\n t += A\n if len(H) == 0:\n print("Yes")', 'N = int(input())\nH = []\nfor _ in range(N):\n ... | ['Wrong Answer', 'Runtime Error', 'Wrong Answer', 'Accepted'] | ['s330210392', 's559290270', 's854216612', 's323202129'] | [29444.0, 3064.0, 28760.0, 29456.0] | [887.0, 17.0, 1068.0, 888.0] | [253, 252, 289, 249] |
p02996 | u107639613 | 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())\nlst = [[] for i in range(N)]\nfor i in range(N):\n mlst = list(map(int, input().split()))\n mlst.reverse()\n lst[i] = mlst\n\nlst.sort()\nlst = lst + [[0, 0]]\n\ntime = lst[0][1]\ni = 0\nwhile i < N and time <= lst[i][0]:\n time += lst[i+1][1]\n i += 1\n\nif i == N:\n print('yes')\... | ['Wrong Answer', 'Accepted'] | ['s126372008', 's611033767'] | [52024.0, 52208.0] | [1218.0, 1338.0] | [324, 324] |
p02996 | u112438657 | 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... | ['nb = int(input())\nsomme = 0\nmmax = 0\nfor loop in range(nb):\n n,m = map(int,input().split())\n somme+=n\n if m>mmax:\n mmax = m\nif somme<=mmax:\n print("yes")\nelse:\n print("no")', 'def myfunc(e):\n return e[1]\nnb = int(input())\nliste=[]\nfor loop in range(nb):\n liste += [[int(x) for x in input().sp... | ['Wrong Answer', 'Accepted'] | ['s936510044', 's587888522'] | [9164.0, 43736.0] | [365.0, 619.0] | [180, 310] |
p02996 | u114928268 | 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())\njobs = [list(map(int, input().split())) for i in range(n)]\n\njobs.sort(key=lambda x:x[1])\n\nflg = True\n\na = np.array(jobs)[:,0]\nb = np.array(jobs)[:,1]\n\nsum = np.add.accumulate(a)\nif sum(sum > b):\n print('No')\nelse:\n print('Yes')", "from numpy import array, add... | ['Runtime Error', 'Accepted'] | ['s882317910', 's392725896'] | [67296.0, 65492.0] | [1238.0, 1700.0] | [270, 246] |
p02996 | u121698457 | 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 lis.append(map(int,input().split()))\nlis.sort(key = lambda x:x[1])\na = 0\nfor j in range(N):\n a += lis[j][0]\n if a > lis[j][1]:\n print('No')\n exit()\nprint('Yes')", "N = int(input())\nlis = []\nfor i in range(N):\n lis.append(list(map(in... | ['Runtime Error', 'Accepted'] | ['s614791229', 's224316990'] | [96116.0, 53720.0] | [832.0, 1004.0] | [229, 235] |
p02996 | u135116520 | 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=input()\nX=[list(map(int,input().split())) for i in range(N)]\nX=sorted(X,key=lambda x:x[1])\ns=0\nt=0\nfor i in range(N):\n s+=X[i][0]\n if s>X[i][1]:\n print("No")\n break\n else:\n t+=1\nif t==N:\n print("Yes")\n ', 'N=int(input())\nX=[list(map(int,input().split())) for i in range(N)]\nX=sorted(X... | ['Runtime Error', 'Accepted'] | ['s315389780', 's618655398'] | [3064.0, 55264.0] | [18.0, 1005.0] | [220, 220] |
p02996 | u137226361 | 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 ls = []\n for _ in range(n):\n a, b = map(int, input().split())\n ls.append([b,a])\n ls = ls.sort()\n t=0\n for i in ls:\n t += i[1]\n if t > i[0]:\n print('No')\n exit(0)\n print('Yes')\nif __name__ == '__main__'... | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s692376688', 's967725790', 's173650580'] | [38136.0, 38360.0, 38060.0] | [641.0, 680.0, 731.0] | [316, 316, 311] |
p02996 | u138486156 | 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#include <algorithm>\n\nusing namespace std;\n\nint N;\nint A[200010], B[200010];\npair<int, int> C[200010];\n\nint main(){\n cin >> N;\n for(int i=1;i<=N;i++){\n cin >> A[i] >> B[i];\n //<b, i>のpairを作りAにアクセスできるようにする\n C[i] = {B[i], i};\n }\n sort(C+1, C+N+1);\n int time = 0;\n ... | ['Runtime Error', 'Accepted'] | ['s331469162', 's660067688'] | [2940.0, 33356.0] | [17.0, 782.0] | [585, 219] |
p02996 | u145950990 | 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())\nb = []\nfor i in range(n):\n x,y = map(int,input().split())\n b.append([y,x])\nb.sort()\nans = 'Yes'\nt = 0\nfor i in range(n):\n t += b[i][1]\n if t>b[i][0]:\n ans='No'\n print(t)\nprint(ans)\n", "n = int(input())\nd = [list(map(int,input().split())) for i in range(n)]\nd.sort... | ['Wrong Answer', 'Accepted'] | ['s731151339', 's388078214'] | [36956.0, 53728.0] | [1165.0, 940.0] | [220, 176] |
p02996 | u160414758 | 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,collections,math,random;sys.setrecursionlimit(10**7)\ndef Is(): return [int(x) for x in sys.stdin.readline().split()]\ndef Ss(): return sys.stdin.readline().split()\ndef I(): return int(sys.stdin.readline())\ndef S(): return input()\n\nN = I()\nlis = []\nfor i in range(N):\n a,b = Is()\n lis.append([... | ['Wrong Answer', 'Accepted'] | ['s801087160', 's626386759'] | [47796.0, 37984.0] | [1013.0, 943.0] | [441, 430] |
p02996 | u163320134 | 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())\narr=[list(map(int,input().split())) for _ in range(n)]\narr=sorted(arr,key=lambda x:x[1])\nprint(arr)\nsa=0\nfor i in range(n):\n sa+=arr[i][0]\n if sa>arr[i][1]:\n print('No')\n break\nelse:\n print('Yes')", "n=int(input())\narr=[list(map(int,input().split())) for _ in range(n)]\narr=sorted(... | ['Wrong Answer', 'Accepted'] | ['s083133874', 's902749656'] | [62604.0, 55260.0] | [1097.0, 1034.0] | [220, 209] |
p02996 | u167507723 | 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 = 3\n\nhyo = np.zeros((N,2))\n\nfor NN in range(N):\n hyo[NN] = input().split(\' \')\n\nhyo_sorted = hyo[np.argsort(hyo[:,1])]\n\ntooktime = hyo_sorted[:,0].cumsum()\n\ntimeup = hyo_sorted[:,1]\n\nif any(tooktime > timeup) ==True:\n print("No")\nelse:\n print("Yes")', 'import numpy as... | ['Runtime Error', 'Accepted'] | ['s319448888', 's909566427'] | [12504.0, 21416.0] | [151.0, 1152.0] | [279, 290] |
p02996 | u175590965 | 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 task = [list(map(int,input().split()))for i in range(n)]\n\n task.sort(key= lambda x:x[1])\n time = 0\n for a,b in task:\n time += a\n if time > b:\n print("No")\n break\n else:\n print("Yes")', 'n= int(input())\ntask = [list(map(int,input().split()))for i in range... | ['Runtime Error', 'Runtime Error', 'Wrong Answer', 'Accepted'] | ['s252442063', 's637435729', 's739979310', 's172894060'] | [2940.0, 53724.0, 53596.0, 53724.0] | [17.0, 827.0, 1066.0, 919.0] | [234, 234, 225, 238] |
p02996 | u178192749 | 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())\ncd = c*d//fractions.gcd(c,d)\ne = a-1\nf = (b//c + b//d - b//(cd)) - (e//c + e//d - e//(cd))\nprint(b-e-f)', "n = int(input())\nl = []\nfor i in range(n):\n l += [list(map(int,input().split()))]\nl = sorted(l,key=lambda x:x[1])\nt = 0\nfor i in range(n):\n t... | ['Runtime Error', 'Accepted'] | ['s652884931', 's668093539'] | [5048.0, 55256.0] | [36.0, 1130.0] | [155, 226] |
p02996 | u181668771 | 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())\nABList = []\nfor i in range(N):\n ABList.append(sys.stdin.readline().split())\nsABList = sorted(ABList, key=[1])\ntemp = 0\nisYes = True\nfor i in reversed(range(0, len(sABList))):\n temp += int(sABList[i][0])\n if temp > int(sABList[i][1]):\n isYes = False\nprint(sABLi... | ['Runtime Error', 'Accepted'] | ['s898264052', 's591204466'] | [64372.0, 67824.0] | [273.0, 1153.0] | [337, 302] |
p02996 | u185037583 | 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=[n]\nb=[n]\nfor i in range(n):\n a[i],b[i]=map(int,input().split())\n\nfor i in range(n):\n suma=sum(a)\n maxb=max(b)\n if suma<=mxb:\n index=b.index(maxb)\n del a[index]\n del b[index]\n else:\n print('No')\n exit()\nprint('Yes')\n", 'n = int(input())\ntasks = [list(map(int, inp... | ['Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted'] | ['s047416745', 's249295554', 's752108922', 's127122561'] | [3060.0, 3060.0, 17396.0, 53600.0] | [17.0, 19.0, 572.0, 898.0] | [253, 227, 257, 228] |
p02996 | u185966380 | 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\nCopy\nCopy\nN = int(input())\ncount = 0\nD = 0\ntask = [list(map(int, input().split())) for _ in range(N)]\ntask = sorted(task, key = lambda x:x[1])\n\nfor i in range(N):\n count += task[i][0]\n if count > task[i][1]:\n print("No")\n D = 1\n break\nif D== 0:\n print("Yes")', 'N = int(input())\n... | ['Runtime Error', 'Wrong Answer', 'Runtime Error', 'Accepted'] | ['s374885998', 's403567919', 's539387759', 's272940308'] | [3064.0, 62608.0, 17472.0, 55264.0] | [17.0, 1089.0, 588.0, 957.0] | [291, 271, 328, 260] |
p02996 | u196697332 | 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_b_lis = [0] * N\n\nfor i in range(N):\n a_b_lis[i] = list(map(int, input().split()))\n\ncount = 0\na_b_lis = sorted(a_b_lis, key=lambda x: x[1], x[0])\n\non_time = True\nfor item in a_b_lis:\n if item[0] + count <= item[1]:\n count += item[0]\n on_time = True\n else:\n ... | ['Runtime Error', 'Runtime Error', 'Wrong Answer', 'Accepted'] | ['s066758124', 's387432262', 's903660100', 's522030423'] | [3064.0, 3064.0, 67820.0, 55252.0] | [17.0, 17.0, 1503.0, 1042.0] | [373, 373, 375, 334] |
p02996 | u201856486 | 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())\nab = [int(input())for _ in range(n)]\n\nab.sort(reverse=True, key=lambda x: x[1])\n\nab = np.array(ab)\nmemo = ab.sum(axis=0)[0]\nf = False # flag\n\nfor x in ab:\n if memo <= x[1]:\n memo -= x[0]\n else:\n f = True\n break\nif f:\n print("No")\ne... | ['Runtime Error', 'Accepted'] | ['s157336536', 's644465127'] | [12440.0, 63248.0] | [151.0, 1144.0] | [321, 4926] |
p02996 | u204800924 | 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 = []\n\nfor _ in range(n):\n\n\tab.append(list(map(int, input().split())))\n\t\n\nab.sort(key = lambda x: x[1])\n\n# print(ab)\n\n\nlimit = 0\n\nwork = 0\n\nfail = 0\n\n\nfor i in range(n):\n\n\tlimit = ab[i][1]\n\n\twork += ab[i][0]\n\n\tprint(limit, work)\n\n\tif work > limit:\n\n\t\tfail = 1... | ['Wrong Answer', 'Accepted'] | ['s948294790', 's740641582'] | [54484.0, 53720.0] | [1211.0, 979.0] | [340, 319] |
p02996 | u214561383 | 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())\nb_list = []\nfor i in range(n):\n ba_tmp = list(map(int, input().split()))\n ba_list.append([ba_tmp[1], ba_tmp[0]])\nba_list.sort()\nnow_time = 0\nfor i in range(n):\n now_time += ba_list[i][1]\n if now_time > ba_list[i][0]:\n print('No')\n exit()\nprint('Yes')", "n = int(i... | ['Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted'] | ['s650259692', 's742868910', 's879725958', 's755237759'] | [3064.0, 2940.0, 2940.0, 36448.0] | [17.0, 17.0, 17.0, 1142.0] | [293, 294, 295, 294] |
p02996 | u217627525 | 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 task=[]\n for i in range(n):\n a,b=map(int,input().split())\n task.append([b,a])\n task.sort()\n t=0\n ans="Yes"\n for i in range(n):\n t+=task[i][1]\n if t>task[i][0]:\n ans="No"\n break\n print(ans)\nif __name__... | ['Runtime Error', 'Accepted'] | ['s328483824', 's331085819'] | [2940.0, 35612.0] | [18.0, 935.0] | [654, 327] |
p02996 | u223904637 | 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\nn=int(input())\na=[]\nb=[]\nfor i in range(n):\n c,d=map(int,input().split())\n a.append(c)\n b.append(d)\nx=np.argsort(b)\ng=0\nf=0\nfor i in range(n):\n g+=a[x[i]]\n if b[x[i]]>g:\n f+=1\nif f>0:\n print('No')\nelse:\n print('Yes')", "import numpy as np\nn=int(input()... | ['Wrong Answer', 'Accepted'] | ['s125639326', 's002153942'] | [29712.0, 29680.0] | [900.0, 915.0] | [263, 264] |
p02996 | u238801602 | 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())\njob = []\nfor i in range(N):\n A,B = map(int,input().split())\n job.append([B,A])\njob = sorted(job)time = 0\nflag = 0\nfor i in job:\n time += i[1]\n if i[0] < time:\n print('No')\n flag = 1\n break\n \nif flag == 0:\n print('Yes')", "N = int(input())\njob... | ['Runtime Error', 'Accepted'] | ['s374652902', 's768139939'] | [2940.0, 37144.0] | [17.0, 1029.0] | [278, 279] |
p02996 | u239528020 | 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... | ['#!/usr/bin/env python3\n\nn = int(input())\nab = [list(map(int, input().split())) for i in range(n)]\n\n\nab = sorted(ab, key=lambda x: x[1])\n\nweight = 0\nfor w, d in ab:\n print(weight, d)\n weight += w\n if weight > d:\n print("No")\n exit()\n# print(weight, d)\nprint("Yes")\n', '#!/usr/bin... | ['Wrong Answer', 'Accepted'] | ['s695803768', 's068575453'] | [55264.0, 55264.0] | [1225.0, 1095.0] | [287, 289] |
p02996 | u243755204 | 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\nC = [0] * N\nfor i in range(N):\n A[i],B[i]=map(int,input().split())\n C[i] = [B[i],A[i]]\nC.sort()\nprint(C)\ntime = 0\n\nfor i in range(len(C)):\n time += C[i][1]\n if C[i][0] < time:\n print("No")\n exit()\nprint("Yes")', 'N = int(input())\nA = ... | ['Wrong Answer', 'Accepted'] | ['s906652564', 's068229003'] | [50060.0, 38812.0] | [1205.0, 1067.0] | [276, 267] |
p02996 | u248670337 | 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... | ['#ABC131 D\nfrom operator import itemgetter as ig\nN = int(input())\nA = [0 for i in range(N)]\nB = [0 for i in range(N)]\nfor i in range(N):\n A[i], B[i] = (int(_) for _ in input().split())\nAB = sorted([(A[i], B[i])for i in range(N)], key = ig(1))\nprint(AB)\nlast = 0\nans = True\nfor i in range(N):\n last += ... | ['Wrong Answer', 'Accepted'] | ['s994985706', 's387088763'] | [43932.0, 36564.0] | [1265.0, 933.0] | [473, 437] |
p02996 | u249447366 | 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())\nworks = [tuple(map(int, input().split())) for _ in range(n)]\nworks.sort(key=lambda x: x[1])\nprint(works)\ntime = 0\nfor work in works:\n time += work[0]\n if time > work[1]:\n print('No')\n exit()\nprint('Yes')\n", "n = int(input())\nworks = [tuple(map(int, input().split())) fo... | ['Wrong Answer', 'Accepted'] | ['s397513387', 's045465199'] | [40744.0, 31820.0] | [979.0, 787.0] | [241, 228] |
p02996 | u255943004 | 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... | ['print("No")', 'N = int(input())\nAB = []\nfor n in range(N):\n AB.append(list(map(int,input().split())))\nAB = sorted(AB, key=lambda x: (x[1],x[0]))\ntime = 0\nresult = True\nfor n in range(N):\n if AB[n][1] < time + AB[n][0]:\n result = False\n break\n else:\n time += AB[n][0]\nprint("Y... | ['Wrong Answer', 'Accepted'] | ['s786610555', 's690853990'] | [2940.0, 67824.0] | [17.0, 1168.0] | [11, 321] |
p02996 | u259053514 | 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\nimport sys\nimport copy\n\nsys.setrecursionlimit(1000000)\n\n\n# input = sys.stdin.readline\n\n\n\nN = int(input())\n\nAB = []\n\nfor i in range(N):\n AB.append(list(map(int, input().split())))\n\nAB.sort(key=lambda x: x[1])\n\nprint(AB)\n\nsumV = 0\n\nfor i in range(N):\n sumV += AB[... | ['Wrong Answer', 'Accepted'] | ['s437690668', 's077155234'] | [63004.0, 54224.0] | [1152.0, 965.0] | [436, 426] |
p02996 | u265506056 | 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=[]\ntmp=0\nex=0\nfor i in range(1,N+1):\n a.append(input().split())\na_sorted=a.sort(key=lambda x: x[1])\nfor i in range(N):\n b=int(a[i][0])\n c=int(a[i][0])\n tmp=tmp+b\n if tmp>c:\n ex=1\n print("No")\n break\nif ex==0:\n print("Yes")', 'N=int(input())\na=[]... | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s152284077', 's853038762', 's081225299'] | [66060.0, 47052.0, 38028.0] | [674.0, 1114.0, 946.0] | [278, 301, 292] |
p02996 | u266964556 | 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=[]\nfor i in range(N):\n a,b=map(int,input().split())\n ls.append([a,b])\nls = sorted(ls,key=lambda x:x[1])\n\ntime=0\nfor i in range(N):\n time+=ls[i][0]\n print(time,i)\n if time > ls[i][1]:\n print("No")\n break\n if i == N-1:\n print("Yes")', 'N = int(in... | ['Wrong Answer', 'Accepted'] | ['s614623123', 's601361539'] | [40280.0, 39588.0] | [1157.0, 943.0] | [289, 271] |
p02996 | u268516119 | 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... | ['using System;\nusing System.Text;\nusing System.Linq;\nusing System.Collections;\nusing System.Collections.Generic;\nusing static System.Console;\nusing static System.Math;\n\nnamespace AtCoder\n{\n public class Program\n {\n public static void Main(string[] args)\n {\n new Program().So... | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s319119619', 's859437055', 's550254613'] | [2940.0, 3064.0, 31828.0] | [17.0, 17.0, 770.0] | [2355, 259, 252] |
p02996 | u291766461 | 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 = []\n for _ in range(N):\n temp = list(map(int, input().split()))\n AB.append((temp[0], temp[1]))\n\n sorted_AB = sorted(AB, key=lambda x: x[1])\n\n total_time = 0\n for x in sorted_AB:\n total_time += x[0]\n if total_time > x[1]:\n ... | ['Wrong Answer', 'Accepted'] | ['s571301921', 's409574267'] | [33448.0, 33484.0] | [906.0, 785.0] | [401, 464] |
p02996 | u293403071 | 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 = []\nfor i in range(n):\n a, b = map(int, input().split())\n a_list.append([a,b])\n\na_list.sort(key = sortSecond)\n\ndef detect(alist):\n time = 0\n for item in a_list:\n if time >= item[1]:\n return "No"\n else:\n time += item[0]\n return "Yes"\n\nprint(detect(a_li... | ['Runtime Error', 'Accepted'] | ['s397032922', 's946374073'] | [34796.0, 39688.0] | [641.0, 867.0] | [305, 318] |
p02996 | u295585689 | 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\nN =int(input())\nA =[]\nB =[]\nfor i in range(N):\n a,b = map(int,input().split())\n A.append(a)\n B.append(b)\nindex = np.argsort(B)\ntime = 0\nf = 0\nfor i in index:\n time += A[index]\n if time>B[index]:\n f = 1\n break\nif f == 1:\n print('No')\nelse:\n print... | ['Runtime Error', 'Accepted'] | ['s243525099', 's468897380'] | [29712.0, 29704.0] | [747.0, 864.0] | [306, 298] |
p02996 | u327162583 | 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 = input()\nN = int(N)\ns = [[ int(i) for i in input().split()] for i in range(N)]\nhoge = "True"\ns = sorted(s, key=lambda s:s[1])\nfor i in s:\n time += s[0]\n if time > s[1]:\n hoge = "No" \n break\n\nprint(hoge)', 'N = input()\nN = int(N)\ns = [[ int(i) for i in input().split()] for i in rang... | ['Runtime Error', 'Wrong Answer', 'Accepted'] | ['s090848151', 's248052023', 's531591615'] | [42716.0, 42716.0, 42716.0] | [796.0, 962.0, 883.0] | [225, 234, 233] |
p02996 | u329399746 | 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 = [[int(j) for j in input().split(" ")] for i in range(n)]\nwork = sorted(work,key = lambda x:(x[1],x[0]))\n\ntime = 0\nfor work_time, limit_time in work:\n time += work_time\n print(time,limit_time)\n if time > limit_time:\n print("No")\n break\n\nelse:\n print("Yes")... | ['Wrong Answer', 'Accepted'] | ['s558286199', 's171885906'] | [55384.0, 55384.0] | [1330.0, 1037.0] | [305, 278] |
p02996 | u340792767 | 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 = input().strip()\nN = int(N)\ndic = collections.defaultdict(lambda: 0)\n\nfor i in range(N):\n x,y = input().strip().split(" ")\n x = int(x)\n y = int(y)\n\n dic[y] += x\n\nprev_time = 0\nresult = "Yes"\n\nfor k,v in dic.items():\n if v > k:\n result = "No"\n break\n prev_time += v\... | ['Runtime Error', 'Accepted'] | ['s254611215', 's042333821'] | [3064.0, 44216.0] | [18.0, 1057.0] | [314, 370] |
p02996 | u343128979 | 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\nimport numpy as np\nimport re\n\n\ndef inputs(): return [int(s) for s in input().split()]\n\n\ndef main():\n N = input()\n AB = [inputs() for _ in range(int(N))]\n AB.sort(key=lambda x: x[1])\n print(AB)\n time = 0\n for a, b in AB:\n time += a\n print(time, b)\n if... | ['Wrong Answer', 'Accepted'] | ['s252697960', 's286031788'] | [59120.0, 50740.0] | [1344.0, 1092.0] | [400, 363] |
p02996 | u349091349 | 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())\nimport numpy as np\nA=np.zeros(N)\nB=np.zeros(N)\nfor i in range(0,N):\n A[i],B[i] = map(int,input().split())\n \nW=np.zeros((N,np.max(B)))\nfor i in range(0,N):\n for j in range(int(B[i]-A[i]),int(B[i])):\n W[i][j]=1\n \nfor b in B:\n if np.sum(W[:,0:b]) > b:\n print('No')\n break\nel... | ['Runtime Error', 'Accepted'] | ['s626515447', 's510860821'] | [889008.0, 34300.0] | [2110.0, 814.0] | [326, 450] |
p02996 | u350093546 | 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())\nlst=[]\n\nfor i in range(n):\n a=list(map(int,input().split()))\n lst.append(a)\n \nlst.sort(key=lambda x:x[1])\n\ntime=0\n\nfor i in lst:\n time+=i[0]\n if time>i[1]:\n print('NO')\n exit()\n \n \nprint('YES')", "n=int(input())\nlst=[]\n\nfor i in range(n):\n a=list(map(int,input().... | ['Wrong Answer', 'Accepted'] | ['s744812265', 's387273412'] | [47052.0, 47032.0] | [629.0, 638.0] | [225, 225] |
p02996 | u350578302 | 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\nimport sys\n \nN = int(input())\n \nlistA=[] \nwhile True:\n try:\n listA.append(list(map(int,input().split())))\n \n except:\n break;\n \n#print(listA)\n \nlistB = sorted(listA)\nla = sorted(listB, key=itemgetter(1))\nt = 0\n \nt = 0\nfor i in range(n):\n\ts = la[... | ['Runtime Error', 'Runtime Error', 'Wrong Answer', 'Accepted'] | ['s091768011', 's678357493', 's926266428', 's708309850'] | [56772.0, 56772.0, 56772.0, 56772.0] | [1413.0, 2107.0, 2107.0, 1337.0] | [405, 494, 634, 422] |
p02996 | u354916249 | 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\nAB = []\ntime = 0\n\nfor _ in range(N):\n AB.append(list(map(int, input().split())))\n\nAB = np.array(AB)\nsorted_AB = AB[AB[:,1].argsort(), :]\n\nfor i in range(N):\n time += sorted_AB[i,0]\n print(sorted_AB[i,0])\n\n if time > sorted_AB[i,1]:\n print('No... | ['Wrong Answer', 'Accepted'] | ['s291793945', 's546338013'] | [62376.0, 62376.0] | [1979.0, 1074.0] | [331, 306] |
p02996 | u363237465 | 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 = [list(map(int, input().split())) for i in range(n)]\nl.sort(key= x:x[1])\nt=0\nfor i in l:\n a,b=i\n t+=a\n if(t>b):\n print("No")\n break\n else:\n print("Yes")\n', 'N = int(input())\nl = [list(map(int, input().split())) for i in range(n)]\nl.sort(key= lambda x:... | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s593754472', 's753006526', 's756251915'] | [2940.0, 3060.0, 53728.0] | [17.0, 17.0, 944.0] | [206, 214, 238] |
p02996 | u372102441 | 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... | ['#m = imt(imput())\n#L = list(map(imt, imput().split()))\nimport math\nimport sys\n\nN = int(input())\nAB = [list(map(int, input().split())) for i in range(N)]\n\n\ndef aa(N,AB):\n AB.sort(key=lambda x: x[1])\n for i in range(N-1):\n clk += AB[i][0]\n if clk >= AB[i][1]:\n flg = False\n ... | ['Wrong Answer', 'Runtime Error', 'Runtime Error', 'Accepted'] | ['s038280118', 's238564556', 's702637798', 's783932349'] | [50348.0, 53712.0, 50348.0, 53712.0] | [663.0, 860.0, 690.0, 918.0] | [383, 398, 394, 418] |
p02996 | u374802266 | 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().strip())\na=[]\nfor i in range(N):\n array=list(map(int,input().strip().split()))\n a.append(array)\nb=sorted(a, key=lambda x:x[1])\nprint(b)\nn,t,f=0,0,0\nwhile True:\n t+=b[n][0]\n if t>b[n][1]:\n f=1\n break\n n+=1\n if n==N:\n break\nif f==1:\n print('No')\n... | ['Wrong Answer', 'Accepted'] | ['s797916787', 's830513638'] | [64168.0, 55264.0] | [1127.0, 1000.0] | [323, 196] |
p02996 | u375253797 | 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\ndic = {}\nB = []\n\nfor i in range(N):\n a, b = map(int,input().split())\n B.append(b)\n if '{}'.format(b) in dic:\n dic['{}'.format(b)] += a\n else:\n dic['{}'.format(b)] = a\n\nBs = sorted(B)\n\ntime = 0\n\nfor i, num in enumerate(Bs):\n time += dic['{}'.format(num)]... | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s009310858', 's765012266', 's701024789'] | [44584.0, 43828.0, 55744.0] | [1134.0, 1098.0, 1177.0] | [399, 399, 410] |
p02996 | u382907940 | 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... | ['using System;\nusing System.Collections.Generic;\nusing System.Diagnostics;\nusing System.Linq;\n\nclass Solver7\n {\n /*\n * https://atcoder.jp/contests/abc131/tasks/abc131_d\n * \n * \n */\n public void Solve7()\n {\n var nnum = 99999999;\n ... | ['Runtime Error', 'Accepted'] | ['s545497411', 's014569896'] | [2940.0, 29456.0] | [17.0, 840.0] | [2095, 187] |
p02996 | u390170391 | 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 = {}\nlb = []\nla = []\nc = 0\nfor _ in range(n):\n a,b = map(int,input().split())\n l[b] = a\nl = sorted(l.items())\nfor i in range(0,n):\n lb.append(l[i][0])\n la.append(l[i][1])\n\nfor i in range(0,n):\n if lb[i] < sum(la[:i+1]):\n c = 1\n break\n else:\n ... | ['Runtime Error', 'Accepted'] | ['s088372769', 's154282720'] | [41560.0, 37272.0] | [2104.0, 1092.0] | [358, 304] |
p02996 | u404057606 | 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\nn=int(input())\nab=[]\nfor i in range(n):\n ab.append(list(map(int,input().split())))\nc=sorted(ab, key=itemgetter(1), reverse=False)\nf=True\nt=0\nfor i in range(n):\n t = t + c[i][0]\n print(t)\n f=f and t<c[i][1]\nif f:\n print("Yes")\nelse:\n print("No")', 'from ... | ['Wrong Answer', 'Accepted'] | ['s968856018', 's457231813'] | [55256.0, 55256.0] | [1090.0, 918.0] | [294, 282] |
p02996 | u405733072 | 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 = [list(map(int,input().split())) for _ in range(n)]\nwork = sorted(work,key = lambda x:x[1])\na = [0] * n\na[0] = work[0][0]\nfor i in range(1,N):\n a[i] = a[i-1] + work[i][0]\nans = 'Yes'\nfor j in range(N):\n if a[j] > work[j][1]:\n ans = 'No'\n break\nprint(ans)", "n = i... | ['Runtime Error', 'Accepted'] | ['s413554121', 's391139542'] | [48396.0, 51680.0] | [532.0, 740.0] | [297, 297] |
p02996 | u411353821 | 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... | ['ef main():\n N = int(input())\n jobs = [list(map(int, input().split())) for _ in range(N)]\n time = 0\n jobs = sorted(jobs, key=lambda x: x[1])\n for j in jobs:\n time += j[0]\n if time > j[1]:\n print("No")\n return\n \n else:\n print("Yes")\n\n\nif... | ['Runtime Error', 'Accepted'] | ['s881201163', 's939555426'] | [2940.0, 55180.0] | [17.0, 905.0] | [338, 339] |
p02996 | u411858517 | 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\nL = [list(map(int, input().split())) for _ in range(N)]\n\nL.sort(key=lambda x:x[1])\n\nnow = 0\nflag = False\nfor l in L:\n print(now)\n now += l[0]\n \n if now > l[0] + l[1]:\n flag = True\n break\n\n \n\nif flag:\n print('No')\n\nelse:\n print('Yes')\n\n", "N ... | ['Wrong Answer', 'Accepted'] | ['s093922619', 's860266379'] | [54192.0, 53600.0] | [1119.0, 945.0] | [288, 262] |
p02996 | u411923565 | 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... | ['\nimport math\nA,B,C,D = map(int,input().split())\n\n\nlcm = C*D//math.gcd(C,D)\ncnt_lcm = B//lcm - A//lcm\n\n\ncnt_C = B//C - (A-1)//C \n\n\ncnt_D = B//D - (A-1)//D\n\n\nans = (B - A + 1) - (cnt_C + cnt_D - cnt_lcm)\n\n\nif A == B:\n \n if A%C == 0 and A%D == 0:\n print(0)\n else:\n print(1)\n... | ['Runtime Error', 'Accepted'] | ['s946767618', 's778820412'] | [9132.0, 39024.0] | [27.0, 517.0] | [562, 332] |
p02996 | u412298345 | 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())\npairs = []\nfor i in range(0, n):\n pairs.append(list(map(int, input().split())))\n\ndef canFinishJobs(arr):\n arr.sort(key=lambda x: x[1])\n sum = 0\n for i in arr:\n sum += i[0]\n if sum > i[1]:\n return "NO"\n return "YES"\n\nresult = canFinishJobs(pairs)\nprint(result)\n \n ', '... | ['Wrong Answer', 'Accepted'] | ['s954558754', 's943755710'] | [53652.0, 53652.0] | [1019.0, 968.0] | [297, 298] |
p02996 | u413165887 | 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... | ['print("Yes")\nn = int(input())\nab = [list(map(int, input().split())) for _ in range(n)]\nab.sort(key= lambda x:x[1])\ntime = 0\nfor i in ab:\n time += i[0]\n if time <= i[1]:\n continue\n else:\n print("No")\n sys.exit()\nprint("Yes")', 'import sys\nn = int(input())\nab = [list(map(int,... | ['Runtime Error', 'Accepted'] | ['s306867340', 's199650653'] | [53728.0, 53600.0] | [932.0, 894.0] | [253, 251] |
p02996 | u416773418 | 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())\njob = [list(map(int,input().split())) for i in range(n)]\n\n\njob.sort(key = lambda x: x[1])\nprint(job)\ntime = 0\nans = 0\nfor i in range(n):\n time += job[i][0]\n if time > job[i][1]:\n print("No")\n break\nelse:\n print("Yes")', 'n = int(input())\njob = [list(map(int,input... | ['Wrong Answer', 'Accepted'] | ['s447203944', 's368203581'] | [62508.0, 53600.0] | [1044.0, 931.0] | [257, 246] |
p02996 | u428132025 | 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 = [[0] * 2 for _ in range(n)]\nfor i in range(n):\n a, b = map(int, input().split())\n ab[i][0], ab[i][1] = a, b\nab = sorted(ab, key=lambda x: x[1])\n#print(ab)\ntime = 0\nfor task in ab:\n time += task[0]\n if time <= task[1]:\n print(time, task[1])\n continue\n els... | ['Wrong Answer', 'Accepted'] | ['s674519642', 's810983902'] | [39704.0, 39704.0] | [1186.0, 967.0] | [356, 357] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.