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
p03290
u506549878
2,000
1,048,576
A programming competition site _AtCode_ provides algorithmic problems. Each problem is allocated a score based on its difficulty. Currently, for each integer i between 1 and D (inclusive), there are p_i problems with a score of 100i points. These p_1 + … + p_D problems are all of the problems available on AtCode. A us...
['n, s = map(int, input().split())\ndata = []\nfor i in range(1,n+1):\n k, v = map(int, input().split())\n for j in range(1,k+1):\n if j<k:\n data.append([j,j*i*100])\n else:\n data.append([j,j*i*100+v])\nm = len(data)\nkekka = {}\nfor i in range(2 ** m):\n bag = []\n pro...
['Wrong Answer', 'Accepted']
['s354247730', 's339921300']
[3188.0, 3064.0]
[2104.0, 25.0]
[721, 519]
p03290
u514401521
2,000
1,048,576
A programming competition site _AtCode_ provides algorithmic problems. Each problem is allocated a score based on its difficulty. Currently, for each integer i between 1 and D (inclusive), there are p_i problems with a score of 100i points. These p_1 + … + p_D problems are all of the problems available on AtCode. A us...
['D, G = map(int, input().split())\nP = []\nC = []\nans = 10 ** 10\nfor i in range(D):\n p, c = map(int, input().split())\n P.append(p)\n C.append(c)\n\nfor i in range(2 ** D):\n a = 0\n b = 0\n for j in range(D):\n if i >> j & 1 :\n a += 100 * P[j] * (j + 1) + C[j]\n b +=...
['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted']
['s495789245', 's597539494', 's616343128', 's957346083']
[3064.0, 3064.0, 3064.0, 3064.0]
[140.0, 155.0, 152.0, 167.0]
[588, 594, 592, 625]
p03290
u516566941
2,000
1,048,576
A programming competition site _AtCode_ provides algorithmic problems. Each problem is allocated a score based on its difficulty. Currently, for each integer i between 1 and D (inclusive), there are p_i problems with a score of 100i points. These p_1 + … + p_D problems are all of the problems available on AtCode. A us...
['D,G = map(int,input().split())\nP=[]\nC=[]\nfor _ in range(D):\n p,c = map(int,input().split())\n P.append(p)\n C.append(c)\nanss=2**10\nfor i in range(1 << D):\n ans = 0\n summ = 0\n nokori = set(range(1,D+1))\n for j in range(D):\n if 1 & (i >> j):\n summ += P[j]*100*(j+1)+C[j...
['Runtime Error', 'Accepted']
['s535119213', 's707093315']
[3064.0, 3064.0]
[18.0, 25.0]
[606, 546]
p03290
u522140891
2,000
1,048,576
A programming competition site _AtCode_ provides algorithmic problems. Each problem is allocated a score based on its difficulty. Currently, for each integer i between 1 and D (inclusive), there are p_i problems with a score of 100i points. These p_1 + … + p_D problems are all of the problems available on AtCode. A us...
["def main():\n D, G = list(map(int, input().split()))\n P = []\n for i in range(1, D+1):\n P.append(tuple(map(int, input().split())))\n\n # print(D, G, P)\n minp = float('inf')\n for bit in range(1 << D):\n total = 0\n num_p = 0\n bset = set()\n for i in range(D):\n mask = 1 << i\n if bi...
['Runtime Error', 'Runtime Error', 'Accepted']
['s577967158', 's669475018', 's644985657']
[9168.0, 9308.0, 9300.0]
[37.0, 33.0, 41.0]
[1160, 1160, 1176]
p03290
u531220228
2,000
1,048,576
A programming competition site _AtCode_ provides algorithmic problems. Each problem is allocated a score based on its difficulty. Currently, for each integer i between 1 and D (inclusive), there are p_i problems with a score of 100i points. These p_1 + … + p_D problems are all of the problems available on AtCode. A us...
['D, G, *pc = map(int, open(0).read().split())\npc = list(zip(*[iter(pc)]*2))\n\n\n\ntotal_points = []\nfor i in range(D):\n total_points.append(pc[i][0] * (i+1) * 100 + pc[i][1])\n \nans_list = [i[0] for i, x in zip(pc, total_points) if x >= G]\n\n\nefficient_order = sorted(list(zip([x/y for x,(y,z) in list(zip(...
['Runtime Error', 'Accepted']
['s653991309', 's445157560']
[9080.0, 27276.0]
[23.0, 162.0]
[967, 1273]
p03290
u548303713
2,000
1,048,576
A programming competition site _AtCode_ provides algorithmic problems. Each problem is allocated a score based on its difficulty. Currently, for each integer i between 1 and D (inclusive), there are p_i problems with a score of 100i points. These p_1 + … + p_D problems are all of the problems available on AtCode. A us...
['# ABC104-C\n\nD,G=map(int,input().split()) \nbox=[] \nfor i in range(D): \n box.append(list(map(int,input().split()))) \nbox.insert(0,[0,0]) \ninfo=[[0,0] for i in range(2**D)] \n\nfor i in range(2*D): \n for j in range(1,D+1): \n if (i>>(j-1))&1: \n info[i][0]+=box[j][1]+j*100*box[j][0] \n ...
['Runtime Error', 'Accepted']
['s705673997', 's800338229']
[3188.0, 3316.0]
[20.0, 223.0]
[1374, 1462]
p03290
u548684908
2,000
1,048,576
A programming competition site _AtCode_ provides algorithmic problems. Each problem is allocated a score based on its difficulty. Currently, for each integer i between 1 and D (inclusive), there are p_i problems with a score of 100i points. These p_1 + … + p_D problems are all of the problems available on AtCode. A us...
['D,G = list(map(int,input().split()))\npoint_list = []\nfor _ in range(D):\n point_list.append(input())\nprint(point_list)', "D,G = list(map(int,input().split()))\nPC = [list(map(int, input().split())) for _ in range(D)]\n\ndef all_green(t,s):\n if t == -1:\n return float('inf')\n num = min(PC[t][0],s/...
['Wrong Answer', 'Accepted']
['s703988097', 's442124884']
[2940.0, 3064.0]
[17.0, 19.0]
[120, 378]
p03290
u552192779
2,000
1,048,576
A programming competition site _AtCode_ provides algorithmic problems. Each problem is allocated a score based on its difficulty. Currently, for each integer i between 1 and D (inclusive), there are p_i problems with a score of 100i points. These p_1 + … + p_D problems are all of the problems available on AtCode. A us...
["d,g = map(int,input().split())\nprobs = []\nans = float('inf')\nfor i in range(d):\n p,c =map(int,input().split())\n probs.append(((i+1)*100,p,c))\n\nfor i in range(2**d):\n count = 0\n score = 0\n yet = []\n for j in range(d):\n if ((i >>j) & 1):\n count +=probs[j][1]\n ...
['Wrong Answer', 'Accepted']
['s930909351', 's838549614']
[3064.0, 3064.0]
[27.0, 26.0]
[853, 881]
p03290
u556799364
2,000
1,048,576
A programming competition site _AtCode_ provides algorithmic problems. Each problem is allocated a score based on its difficulty. Currently, for each integer i between 1 and D (inclusive), there are p_i problems with a score of 100i points. These p_1 + … + p_D problems are all of the problems available on AtCode. A us...
["# -*- coding: utf-8 -*-\nD, G = map(int, input().split(' '))\np_c_pairs = [((i+1) * 100, list(map(int, input().split(' ')))) for i in range(D)]\n\nimport math\nans = float('inf')\np_c_pairs.sort(key=lambda x: -x[0])\nfor d in range((D+1)**2):\n print(bin(d))\n\n cnt = 0\n g = G\n for i in range(D):\n ...
['Wrong Answer', 'Accepted']
['s129573547', 's850999768']
[9240.0, 9144.0]
[30.0, 34.0]
[748, 746]
p03290
u557494880
2,000
1,048,576
A programming competition site _AtCode_ provides algorithmic problems. Each problem is allocated a score based on its difficulty. Currently, for each integer i between 1 and D (inclusive), there are p_i problems with a score of 100i points. These p_1 + … + p_D problems are all of the problems available on AtCode. A us...
['D,G = map(int,input().split())\nP = []\nC = []\nfor i in range(D):\n p, c = map(int,input().split())\n P.append(p)\n C.append(C)\n s += p\n\n\ndp = [[0 for in range(s+1)] for j in range(D+1)]\nfor i in range(D):\n p = P[i]\n c = C[i]\n t = 100*i\n for j in range(s+1):\n for k in range(p...
['Runtime Error', 'Accepted']
['s825265139', 's506648809']
[2940.0, 3316.0]
[17.0, 725.0]
[727, 709]
p03290
u557792847
2,000
1,048,576
A programming competition site _AtCode_ provides algorithmic problems. Each problem is allocated a score based on its difficulty. Currently, for each integer i between 1 and D (inclusive), there are p_i problems with a score of 100i points. These p_1 + … + p_D problems are all of the problems available on AtCode. A us...
['import sys\nimport numpy as np\nimport math\n# for AtCoder\n# import fractions\nfrom collections import deque \nfrom functools import reduce\n\n# input = sys.stdin.readline\n\nd, g = map(int, input().split())\np = [list(map(int, input().split())) for x in range(d)]\nfor i in range(d):\n ex = ((i+1) * 100 * p[i][0]...
['Wrong Answer', 'Accepted']
['s520585005', 's135387043']
[27036.0, 27256.0]
[119.0, 117.0]
[1066, 877]
p03290
u566428756
2,000
1,048,576
A programming competition site _AtCode_ provides algorithmic problems. Each problem is allocated a score based on its difficulty. Currently, for each integer i between 1 and D (inclusive), there are p_i problems with a score of 100i points. These p_1 + … + p_D problems are all of the problems available on AtCode. A us...
['d,g=map(int,input().split())\npc={_:(list(map(int,input().split()))) for _ in range(d)}\nbin_lst=[]\nd2=2**d\nfor x in range(d2):\n buf=bin(x)[2:]\n len_buf=len(buf)\n if len_buf<d:\n buf=\'0\'*(d-len_buf)+buf\n bin_lst.append(buf)\nprint(bin_lst)\nlst_cnt=[]\nbuf_lst=[]\nfor x in bin_lst:\n cnt...
['Wrong Answer', 'Accepted']
['s377614370', 's581422057']
[3064.0, 3064.0]
[40.0, 39.0]
[820, 805]
p03290
u580904613
2,000
1,048,576
A programming competition site _AtCode_ provides algorithmic problems. Each problem is allocated a score based on its difficulty. Currently, for each integer i between 1 and D (inclusive), there are p_i problems with a score of 100i points. These p_1 + … + p_D problems are all of the problems available on AtCode. A us...
['d, g = map(int, input().split())\np = [0]*d\nc = [0]*d\nfor i in range(d):\n p[i], c[i] = map(int, input().split())\n \nans = 10**6\n \nfor i in range(2**d):\n cnt = 0\n sum = 0\n k = -1\n for j in range(d):\n if (i >> j) & 1:\n sum += (j+1)*100*p[j]+c[j]\n cnt += p[j]\n else:\n k = j\n if ...
['Wrong Answer', 'Runtime Error', 'Accepted']
['s035405838', 's902156059', 's134616773']
[3064.0, 3064.0, 3064.0]
[22.0, 17.0, 22.0]
[454, 492, 451]
p03290
u585742242
2,000
1,048,576
A programming competition site _AtCode_ provides algorithmic problems. Each problem is allocated a score based on its difficulty. Currently, for each integer i between 1 and D (inclusive), there are p_i problems with a score of 100i points. These p_1 + … + p_D problems are all of the problems available on AtCode. A us...
['# -*- coding: utf-8 -*-\nD, G = map(int, input().split())\n\ncp = [tuple(map(int, input().split())) for i in range(D)]\ncpg = [(c, (i + 1) * 100, (i + 1) * 100 * c + p)\n for i, (c, p) in enumerate(cp)]\n\ncnt = 0\nwhile True:\n c, p, g = cpg.pop()\n\n if G - g > 0:\n G -= g\n cnt += c\n ...
['Runtime Error', 'Runtime Error', 'Accepted']
['s072905942', 's874016275', 's213074453']
[3064.0, 3064.0, 3188.0]
[17.0, 17.0, 47.0]
[627, 754, 713]
p03290
u592248346
2,000
1,048,576
A programming competition site _AtCode_ provides algorithmic problems. Each problem is allocated a score based on its difficulty. Currently, for each integer i between 1 and D (inclusive), there are p_i problems with a score of 100i points. These p_1 + … + p_D problems are all of the problems available on AtCode. A us...
["d,g = map(int,input().split())\np,c = [],[]\nans = float('inf')\nfor i in range(d):\n x,y = map(int,input().split())\n p.append(x)\n c.append(y)\nfor i in range((1<<d)):\n tmp,cnt = 0,0\n for j in range(d):\n if i&(1<<j):\n tmp = tmp + 100*(j+1)*p[j]+c[j]\n cnt += p[j]\n ...
['Wrong Answer', 'Accepted']
['s704505042', 's480185736']
[9232.0, 9160.0]
[127.0, 128.0]
[603, 592]
p03290
u594567187
2,000
1,048,576
A programming competition site _AtCode_ provides algorithmic problems. Each problem is allocated a score based on its difficulty. Currently, for each integer i between 1 and D (inclusive), there are p_i problems with a score of 100i points. These p_1 + … + p_D problems are all of the problems available on AtCode. A us...
['import math\nlength, goal = map(int, input().split(" "))\nproblems, bonus = [], []\nfor i in range(length):\n a, b = map(int, input().split(" "))\n problems.append(a)\n bonus.append(b)\nproblems = problems[::-1]\nbonus = bonus[::-1]\nanswer = float("inf")\nfor bit in range(length ** 2):\n temp_ans = 0\n ...
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s458734042', 's518589482', 's182638480']
[3064.0, 3064.0, 3316.0]
[19.0, 19.0, 304.0]
[1246, 1248, 1208]
p03290
u597622207
2,000
1,048,576
A programming competition site _AtCode_ provides algorithmic problems. Each problem is allocated a score based on its difficulty. Currently, for each integer i between 1 and D (inclusive), there are p_i problems with a score of 100i points. These p_1 + … + p_D problems are all of the problems available on AtCode. A us...
['d, g = map(int, input().split())\npc = [list(map(int, input().split())) for i in range(d)]\nprint(pc)\nans = float("inf")\n\n\n\ndef dfs(i,sum,count,rest):\n \n global ans\n if i == d:\n \n if sum < g:\n use = max(rest)\n n = min(pc[use-1][0], -(-(g-sum)//(use*100)))\n ...
['Wrong Answer', 'Accepted']
['s174745694', 's113038874']
[3064.0, 3064.0]
[19.0, 20.0]
[1382, 1372]
p03290
u600608564
2,000
1,048,576
A programming competition site _AtCode_ provides algorithmic problems. Each problem is allocated a score based on its difficulty. Currently, for each integer i between 1 and D (inclusive), there are p_i problems with a score of 100i points. These p_1 + … + p_D problems are all of the problems available on AtCode. A us...
['from itertools import product\n\nd, g = map(int, input().split())\nprob = []\nfor i in range(1, d + 1):\n p, c = map(int, input().split())\n prob.append((i * 100, p, c)) # score, num, bonus\n\nans = 1000000000\n\nfor prd in product([0, 1], repeat=d):\n cnt = 0\n allScore = 0\n for j, (score, num, bonu...
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s666653407', 's683407679', 's059045165']
[3064.0, 3064.0, 3188.0]
[23.0, 17.0, 24.0]
[766, 419, 758]
p03290
u604839890
2,000
1,048,576
A programming competition site _AtCode_ provides algorithmic problems. Each problem is allocated a score based on its difficulty. Currently, for each integer i between 1 and D (inclusive), there are p_i problems with a score of 100i points. These p_1 + … + p_D problems are all of the problems available on AtCode. A us...
['from itertools import combinations\nN, M = map(int, input().split())\nlink = [[0 for i in range(N)] for j in range(N)]\nfor m in range(M):\n x, y = map(int, input().split())\n link[x-1][y-1] = 1\n link[y-1][x-1] = 1\n\nfor i in range(N,1,-1): # N, N-1, N-2, ... 2\n for comb in combinations(range(N),i):\n ...
['Runtime Error', 'Accepted']
['s383424791', 's185347372']
[9084.0, 9148.0]
[27.0, 125.0]
[640, 598]
p03290
u619819312
2,000
1,048,576
A programming competition site _AtCode_ provides algorithmic problems. Each problem is allocated a score based on its difficulty. Currently, for each integer i between 1 and D (inclusive), there are p_i problems with a score of 100i points. These p_1 + … + p_D problems are all of the problems available on AtCode. A us...
['a,b=map(int,input().split())\nc=[0]+[list(map(int,input().split()))for i in range(n)]\ndef f(s,t):\n if t==0:\n return 10000007\n else:\n l=min(s//(i*100),c[i][0])\n k=100*i*l\n if n==c[i][0]:\n l+=s[i][1]\n if l<G:\n n+=f(s-l,i-1)\n return min(n,f...
['Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted']
['s055591620', 's545827652', 's940480826', 's937763592']
[3064.0, 3064.0, 3064.0, 3064.0]
[18.0, 18.0, 18.0, 19.0]
[328, 328, 316, 295]
p03290
u626337957
2,000
1,048,576
A programming competition site _AtCode_ provides algorithmic problems. Each problem is allocated a score based on its difficulty. Currently, for each integer i between 1 and D (inclusive), there are p_i problems with a score of 100i points. These p_1 + … + p_D problems are all of the problems available on AtCode. A us...
["S = input()\nT = input()\nA = S\nif S == T:\n print('Yes')\nelse:\n eq = False\n for i in range(len(S)):\n A = A[-1] + A[0:-1]\n if A == T:\n eq = True\n break\n if eq:\n print('Yes')\n else:\n print('No')\n \n", 'import math\n\nD, G = map(int, input().split())\nans = 10**7\nproblems = [tu...
['Wrong Answer', 'Accepted']
['s643199251', 's203373335']
[3060.0, 3064.0]
[17.0, 22.0]
[221, 580]
p03290
u626468554
2,000
1,048,576
A programming competition site _AtCode_ provides algorithmic problems. Each problem is allocated a score based on its difficulty. Currently, for each integer i between 1 and D (inclusive), there are p_i problems with a score of 100i points. These p_1 + … + p_D problems are all of the problems available on AtCode. A us...
['d,g = map(int,input().split())\nli = []\n\nfor i in range(d):\n p,c = map(int,input().split())\n li.append([p,c])\n\nans = 10**9\nfor i in range(1<<d):\n ttl = 0\n cnt = 0\n memo = [0 for i in range(d)]\n for j in range(d):\n if (i>>j)&1:\n ttl += li[j][1]+(j+1)*li[j][0]*100\n ...
['Wrong Answer', 'Runtime Error', 'Accepted']
['s094313691', 's837497030', 's008214521']
[3064.0, 3064.0, 3064.0]
[25.0, 17.0, 25.0]
[887, 999, 1059]
p03290
u631277801
2,000
1,048,576
A programming competition site _AtCode_ provides algorithmic problems. Each problem is allocated a score based on its difficulty. Currently, for each integer i between 1 and D (inclusive), there are p_i problems with a score of 100i points. These p_1 + … + p_D problems are all of the problems available on AtCode. A us...
['D,G = map(int, input().split())\nPC = [tuple(map(int, input().split())) for _ in range(D)]\n\nprint(PC)\n\n\ncomp = [100*(i+1)*PC[i][0] + PC[i][1] for i in range(D)]\n\n\n\nans = sum([PC[i][0] for i in range(D)])\nfor bit in range(1<<D):\n \n \n point = 0\n prob = 0\n \n print("init",bit,ans,prob,po...
['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted']
['s097511737', 's881537784', 's964391823', 's699311880']
[3572.0, 3064.0, 3188.0, 3064.0]
[29.0, 18.0, 22.0, 27.0]
[1298, 1007, 1161, 1233]
p03290
u633548583
2,000
1,048,576
A programming competition site _AtCode_ provides algorithmic problems. Each problem is allocated a score based on its difficulty. Currently, for each integer i between 1 and D (inclusive), there are p_i problems with a score of 100i points. These p_1 + … + p_D problems are all of the problems available on AtCode. A us...
['D,G=map(int,input().split())\np=[]\nc=[]\nfor i in range(D):\n a,b=map(int,input().split())\n p.append(a)\n c.append(b)\nten=0\nmondaisu=0\nans=100000\n\nfor i in range(2**D):\n for j in range(D):\n if (i>>j)&1==1:\n ten+=(j+1)*100*p[j]+c[j]\n mondaisu+=p[j]\n else:\n ...
['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted']
['s428237463', 's506535338', 's544733139', 's818448442']
[3064.0, 4632.0, 3064.0, 3064.0]
[22.0, 2104.0, 22.0, 22.0]
[538, 426, 536, 548]
p03290
u634159866
2,000
1,048,576
A programming competition site _AtCode_ provides algorithmic problems. Each problem is allocated a score based on its difficulty. Currently, for each integer i between 1 and D (inclusive), there are p_i problems with a score of 100i points. These p_1 + … + p_D problems are all of the problems available on AtCode. A us...
['D, G = map(int, input().split())\nList = [list(map(int, input().split())) for _ in range(D)]\n\nfor i in range(D):\n b = [[List[i][0], List[i][0]*(i+1)*100+List[i][1]] for i in range(D)]\n \nm = 10**9\nfor j in range(1, 2**D):\n cnt = 0\n score = 0\n flg = 0\n for k in range(D):\n if ((j>>k)&...
['Wrong Answer', 'Accepted']
['s886236865', 's865512290']
[3188.0, 3064.0]
[23.0, 21.0]
[827, 834]
p03290
u637413735
2,000
1,048,576
A programming competition site _AtCode_ provides algorithmic problems. Each problem is allocated a score based on its difficulty. Currently, for each integer i between 1 and D (inclusive), there are p_i problems with a score of 100i points. These p_1 + … + p_D problems are all of the problems available on AtCode. A us...
['#! /usr/bin/env python\n# -*- coding: utf-8 -*-\n\nimport pdb\nimport sys\nF = sys.stdin\n\nD, G = map(int,F.readline().split())\np = []\nc = []\nall_score = []\nmaisu = 0\nans = 0\nsum = 0\nall_selected = [0]*D\nfor k in range(D):\n p1, c1 = map(int,F.readline().split())\n p.append(p1)\n c.append(c1)\n a...
['Runtime Error', 'Accepted']
['s638919322', 's540765301']
[5360.0, 5548.0]
[51.0, 51.0]
[1045, 1131]
p03290
u649326276
2,000
1,048,576
A programming competition site _AtCode_ provides algorithmic problems. Each problem is allocated a score based on its difficulty. Currently, for each integer i between 1 and D (inclusive), there are p_i problems with a score of 100i points. These p_1 + … + p_D problems are all of the problems available on AtCode. A us...
['dg = input().split(“ “);\nd = int(dg[0]);\ng = int(dg[1]);\np = [0]*d;\nc = [0]*d;\nfor i in range(d) :\n s = input().split(“ “);\n p[i] = int(s[0]);\n c[i] = int(s[1]);\n\nans = 0;\nfor i in range(sum(p)) :\n sump = 0;\n for j in range(len(p)) :\n all = 0;\n for m in range(p[j]) :\n ...
['Runtime Error', 'Accepted']
['s596370306', 's886043444']
[3192.0, 3064.0]
[19.0, 63.0]
[493, 628]
p03290
u649373416
2,000
1,048,576
A programming competition site _AtCode_ provides algorithmic problems. Each problem is allocated a score based on its difficulty. Currently, for each integer i between 1 and D (inclusive), there are p_i problems with a score of 100i points. These p_1 + … + p_D problems are all of the problems available on AtCode. A us...
['D,G=[ int(it) for it in input().split() ]\nli = [ [ int(it) for it in input().split() ] for i in range(D) ]\n\nimport itertools as ite\ncmin = 100000000000000000\nfor cli in ite.product( *([[0,1]]*D) ):\n \n s = 0\n c = 0\n for i in range(D):\n if cli[i]==1:\n s += li[i][1] + (i+1)*100*li[i][0]\n c ...
['Runtime Error', 'Wrong Answer', 'Accepted']
['s190843004', 's279578836', 's150637497']
[3064.0, 3064.0, 3064.0]
[18.0, 28.0, 28.0]
[606, 592, 615]
p03290
u657994700
2,000
1,048,576
A programming competition site _AtCode_ provides algorithmic problems. Each problem is allocated a score based on its difficulty. Currently, for each integer i between 1 and D (inclusive), there are p_i problems with a score of 100i points. These p_1 + … + p_D problems are all of the problems available on AtCode. A us...
["import math\n\n# print('input >>')\nD, G = map(int, (input().split()))\npc = []\nfor _ in range(D):\n p, c = map(int, (input().split()))\n pc.append((p, c))\n\npoint = 0\nans = []\n\ndef dfs(i, count, point):\n \n if point >= G:\n ans.append(count)\n return\n \n if point + (i + 1) * 10...
['Runtime Error', 'Accepted']
['s541435240', 's751511287']
[3064.0, 3064.0]
[18.0, 18.0]
[827, 926]
p03290
u685263709
2,000
1,048,576
A programming competition site _AtCode_ provides algorithmic problems. Each problem is allocated a score based on its difficulty. Currently, for each integer i between 1 and D (inclusive), there are p_i problems with a score of 100i points. These p_1 + … + p_D problems are all of the problems available on AtCode. A us...
['import unionfind', 'D, G = map(int, input().split())\nPC = [list(map(int, input().split())) for i in range(D)]\nPC_new = sorted([(PC[i][0]*100*(i+1) + PC[i][1], PC[i][0]) for i in range(D)],\n key=lambda x: x[1], reverse=True)\n\nans = 99999999\nfor i in range(1<<D):\n ct = 0\n score = 0\n for...
['Runtime Error', 'Accepted']
['s175544241', 's220296522']
[2940.0, 3444.0]
[17.0, 52.0]
[16, 675]
p03290
u686390526
2,000
1,048,576
A programming competition site _AtCode_ provides algorithmic problems. Each problem is allocated a score based on its difficulty. Currently, for each integer i between 1 and D (inclusive), there are p_i problems with a score of 100i points. These p_1 + … + p_D problems are all of the problems available on AtCode. A us...
['D,G=map(int, input().split())\nli = []\nfor i in range(D):\n li.append(list(map(int, input().split())))\n\nmin_n=10**9\nn = 0\ns=0\nfor ind in range(2**D):\n n=0\n s=0\n if ind==0:\n continue\n for j in range(D):\n if ind>>j & 1:\n s += (j+1)*100*li[j][0]+li[j][1]\n n+=li[j][0]\n print(s)\n if ...
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s016960796', 's126301418', 's953102036']
[3188.0, 3064.0, 3188.0]
[26.0, 21.0, 29.0]
[687, 550, 691]
p03290
u695811449
2,000
1,048,576
A programming competition site _AtCode_ provides algorithmic problems. Each problem is allocated a score based on its difficulty. Currently, for each integer i between 1 and D (inclusive), there are p_i problems with a score of 100i points. These p_1 + … + p_D problems are all of the problems available on AtCode. A us...
['import copy\n\nD,G=map(int,input().split())\n\n\nscore=[None]*D\nfor i in range(D):\n score[i]=list(map(int,input().split()))\n\ncomp=[None]*D\n\nfor i in range(D):\n comp[i]=score[i][0]*(i+1)*100+score[i][1]\n\n\nnumber=0\nfor i in range(D):\n number+=score[i][0]\n\ndplist=[None]*(number+1)\nfor i in range(...
['Wrong Answer', 'Accepted']
['s450952856', 's016317505']
[3824.0, 3188.0]
[152.0, 28.0]
[1112, 831]
p03290
u698501671
2,000
1,048,576
A programming competition site _AtCode_ provides algorithmic problems. Each problem is allocated a score based on its difficulty. Currently, for each integer i between 1 and D (inclusive), there are p_i problems with a score of 100i points. These p_1 + … + p_D problems are all of the problems available on AtCode. A us...
["D,G = map(int,input().split(' '))\nl = [list(map(int,input().split())) for i in range(D)]\n \nans = 10**8\nfor i in range(2**D):\n score = 0\n tmp = 0\n n_list = []\n for j in range(D):\n if (i >> j & 1):\n k = l[j]\n score += (j+1)*100*k[0]+k[1]\n tmp += k[0]\n...
['Wrong Answer', 'Accepted']
['s693625401', 's812860374']
[3316.0, 3064.0]
[146.0, 18.0]
[722, 626]
p03290
u698771758
2,000
1,048,576
A programming competition site _AtCode_ provides algorithmic problems. Each problem is allocated a score based on its difficulty. Currently, for each integer i between 1 and D (inclusive), there are p_i problems with a score of 100i points. These p_1 + … + p_D problems are all of the problems available on AtCode. A us...
['def Search(g,L,i):\n if i<0:return 9999\n pS=pC=S = C = 0\n while g > S:\n if i < 0: return 9999\n pS=S\n pC=C\n S+=L[i][0]*L[i][1]*100\n if g > S:\n S+=L[i][2]\n C+=L[i][1]\n i-=1\n print(C,pC,g-pS,L[:i+1],i)\n pC+=min(C,((g-pS-1)//100//L[i+1...
['Wrong Answer', 'Accepted']
['s729655929', 's157374299']
[3188.0, 3064.0]
[19.0, 18.0]
[481, 409]
p03290
u699944218
2,000
1,048,576
A programming competition site _AtCode_ provides algorithmic problems. Each problem is allocated a score based on its difficulty. Currently, for each integer i between 1 and D (inclusive), there are p_i problems with a score of 100i points. These p_1 + … + p_D problems are all of the problems available on AtCode. A us...
['def dfs(i, sum, count, unsolve):\n global ans\n if i == D:\n \n if sum < G:\n use = max(unsolve)\n \n N = min(pc[use-1][0], -(-(g-sum)//(100*use)))\n count += N \n sum += N * 100 * use\n if sum > G:\n ans = min(ans, count)\n else:\n dfs(i + 1, sum, count, unsolve)\n dfs(i + 1, sum + pc[i][0] * (i...
['Runtime Error', 'Accepted']
['s461006921', 's758221389']
[9048.0, 9144.0]
[29.0, 32.0]
[647, 901]
p03290
u728566015
2,000
1,048,576
A programming competition site _AtCode_ provides algorithmic problems. Each problem is allocated a score based on its difficulty. Currently, for each integer i between 1 and D (inclusive), there are p_i problems with a score of 100i points. These p_1 + … + p_D problems are all of the problems available on AtCode. A us...
['D, G = map(int, input().split())\np = [0] * D\nc = [0] * D\nfor i in range(D):\n p[i], c[i] = map(int, input().split())\n\nnum = []\n\nfor i in range(2**D):\n score = 0\n num_tmp = 0 \n not_comp = [] \n for j in range(D):\n if i >> j & 1:\n score += p[j] * 100 * (j + 1) + c[j]\n ...
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s120839987', 's904881377', 's508445774']
[5748.0, 5748.0, 3064.0]
[69.0, 71.0, 27.0]
[821, 813, 726]
p03290
u732061897
2,000
1,048,576
A programming competition site _AtCode_ provides algorithmic problems. Each problem is allocated a score based on its difficulty. Currently, for each integer i between 1 and D (inclusive), there are p_i problems with a score of 100i points. These p_1 + … + p_D problems are all of the problems available on AtCode. A us...
["import itertools\nD, G = map(int,input().split())\nplist = [ list( map(int ,input().split())) for i in range(D)]\n\nprint(plist)\n\nbit = [0,1]\n'''\n(0, 0, 0, 0, 0)\n(0, 0, 0, 0, 1)\n(0, 0, 0, 1, 0)\n(0, 0, 0, 1, 1)\n(0, 0, 1, 0, 0)\n(0, 0, 1, 0, 1)\n(0, 0, 1, 1, 0)\n(0, 0, 1, 1, 1)\n(0, 1, 0, 0, 0)\n(0, 1, 0, 0, 1)...
['Wrong Answer', 'Accepted']
['s873455337', 's109768577']
[20036.0, 19916.0]
[129.0, 126.0]
[1447, 1685]
p03290
u732870425
2,000
1,048,576
A programming competition site _AtCode_ provides algorithmic problems. Each problem is allocated a score based on its difficulty. Currently, for each integer i between 1 and D (inclusive), there are p_i problems with a score of 100i points. These p_1 + … + p_D problems are all of the problems available on AtCode. A us...
['ans = 10000\nfor i in range(2**D):\n s = 0\n cnt = 0\n b = [0] * D\n \n \n for j in range(D):\n if (i >> j) & 1:\n s += 100 * (j + 1) * pc[j][0] + pc[j][1]\n cnt += pc[j][0]\n b[j] = 1\n\n \n flag1 = False\n flag2 = True\n if s < G:\n for k ...
['Runtime Error', 'Accepted']
['s397853402', 's477894059']
[3064.0, 3064.0]
[17.0, 50.0]
[851, 943]
p03290
u734876600
2,000
1,048,576
A programming competition site _AtCode_ provides algorithmic problems. Each problem is allocated a score based on its difficulty. Currently, for each integer i between 1 and D (inclusive), there are p_i problems with a score of 100i points. These p_1 + … + p_D problems are all of the problems available on AtCode. A us...
['d,g = map(int,input().split())\npo = [0]\nco = [0]\nfor i in range(d):\n p,c = map(int,input().split())\n po.append(p)\n co.append(c)\n\n\n\n\n\n\n\ndef f(G,i):\n if i == 0:\n return float("inf")\n n = min(G//(i * 100),p[i])\n s = 100 * i * n \n if n == p[i]:\n s += c[i]\n if s <...
['Runtime Error', 'Runtime Error', 'Accepted']
['s564255926', 's792999128', 's977672858']
[3316.0, 3064.0, 3064.0]
[21.0, 18.0, 19.0]
[800, 802, 803]
p03290
u747602774
2,000
1,048,576
A programming competition site _AtCode_ provides algorithmic problems. Each problem is allocated a score based on its difficulty. Currently, for each integer i between 1 and D (inclusive), there are p_i problems with a score of 100i points. These p_1 + … + p_D problems are all of the problems available on AtCode. A us...
['import itertools\n\nD,G = map(int,input().split())\npc = [list(map(int,input().split())) for i in range(D)]\nprint(pc)\n\nans = 10**5\n\nfor v in itertools.product([0,1],repeat=D):\n p = 0\n t = 0\n for i in range(D):\n if v[i] == 1:\n p += (i+1)*100*pc[i][0] + pc[i][1]\n t += pc...
['Wrong Answer', 'Accepted']
['s556921902', 's320546734']
[3064.0, 3188.0]
[23.0, 26.0]
[566, 702]
p03290
u750058957
2,000
1,048,576
A programming competition site _AtCode_ provides algorithmic problems. Each problem is allocated a score based on its difficulty. Currently, for each integer i between 1 and D (inclusive), there are p_i problems with a score of 100i points. These p_1 + … + p_D problems are all of the problems available on AtCode. A us...
['D,G = map(int, input().split())\npc = [list(map(int,input().split())) for _ in range(D)]\n\nans = 1 << 29\nt = []\nfor bit in range(1<<D):\n score = 0\n f = 0\n \n for i in range(D):\n if bit & (1<<i):\n score += pc[i][0]*100*(i+1) + pc[i][1]\n f += pc[i][0]\n if sc...
['Wrong Answer', 'Accepted']
['s483086908', 's692392831']
[3272.0, 3064.0]
[152.0, 186.0]
[806, 784]
p03290
u763968347
2,000
1,048,576
A programming competition site _AtCode_ provides algorithmic problems. Each problem is allocated a score based on its difficulty. Currently, for each integer i between 1 and D (inclusive), there are p_i problems with a score of 100i points. These p_1 + … + p_D problems are all of the problems available on AtCode. A us...
["D,G = list(map(int,input().split()))\nP = []\nC = []\n\nfor i in range(D):\n p,c = list(map(int,input().split()))\n P.append(p)\n C.append(c)\n\nfor c in range(2**D):\n score = 0\n solved = 0\n remain = []\n for i,b in enumerate(format(c,'b').zfill(D)):\n if b == '1':\n score +=...
['Runtime Error', 'Accepted']
['s800795302', 's510960337']
[3064.0, 3064.0]
[23.0, 24.0]
[588, 603]
p03290
u768256617
2,000
1,048,576
A programming competition site _AtCode_ provides algorithmic problems. Each problem is allocated a score based on its difficulty. Currently, for each integer i between 1 and D (inclusive), there are p_i problems with a score of 100i points. These p_1 + … + p_D problems are all of the problems available on AtCode. A us...
["import sys \nsys.setrecursionlimit(10**6)\n\ndef dfs(i,sum,count,nokori):\n global ans\n if i==g:\n if sum<g:\n use=max(nokori)\n n=min(pc[n-1][1],-(-(g-sum)//100*use)\n count+=n\n sum+=n*100*use\n\n if sum>=g:\n ans=min(ans,count)\n\n else:\n dfs(i+1,sum,count,nokori)\n dfs(i+...
['Runtime Error', 'Accepted']
['s727173141', 's102305235']
[2940.0, 3064.0]
[17.0, 20.0]
[507, 515]
p03290
u768496010
2,000
1,048,576
A programming competition site _AtCode_ provides algorithmic problems. Each problem is allocated a score based on its difficulty. Currently, for each integer i between 1 and D (inclusive), there are p_i problems with a score of 100i points. These p_1 + … + p_D problems are all of the problems available on AtCode. A us...
['d, g = map(int,input().split())\nplist = [list(map(int,input().split())) for i in range(d)]\n\nbasiclist = []\n\nproblem = []\n\nfor i in range(len(plist)):\n tmplist = [plist[i][0], (plist[i][0])*(i+1)*100+plist[i][1]]\n problem.append(plist[i][0])\n basiclist.append(tmplist)\n\n# print(basiclist)\n\nimport...
['Wrong Answer', 'Accepted']
['s590267569', 's094927310']
[3188.0, 3188.0]
[36.0, 36.0]
[1290, 1850]
p03290
u771167374
2,000
1,048,576
A programming competition site _AtCode_ provides algorithmic problems. Each problem is allocated a score based on its difficulty. Currently, for each integer i between 1 and D (inclusive), there are p_i problems with a score of 100i points. These p_1 + … + p_D problems are all of the problems available on AtCode. A us...
['#abc104c All Green\n\n\ndef dfs(i, sum, count, rest):\n global ans\n if i == d:\n if sum < g:\n rest_max = max(rest)\n n = min(l[rest_max-1][0], -(-(g-sum)//(rest_max*100)))\n count += n\n sum += n * rest_max * 100\n if sum >= g:\n ans = min(a...
['Runtime Error', 'Accepted']
['s177653607', 's565065867']
[9120.0, 9140.0]
[29.0, 34.0]
[754, 630]
p03290
u781262926
2,000
1,048,576
A programming competition site _AtCode_ provides algorithmic problems. Each problem is allocated a score based on its difficulty. Currently, for each integer i between 1 and D (inclusive), there are p_i problems with a score of 100i points. These p_1 + … + p_D problems are all of the problems available on AtCode. A us...
["import sys\nfrom math import ceil\ninputs = sys.stdin.readlines()\n\nd, g = map(int, inputs[0].split())\nP = list(map(int, map(lambda x: x.split()[0], inputs[1:])))\nC = list(map(int, map(lambda x: x.split()[1], inputs[1:])))\n\nans = float('inf')\nfor bit in range(1 << d):\n count, total, rest = 0, 0, set(range(1...
['Wrong Answer', 'Runtime Error', 'Accepted']
['s199808536', 's232956488', 's765185324']
[3192.0, 3064.0, 3064.0]
[24.0, 18.0, 24.0]
[858, 663, 728]
p03290
u782098901
2,000
1,048,576
A programming competition site _AtCode_ provides algorithmic problems. Each problem is allocated a score based on its difficulty. Currently, for each integer i between 1 and D (inclusive), there are p_i problems with a score of 100i points. These p_1 + … + p_D problems are all of the problems available on AtCode. A us...
['D, G = map(int, input().split())\nPC = [tuple(map(int, input().split()))]\n\nres = float("inf")\nfor bit in range(1 << D):\n sum = 0\n num = 0\n for i in range(D):\n if ((bit >> i) & 1):\n sum += (i + 1) * 100 * P[i] + C[i]\n num += P[i]\n if sum >= G:\n res = min(res, ...
['Runtime Error', 'Accepted']
['s229170329', 's841291426']
[3064.0, 3064.0]
[17.0, 143.0]
[569, 617]
p03290
u797994565
2,000
1,048,576
A programming competition site _AtCode_ provides algorithmic problems. Each problem is allocated a score based on its difficulty. Currently, for each integer i between 1 and D (inclusive), there are p_i problems with a score of 100i points. These p_1 + … + p_D problems are all of the problems available on AtCode. A us...
["d,g = input().split(' ')\nd,g = int(d),int(g)\n\n\ndef argmax(x):\n\tmax_value = -1000000000\n\tindex = 0\n\tfor i,e in enumerate(x):\n\t\tif max_value < e:\n\t\t\tindex = i\n\treturn i\n\ndef compute(point,prob_num,bonus_point):\n\treturn point*prob_num + bonus_point\n\n\npoint_list=[input().split(' ') for i in rang...
['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted']
['s173621186', 's391526220', 's671430299', 's936759047']
[3064.0, 3064.0, 3064.0, 3064.0]
[17.0, 18.0, 18.0, 27.0]
[1064, 1132, 1064, 878]
p03290
u813098295
2,000
1,048,576
A programming competition site _AtCode_ provides algorithmic problems. Each problem is allocated a score based on its difficulty. Currently, for each integer i between 1 and D (inclusive), there are p_i problems with a score of 100i points. These p_1 + … + p_D problems are all of the problems available on AtCode. A us...
["D, G = map(int, input().split())\nP, C = [], []\n\nfor _ in range(D):\n p, c = map(int, input().split())\n P.append(p); C.append(c)\n\nans = float('inf')\n\nfor bit in range(2**D):\n score, solve_num = 0, 0\n for i in range(D):\n if (bit >> i) & 1:\n score += (100 * (i+1) * P[i] + C[i])\...
['Runtime Error', 'Runtime Error', 'Accepted']
['s524335732', 's833342530', 's761467007']
[3064.0, 3064.0, 3064.0]
[17.0, 19.0, 158.0]
[673, 672, 642]
p03290
u814781830
2,000
1,048,576
A programming competition site _AtCode_ provides algorithmic problems. Each problem is allocated a score based on its difficulty. Currently, for each integer i between 1 and D (inclusive), there are p_i problems with a score of 100i points. These p_1 + … + p_D problems are all of the problems available on AtCode. A us...
['def add(pc, p, G, tmp):\n b = False\n for i in range(len(pc)-1, -1, -1):\n for k in range(pc[i][0]):\n p += (i+1) * 100\n tmp += 1\n if p >= G:\n return tmp\n\n\nD, G = map(int,input().split())\npc = [list(map(int,input().split())) for i in range(D)]\ncnt =...
['Runtime Error', 'Accepted']
['s622421210', 's251067883']
[3064.0, 3064.0]
[2104.0, 18.0]
[491, 556]
p03290
u821775079
2,000
1,048,576
A programming competition site _AtCode_ provides algorithmic problems. Each problem is allocated a score based on its difficulty. Currently, for each integer i between 1 and D (inclusive), there are p_i problems with a score of 100i points. These p_1 + … + p_D problems are all of the problems available on AtCode. A us...
['d,g=[int(_) for _ in input().split()]\nl=[0]+[list(map(int,input().split())) for _ in range(d)]\nprint(l)\ndef f(i,g):\n\tif i==0:return 10**9\n\tc=min(g//(100*i),l[i][0])\n\ts=100*i*c\n\tif c==l[i][0]:s+=l[i][1]\n\tif s<g:\n\t\tc+=f(i-1,g-s)\n\treturn min(c,f(i-1,g))\nprint(f(d,g))', 'import sys\nsys.setrecursionli...
['Wrong Answer', 'Accepted']
['s146452226', 's445348915']
[9232.0, 9900.0]
[33.0, 39.0]
[265, 653]
p03290
u840974625
2,000
1,048,576
A programming competition site _AtCode_ provides algorithmic problems. Each problem is allocated a score based on its difficulty. Currently, for each integer i between 1 and D (inclusive), there are p_i problems with a score of 100i points. These p_1 + … + p_D problems are all of the problems available on AtCode. A us...
['n, g = map(int, input().split())\nList = [list(map(int, input().split())) for i in range(n)]\n\nans = 0\na = 0\nres = 0\n\nmax_score = [(i+1)*100*List[i][0]+List[i][1] for i in range(n-1, -1, -1)] \nscore = [(i+1)*100 for i in range(n-1, -1, -1)] \nhowmany = [List[i][0] for i in range(n-1, -1, -1)]\n\nwhile(ans + max...
['Runtime Error', 'Wrong Answer', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted']
['s041236156', 's341183557', 's551409536', 's850947293', 's910866770', 's414619385']
[3064.0, 3188.0, 3064.0, 3064.0, 3064.0, 3064.0]
[17.0, 22.0, 17.0, 17.0, 17.0, 21.0]
[627, 982, 732, 503, 504, 946]
p03290
u841531687
2,000
1,048,576
A programming competition site _AtCode_ provides algorithmic problems. Each problem is allocated a score based on its difficulty. Currently, for each integer i between 1 and D (inclusive), there are p_i problems with a score of 100i points. These p_1 + … + p_D problems are all of the problems available on AtCode. A us...
['D,G = map(int,input().split())\nl = list(list(map(int, input().split())) for _ in range(D))\n\n\nl = l[::-1]\n\nans = float("inf")\nfor i in range(2**D):\n total = 0\n cnt = 0\n for j in range(D):\n \n if (i>>j)&1:\n total += 100*(D-j)*l[j][0] + l[j][1]\n cnt += l[j][0]\n if ...
['Runtime Error', 'Accepted']
['s440218843', 's421325854']
[2940.0, 3064.0]
[17.0, 156.0]
[678, 676]
p03290
u842243706
2,000
1,048,576
A programming competition site _AtCode_ provides algorithmic problems. Each problem is allocated a score based on its difficulty. Currently, for each integer i between 1 and D (inclusive), there are p_i problems with a score of 100i points. These p_1 + … + p_D problems are all of the problems available on AtCode. A us...
["def main():\n\tD,G = map(int,input().split())\n\tListPC = [list(map(int,input().split())) for d in range(D)]\n\tans = sum([i[0] for i in ListPC])\n\n\tfor i in range(2**D):\n\t\tTempPoint,num,restmax = 0,0,-1 \n\t\tfor j in range(D): \n\t\t\tif i>>j & 1:\n\t\t\t\tTempPoint += 100*(j+1)*ListPC[j][0]+ListPC[j][1]\n\t...
['Wrong Answer', 'Accepted']
['s573683606', 's004340759']
[9228.0, 9100.0]
[31.0, 32.0]
[722, 729]
p03290
u842964692
2,000
1,048,576
A programming competition site _AtCode_ provides algorithmic problems. Each problem is allocated a score based on its difficulty. Currently, for each integer i between 1 and D (inclusive), there are p_i problems with a score of 100i points. These p_1 + … + p_D problems are all of the problems available on AtCode. A us...
['from itertools import product\n\nD,G=map(int,input().split())\np,c=[],[]\n\nfor _ in range(D):\n pi,ci=map(int,input().split())\n p.append(pi)\n c.append(ci)\n \nans=10**4\n \nfor cpls in product(range(2),repeat=D):\n num=0\n tensu=0\n for i,v in enumerate(cpls,start=1):\n if v==1:\n tensu+=i*100*p[i-...
['Wrong Answer', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted']
['s015910715', 's069511514', 's175533730', 's824225889', 's906041278']
[3064.0, 2940.0, 2940.0, 3064.0, 3064.0]
[40.0, 17.0, 17.0, 17.0, 139.0]
[636, 636, 635, 637, 629]
p03290
u844005364
2,000
1,048,576
A programming competition site _AtCode_ provides algorithmic problems. Each problem is allocated a score based on its difficulty. Currently, for each integer i between 1 and D (inclusive), there are p_i problems with a score of 100i points. These p_1 + … + p_D problems are all of the problems available on AtCode. A us...
['difficulties, goal = map(int, input().split())\n\npcs = [list(map(int, input().split())) for _ in range(difficulties)]\n\ntotal_problem = 0\nnew_dp = [0] * 1001\n\nfor d, pc in enumerate(pcs, 1):\n dp = new_dp\n\n problem, complete = pc\n total_problem += problem\n\n score = {x: x*100*d for x in range(pro...
['Runtime Error', 'Accepted']
['s451200061', 's738223701']
[3064.0, 3064.0]
[19.0, 443.0]
[663, 661]
p03290
u844789719
2,000
1,048,576
A programming competition site _AtCode_ provides algorithmic problems. Each problem is allocated a score based on its difficulty. Currently, for each integer i between 1 and D (inclusive), there are p_i problems with a score of 100i points. These p_1 + … + p_D problems are all of the problems available on AtCode. A us...
['import itertools\nD, G = [int(_) for _ in input().split()]\nSPC = [[100 * (i + 1)] + [int(_) for _ in input().split()] for i in range(D)]\nans = 10000\nfor flags in itertools.product([0, 1], repeat = D):\n print(flags)\n score = G\n count = 0\n for i in range(D):\n if flags[i]:\n score -...
['Wrong Answer', 'Accepted']
['s869022368', 's753066747']
[3188.0, 9132.0]
[30.0, 35.0]
[714, 762]
p03290
u853952087
2,000
1,048,576
A programming competition site _AtCode_ provides algorithmic problems. Each problem is allocated a score based on its difficulty. Currently, for each integer i between 1 and D (inclusive), there are p_i problems with a score of 100i points. These p_1 + … + p_D problems are all of the problems available on AtCode. A us...
['D, G=list(map(int, input().split()))\n\nL=[0]+[list(map(int, input().split())) for i in range(D)]\n\ndef f(G, i):\n l=[]\n a=1000\n if i==0:\n return 1000\n else:\n j=min(G//(i*100), L[i][0])\n g=G-j*i*100 \n if j==L[i][0] and g-L[i][1]>0:\n a=min(a,f(g-L[...
['Wrong Answer', 'Accepted']
['s768771444', 's643973373']
[3064.0, 3064.0]
[17.0, 18.0]
[655, 740]
p03290
u856364553
2,000
1,048,576
A programming competition site _AtCode_ provides algorithmic problems. Each problem is allocated a score based on its difficulty. Currently, for each integer i between 1 and D (inclusive), there are p_i problems with a score of 100i points. These p_1 + … + p_D problems are all of the problems available on AtCode. A us...
['D, G = [int(i) for i in input().split()]\n\np = []\nc = []\nfor i in range(D):\n tmp = [int(i) for i in input().split()]\n p.append(int(tmp[0]))\n c.append(int(tmp[1]))\n\ndef AccuracyQestionNum(acc_list, count):\n counter = count\n for i in range(len(acc_list)):\n if acc_list[i] == 1:\n ...
['Wrong Answer', 'Accepted']
['s814408112', 's313234191']
[3188.0, 3188.0]
[35.0, 34.0]
[3199, 3168]
p03290
u859897687
2,000
1,048,576
A programming competition site _AtCode_ provides algorithmic problems. Each problem is allocated a score based on its difficulty. Currently, for each integer i between 1 and D (inclusive), there are p_i problems with a score of 100i points. These p_1 + … + p_D problems are all of the problems available on AtCode. A us...
['d,g=map(int,input().split())\ng//=100\nl=[]\nans=1000\nfor i in range(d):\n p,c=map(int,input().split())\n l+=[[p,c,i*p,i*p+c]]\n#dp[c][i]\ndp=[[0for i in range(d)]for i in range(2**d-1)]\nfor i in range(2**d-1):\n a=0\n b,c=i,0\n d=0\n while b:\n if b%2>0:\n dp[i]+=l[c][3]\n d+=l[i][0]\n else:\...
['Runtime Error', 'Accepted']
['s136014700', 's602551692']
[3188.0, 3064.0]
[19.0, 22.0]
[417, 439]
p03290
u859987056
2,000
1,048,576
A programming competition site _AtCode_ provides algorithmic problems. Each problem is allocated a score based on its difficulty. Currently, for each integer i between 1 and D (inclusive), there are p_i problems with a score of 100i points. These p_1 + … + p_D problems are all of the problems available on AtCode. A us...
['rom math import ceil\n\nD, G = map(int,input().split())\npc = [list(map(int,input().split())) for i in range(D)]\n\nans = float("inf")\nfor bit in range(1 << D):\n cnt = 0\n sum = 0\n remain = set(range(1,D+1))\n\n for i in range(D):\n if bit & (1 << i):\n cnt += pc[i][0]\n su...
['Runtime Error', 'Accepted']
['s829007565', 's844351215']
[8936.0, 9108.0]
[28.0, 36.0]
[797, 670]
p03290
u861141787
2,000
1,048,576
A programming competition site _AtCode_ provides algorithmic problems. Each problem is allocated a score based on its difficulty. Currently, for each integer i between 1 and D (inclusive), there are p_i problems with a score of 100i points. These p_1 + … + p_D problems are all of the problems available on AtCode. A us...
['d, g = map(int, input().split())\n\npc = []\nfor i in range(d):\n p, c = map(int, input().split())\n pc.append([(i+1)*100, p, c])\n \npc.reverse()\nans = 0\nfor i in range(d):\n #print(g, pc[i])\n s = pc[i][0] * pc[i][1] + pc[i][2]\n if g > s:\n ans += pc[i][1]\n g -= s\n else:\n ...
['Wrong Answer', 'Accepted']
['s380413206', 's916072275']
[3064.0, 3064.0]
[18.0, 24.0]
[551, 561]
p03290
u861223045
2,000
1,048,576
A programming competition site _AtCode_ provides algorithmic problems. Each problem is allocated a score based on its difficulty. Currently, for each integer i between 1 and D (inclusive), there are p_i problems with a score of 100i points. These p_1 + … + p_D problems are all of the problems available on AtCode. A us...
['N = input().split()\nN = [int(i) for i in N]\npi = [0 for i in range(N[0])]\nci = [0 for i in range(N[0])]\nfor i in range(N[0]):\n buf = input().split()\n pi[i] = int(buf[0])\n ci[i] = int(buf[1])\n\nnum_min = 10*100\nG_new = N[1]\n\nflag= [0 for i in range(N[0])]\nfor i in range(0, pow(2, N[0])):\n G_ne...
['Runtime Error', 'Accepted']
['s221334395', 's403941158']
[3064.0, 3444.0]
[18.0, 26.0]
[1140, 1146]
p03290
u868982936
2,000
1,048,576
A programming competition site _AtCode_ provides algorithmic problems. Each problem is allocated a score based on its difficulty. Currently, for each integer i between 1 and D (inclusive), there are p_i problems with a score of 100i points. These p_1 + … + p_D problems are all of the problems available on AtCode. A us...
['from itertools import product\nD, G = map(int, input().split())\nP, C = zip(*[map(int, input().split()) for _ in range(D)])\nINF = 10**18\nans = INF\nfor bit in product((0, 1), repeat=D):\n p = list(P)\n cnt = 0\n score = 0\n for i in range(D):\n if bit[i]:\n score += C[i]\n s...
['Runtime Error', 'Accepted']
['s126943323', 's115623096']
[3064.0, 3064.0]
[17.0, 34.0]
[649, 645]
p03290
u876438858
2,000
1,048,576
A programming competition site _AtCode_ provides algorithmic problems. Each problem is allocated a score based on its difficulty. Currently, for each integer i between 1 and D (inclusive), there are p_i problems with a score of 100i points. These p_1 + … + p_D problems are all of the problems available on AtCode. A us...
['import sys\nimport numpy as np\n\ninput = sys.stdin.readline\nsys.setrecursionlimit(10 ** 6)\n\n\ndef I():\n return int(input())\n\n\ndef MI():\n return map(int, input().split())\n\n\ndef LI():\n return list(MI())\n\n\ndef LIN(n: int):\n return [I() for _ in range(n)]\n\n\ninf = float("inf")\nmod = 10 ** ...
['Runtime Error', 'Accepted']
['s773096431', 's926850692']
[12448.0, 3064.0]
[149.0, 21.0]
[1142, 873]
p03290
u879870653
2,000
1,048,576
A programming competition site _AtCode_ provides algorithmic problems. Each problem is allocated a score based on its difficulty. Currently, for each integer i between 1 and D (inclusive), there are p_i problems with a score of 100i points. These p_1 + … + p_D problems are all of the problems available on AtCode. A us...
['D,G = map(int,input().split())\nP = [0]*D\nC = [0]*D\nfor i in range(D) :\n P[i], C[i] = map(int,input().split())\n\nans = float("inf")\nfor bit in range(1 << D) :\n A = []\n score = 0\n solved = 0\n for k in range(D) :\n if bit & (1 << k) :\n A.append(k)\n score += 100*(k+...
['Wrong Answer', 'Accepted']
['s522212834', 's656722912']
[3188.0, 3064.0]
[30.0, 27.0]
[758, 947]
p03290
u880128069
2,000
1,048,576
A programming competition site _AtCode_ provides algorithmic problems. Each problem is allocated a score based on its difficulty. Currently, for each integer i between 1 and D (inclusive), there are p_i problems with a score of 100i points. These p_1 + … + p_D problems are all of the problems available on AtCode. A us...
['\n\nd, g = map(int, input().split())\n\nfor i in range(d):\n pc.append(list(map(int,input().split())))\n\nans = float("inf")\n\n\n\nfor i in range(2**d):\n count = 0 \n sum = 0\n nokori = set(range(1, d + 1)) \n\n for j in range(d):\n if (i>>j)&1:\n sum += pc[j][0] * (j + 1) * 100 + pc[...
['Runtime Error', 'Accepted']
['s607996143', 's691831178']
[3064.0, 3064.0]
[17.0, 25.0]
[1092, 1109]
p03290
u883792993
2,000
1,048,576
A programming competition site _AtCode_ provides algorithmic problems. Each problem is allocated a score based on its difficulty. Currently, for each integer i between 1 and D (inclusive), there are p_i problems with a score of 100i points. These p_1 + … + p_D problems are all of the problems available on AtCode. A us...
['D,G = list(map(int,input().split()))\nL=[]\nfor i in range(D):\n L.append(list(map(int,input().split())))\nfor i in range(D):\n L[i].append(L[i][0]*(i+1)*100)\n L[i].append(L[i][2]+L[i][1])\nprint(L)\nanswer = 10**4\nfor bits in range(1<<D):\n point_sum = 0\n n = 0\n j = -1\n for i in range(D):\n...
['Wrong Answer', 'Accepted']
['s772898355', 's519383579']
[3064.0, 3064.0]
[22.0, 22.0]
[668, 659]
p03290
u884323674
2,000
1,048,576
A programming competition site _AtCode_ provides algorithmic problems. Each problem is allocated a score based on its difficulty. Currently, for each integer i between 1 and D (inclusive), there are p_i problems with a score of 100i points. These p_1 + … + p_D problems are all of the problems available on AtCode. A us...
['def rec(i, g, count, rem):\n global ans\n if i == 0:\n print(g, count, rem)\n \n if g < G:\n \n use = max(rem)\n c = min(pc[use-1][0], -(-(G-g) // (use*100)))\n count += c\n g += use*100 * c\n \n \n if g >= ...
['Wrong Answer', 'Accepted']
['s264324122', 's017931860']
[3188.0, 3064.0]
[23.0, 19.0]
[873, 844]
p03290
u886240168
2,000
1,048,576
A programming competition site _AtCode_ provides algorithmic problems. Each problem is allocated a score based on its difficulty. Currently, for each integer i between 1 and D (inclusive), there are p_i problems with a score of 100i points. These p_1 + … + p_D problems are all of the problems available on AtCode. A us...
['# -*- coding: utf-8 -*-\n\nd, g = map(int, input().split())\n\np = [0] * d\nc = [0] * d\n\nfor i in range(d):\n p[i], c[i] = map(int, input().split())\n\nans = 100000\n\nsum = 0\nk = 0\n\nfor i in range(2 ** d):\n cnt = 0\n sum = 0\n\n\n for j in range(d):\n\n if (i >> j) & 1:\n sum += 1...
['Wrong Answer', 'Accepted']
['s780826862', 's226376062']
[3340.0, 3064.0]
[26.0, 22.0]
[846, 580]
p03290
u888337853
2,000
1,048,576
A programming competition site _AtCode_ provides algorithmic problems. Each problem is allocated a score based on its difficulty. Currently, for each integer i between 1 and D (inclusive), there are p_i problems with a score of 100i points. These p_1 + … + p_D problems are all of the problems available on AtCode. A us...
['import math\nimport copy\nimport sys\nimport fractions\nimport numpy as np\nfrom functools import reduce\n\n# ===FUNCTION===\n\ndef getInputInt():\n inputNum = int(input())\n return inputNum\n\ndef getInputListInt():\n outputoData = []\n inputData = input().split()\n outputData = [int(n) for n in input...
['Wrong Answer', 'Accepted']
['s040948032', 's151426558']
[13684.0, 13880.0]
[155.0, 160.0]
[1541, 1418]
p03290
u891635666
2,000
1,048,576
A programming competition site _AtCode_ provides algorithmic problems. Each problem is allocated a score based on its difficulty. Currently, for each integer i between 1 and D (inclusive), there are p_i problems with a score of 100i points. These p_1 + … + p_D problems are all of the problems available on AtCode. A us...
["import math\n\nd, g = map(int, input().split())\nls = [[100 * (i + 1)] + list(map(int,\n input().split())) for i in range(d)][::-1]\nl0 = [a * p + c for a, p, c in ls]\n\nres = float('inf')\nfor index in range(2**d):\n cs = '{:0{d}b}'.format(int(cs))\n count = 0\n s = 0\n f...
['Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted']
['s093791227', 's213545061', 's638735235', 's612857025']
[3064.0, 3188.0, 3188.0, 3064.0]
[19.0, 17.0, 18.0, 23.0]
[701, 731, 729, 729]
p03290
u903948194
2,000
1,048,576
A programming competition site _AtCode_ provides algorithmic problems. Each problem is allocated a score based on its difficulty. Currently, for each integer i between 1 and D (inclusive), there are p_i problems with a score of 100i points. These p_1 + … + p_D problems are all of the problems available on AtCode. A us...
['import sys\n\nD, G = [int(n) for n in input().split()]\n\nscore_table = []\nfor i in range(1, D+1):\n p, c = [int(n) for n in input().split()]\n score_table.append([i*100, p, c])\n\nscore_table = sorted(score_table, key=lambda x:x[0], reverse=True)\n\nscore = 0\ncount = 0\nfor s, p, c in score_table:\n for i...
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s372497371', 's869555715', 's512461322']
[9176.0, 9180.0, 9104.0]
[27.0, 29.0, 49.0]
[474, 474, 1134]
p03290
u904943473
2,000
1,048,576
A programming competition site _AtCode_ provides algorithmic problems. Each problem is allocated a score based on its difficulty. Currently, for each integer i between 1 and D (inclusive), there are p_i problems with a score of 100i points. These p_1 + … + p_D problems are all of the problems available on AtCode. A us...
['D, G = map(int, input().split())\n\nlst = [list(map(int, input().split())) for i in range(D)]\n\nans = 0\ncnt = 0\nflag = False\nfor i in range(D):\n for j in range(lst[-i-1][0]):\n ans += (D - i) * 100\n if (j == lst[-i-1][0] - 1):\n ans += lst[-i-1][1]\n print(ans)\n cnt += 1\n if (ans >= G):\n...
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s693883706', 's729722993', 's842638878']
[3188.0, 3064.0, 3064.0]
[18.0, 18.0, 150.0]
[364, 349, 586]
p03290
u909991537
2,000
1,048,576
A programming competition site _AtCode_ provides algorithmic problems. Each problem is allocated a score based on its difficulty. Currently, for each integer i between 1 and D (inclusive), there are p_i problems with a score of 100i points. These p_1 + … + p_D problems are all of the problems available on AtCode. A us...
['D, G = (int(i) for i in input().split()) \nPC = [[int(i) for i in input().split()] for i in range(D)] \n\nmax_atmpt = G // (D * 100)\ntotal = 0\nans = 0\ncount = 0\npc_gain_sorted = []\nidx_list = []\nfor i, (p, c) in enumerate(PC):\n pc_gain_sorted.append((p * (i + 1) * 100 + c, i + 1, p))\npc_gain_sorted.reverse(...
['Runtime Error', 'Accepted']
['s783375892', 's837148832']
[3064.0, 3064.0]
[17.0, 698.0]
[673, 589]
p03290
u917558625
2,000
1,048,576
A programming competition site _AtCode_ provides algorithmic problems. Each problem is allocated a score based on its difficulty. Currently, for each integer i between 1 and D (inclusive), there are p_i problems with a score of 100i points. These p_1 + … + p_D problems are all of the problems available on AtCode. A us...
['D,G=map(int,input().split())\noe=[]\nfor i in range(D):\n p,c=map(int,input().split())\n oe.append([(c+p*100*(i+1))/p,p,c,i+1])\noe.sort(reverse=True)\nans=0\nco=0\nfor i in range(D):\n for j in range(oe[i][1]):\n co+=1\n ans+=100*oe[i][3]\n if j==oe[i][1]-1:\n ans+=oe[i][2]\n if G<=ans:\n pr...
['Wrong Answer', 'Accepted']
['s492615790', 's434558944']
[9144.0, 9252.0]
[32.0, 278.0]
[323, 562]
p03290
u920299620
2,000
1,048,576
A programming competition site _AtCode_ provides algorithmic problems. Each problem is allocated a score based on its difficulty. Currently, for each integer i between 1 and D (inclusive), there are p_i problems with a score of 100i points. These p_1 + … + p_D problems are all of the problems available on AtCode. A us...
['D,G=map(int,input().split())\np=[0]*D\nc=[0]*D\n_max=[0]*D\nfor i in range(D):\n p[i],c[i]=map(int,input().split())\n\n\nkosupa={}\nfor i in range(D):\n kosupa[i]=100*(i+1) + c[i]/p[i]\n\nsorted_kosupa=sorted(kosupa.items(),key=lambda x:x[1])\n\nresult=[]\nsousa=[]\nwhile(1):\n tmp=sorted_kosupa.pop()\n m...
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s500416942', 's795344155', 's502044962']
[3064.0, 3064.0, 3064.0]
[17.0, 19.0, 24.0]
[769, 768, 497]
p03290
u921773161
2,000
1,048,576
A programming competition site _AtCode_ provides algorithmic problems. Each problem is allocated a score based on its difficulty. Currently, for each integer i between 1 and D (inclusive), there are p_i problems with a score of 100i points. These p_1 + … + p_D problems are all of the problems available on AtCode. A us...
['#%%\nimport itertools\nimport math\n\nD, G = map(int, input().split())\np = [0] * D\nc = [0] * D\ncom = [0] * D\nfor i in range(D):\n p[i], c[i] = map(int, input().split())\n com[i] = [100 * (i+1) * p[i] + c[i], p[i]]\n\nl = list(itertools.product(range(2), repeat=D))\nscore_list = []\nfor i in range(len(l)):\n...
['Wrong Answer', 'Accepted']
['s310080987', 's513133338']
[3444.0, 20888.0]
[23.0, 118.0]
[1207, 902]
p03290
u922449550
2,000
1,048,576
A programming competition site _AtCode_ provides algorithmic problems. Each problem is allocated a score based on its difficulty. Currently, for each integer i between 1 and D (inclusive), there are p_i problems with a score of 100i points. These p_1 + … + p_D problems are all of the problems available on AtCode. A us...
['\nD, G = map(int, input().split())\nG //= 100\npc = []\nfor d in range(D):\n p, c = map(int, input().split())\n pc.append([p, c//100])\n\n\nans = 10 ** 4\n\nfor i in range(2**D):\n points = 0\n num = 0\n idx = -1\n for d in range(D):\n \n if i>>d & 1:\n points += pc[d][0]*(d+1) + pc[d][1]\n num ...
['Wrong Answer', 'Accepted']
['s038143048', 's027435826']
[3188.0, 3064.0]
[23.0, 22.0]
[845, 809]
p03290
u932864155
2,000
1,048,576
A programming competition site _AtCode_ provides algorithmic problems. Each problem is allocated a score based on its difficulty. Currently, for each integer i between 1 and D (inclusive), there are p_i problems with a score of 100i points. These p_1 + … + p_D problems are all of the problems available on AtCode. A us...
['D,G = map(int,input().split())\np = [0]*int(D)\nc = [0]*int(D)\nfor i in range(D):\n p[i],c[i] = map(int,input().split())\ntotal = 0\nfor i in range(D):\n total += p[i] * (i+1) * 100 + c[i]\nans = sum(p)\nj = 0\npi = p[j]\nwhile total>=G:\n if pi==0 and j<(D-1):\n j += 1\n pi = p[j]\n if pi==p[j]:\n tota...
['Wrong Answer', 'Accepted']
['s202600291', 's098642995']
[3188.0, 3064.0]
[19.0, 22.0]
[366, 476]
p03290
u933622697
2,000
1,048,576
A programming competition site _AtCode_ provides algorithmic problems. Each problem is allocated a score based on its difficulty. Currently, for each integer i between 1 and D (inclusive), there are p_i problems with a score of 100i points. These p_1 + … + p_D problems are all of the problems available on AtCode. A us...
['import sys\n\nsys_input = sys.stdin.readline\n\nD, G = map(int, sys_input().split())\npc_list = [tuple(map(int, sys_input().split())) for _ in range(D)]\n\n# WIP\ntemp_min_score = 10000000000000000\ncombi_min = []\nn_solved = 10000000000\nfor i in range(1 << D):\n score_per_combi = 0\n combi = []\n tmp_n_sol...
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s343640877', 's932648575', 's935254210']
[3064.0, 3064.0, 3064.0]
[22.0, 174.0, 26.0]
[1282, 1487, 2203]
p03290
u934868410
2,000
1,048,576
A programming competition site _AtCode_ provides algorithmic problems. Each problem is allocated a score based on its difficulty. Currently, for each integer i between 1 and D (inclusive), there are p_i problems with a score of 100i points. These p_1 + … + p_D problems are all of the problems available on AtCode. A us...
['d, g = map(int, input().split())\np = []\nc = []\nsu = []\nans = 1000\nfor i in range(d):\n a,b = map(int, input().split())\n p.append(a)\n c.append(b)\n su.append(a*100*(i+1)+b)\nbit = [1,2,4,8,16,32,64,128,256,512]\nfor i in range(1024):\n count = 0\n for j in range(d):\n if i & bit[j] == 0:\n continu...
['Runtime Error', 'Runtime Error', 'Accepted']
['s177296811', 's679996340', 's098866702']
[3064.0, 3064.0, 3064.0]
[17.0, 18.0, 24.0]
[585, 597, 636]
p03290
u940652437
2,000
1,048,576
A programming competition site _AtCode_ provides algorithmic problems. Each problem is allocated a score based on its difficulty. Currently, for each integer i between 1 and D (inclusive), there are p_i problems with a score of 100i points. These p_1 + … + p_D problems are all of the problems available on AtCode. A us...
['D,G=map(int,input().split())\npc=[list(map(int,input().split())) for i in range(D)]\nprint(pc)\nans=G // 100\n\nfor i in range(2**D):\n score=0\n b=0\n cnt=0\n for j in range(D):\n if ((i>>j)&1):\n score+=100*(j+1)*pc[j][0]+pc[j][1]\n cnt+=pc[j][0]\n else:\n ...
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s236787695', 's272357562', 's016234210']
[9252.0, 9180.0, 9212.0]
[83.0, 59.0, 55.0]
[460, 442, 431]
p03290
u945181840
2,000
1,048,576
A programming competition site _AtCode_ provides algorithmic problems. Each problem is allocated a score based on its difficulty. Currently, for each integer i between 1 and D (inclusive), there are p_i problems with a score of 100i points. These p_1 + … + p_D problems are all of the problems available on AtCode. A us...
['import itertools\nD, G = map(int, input().split())\nscore_list = []\nfor i in range(D):\n p, c = map(int, input().split())\n score_list.append([(i + 1) * 100] * (p - 1) + [c + (i + 1) * 100])\nfull_score = [sum(i) for i in score_list]\nper = list(itertools.permutations(range(D)))\nans = 10000\nprint(score_list)...
['Wrong Answer', 'Accepted']
['s671366005', 's601104160']
[500292.0, 3064.0]
[2136.0, 48.0]
[826, 786]
p03290
u955125992
2,000
1,048,576
A programming competition site _AtCode_ provides algorithmic problems. Each problem is allocated a score based on its difficulty. Currently, for each integer i between 1 and D (inclusive), there are p_i problems with a score of 100i points. These p_1 + … + p_D problems are all of the problems available on AtCode. A us...
['def dfs(i, total, S, remain):\n global ans\n if i == D:\n if S < G:\n """\n If all the problems of the segment don\'t have to be calculated,\n it is preferable to solve some of the segment with the highest rate.\n """\n use = max(remain)\n N = m...
['Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted']
['s742281804', 's856037772', 's943182197', 's242679318']
[3064.0, 3064.0, 3064.0, 3064.0]
[18.0, 17.0, 17.0, 19.0]
[753, 749, 553, 559]
p03290
u961288441
2,000
1,048,576
A programming competition site _AtCode_ provides algorithmic problems. Each problem is allocated a score based on its difficulty. Currently, for each integer i between 1 and D (inclusive), there are p_i problems with a score of 100i points. These p_1 + … + p_D problems are all of the problems available on AtCode. A us...
['D, G = map(int, input().split())\nPC = [0]+[list(map(int,input().split())) for _ in range(D)]\n\ndef dfs(d, g):\n if(d == 0):\n return 1e9\n\n c = min(g//(100*d), PC[d][0])\n s = 100*d*c\n if c == PC[d][0]:\n s += PC[d][1]\n if s<g:\n c += f(d-1, g-s)\n return min(c, f(d-1,g))\n...
['Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted']
['s598775738', 's752638232', 's824072777', 's826319821', 's766243932']
[9212.0, 9132.0, 9192.0, 9120.0, 9216.0]
[22.0, 23.0, 28.0, 27.0, 32.0]
[321, 332, 325, 336, 325]
p03290
u961595602
2,000
1,048,576
A programming competition site _AtCode_ provides algorithmic problems. Each problem is allocated a score based on its difficulty. Currently, for each integer i between 1 and D (inclusive), there are p_i problems with a score of 100i points. These p_1 + … + p_D problems are all of the problems available on AtCode. A us...
['D, G = map(int, input().split())\n\nScore = []\nq_sum = 0\nfor i in range(D):\n p, c = map(int, input().split())\n q_sum += p\n Score.append([(i+1)*100, p, c])\n\ndef Calc(score, num):\n temp = list(filter(lambda x: x[1] < num+1, score))\n if temp == []:\n return score[-1][0] * num\n else:\n ...
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s082957063', 's170661351', 's045284523']
[3316.0, 3188.0, 3064.0]
[2104.0, 2104.0, 24.0]
[1026, 1025, 1166]
p03290
u970899068
2,000
1,048,576
A programming competition site _AtCode_ provides algorithmic problems. Each problem is allocated a score based on its difficulty. Currently, for each integer i between 1 and D (inclusive), there are p_i problems with a score of 100i points. These p_1 + … + p_D problems are all of the problems available on AtCode. A us...
["x = [list(map(int, input().split())) for i in range(d)]\nans2=float('inf')\n\nfor i in range(2**d):\n v=[0]*d\n ans=0\n ans1=0\n for j in range(d):\n if (i>>j)&1==1:\n ans+=(x[j][0]*100*(j+1))+x[j][1]\n ans1+=x[j][0]\n v[j]=1\n\n\n if ans<g:\n for k in ran...
['Runtime Error', 'Accepted']
['s160223058', 's197153549']
[3064.0, 3064.0]
[18.0, 25.0]
[578, 609]
p03290
u971124021
2,000
1,048,576
A programming competition site _AtCode_ provides algorithmic problems. Each problem is allocated a score based on its difficulty. Currently, for each integer i between 1 and D (inclusive), there are p_i problems with a score of 100i points. These p_1 + … + p_D problems are all of the problems available on AtCode. A us...
["from collections import deque\nimport itertools, math\nd,g = list(map(int,input().split()))\npc = [list(map(int,input().split())) for _ in range(d)]\ng /= 100\n\npat = deque([[] for _ in range(3)])\nfor i in sorted(range(d),reverse=True):\n if pc[i][0]*(i+1) >= g:\n pat[0].append(i)\n elif pc[i][0]*(i+1) + pc[i]...
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s202478422', 's999813981', 's777504699']
[3316.0, 3700.0, 3064.0]
[22.0, 30.0, 25.0]
[862, 650, 490]
p03290
u973840923
2,000
1,048,576
A programming competition site _AtCode_ provides algorithmic problems. Each problem is allocated a score based on its difficulty. Currently, for each integer i between 1 and D (inclusive), there are p_i problems with a score of 100i points. These p_1 + … + p_D problems are all of the problems available on AtCode. A us...
["from math import ceil\n\nD, G = [int(t) for t in input().split()]\np = []\nc = []\nfor i in range(D):\n p_, c_ = [int(t) for t in input().split()]\n p.append(p_)\n c.append(c_)\n\nprint(p,c)\n\ndef solve(G, i):\n \n if i <= 0:\n return float('inf')\n \n n = min(ceil(G / (100 * i)), p[i - 1...
['Wrong Answer', 'Accepted']
['s389625271', 's182146430']
[3064.0, 3064.0]
[19.0, 19.0]
[730, 364]
p03290
u983918956
2,000
1,048,576
A programming competition site _AtCode_ provides algorithmic problems. Each problem is allocated a score based on its difficulty. Currently, for each integer i between 1 and D (inclusive), there are p_i problems with a score of 100i points. These p_1 + … + p_D problems are all of the problems available on AtCode. A us...
['import math as m\nfrom fractions import gcd\nD,G = map(int,input().split())\ninfo = [list(map(int,input().split())) for i in range(D)]\ncm = 1\nfor p,c in info:\n cm *= p\nL = []\nfor i in range(1,D+1):\n p = info[i-1][0]\n c = info[i-1][1]\n L.append([cm*100*i + c, i, p, c])\ngoal = G\ncount = 0\n\nL.sor...
['Wrong Answer', 'Runtime Error', 'Wrong Answer', 'Accepted']
['s078050900', 's361645269', 's615391518', 's428400476']
[5304.0, 5600.0, 3700.0, 3064.0]
[40.0, 52.0, 24.0, 46.0]
[1337, 1399, 1240, 727]
p03290
u985929170
2,000
1,048,576
A programming competition site _AtCode_ provides algorithmic problems. Each problem is allocated a score based on its difficulty. Currently, for each integer i between 1 and D (inclusive), there are p_i problems with a score of 100i points. These p_1 + … + p_D problems are all of the problems available on AtCode. A us...
['D,G = map(int,input().split())\n\nli = [list(map(int,input().split())) for _ in range(D)]\n\n\nten = 0\nc = 0\nkei = 0\n\nfor i,k in enumerate(li[::-1]):\n for j in range(k[0]):\n ten += 100*(D-i)\n c+=1\n if j==k[0]-1:\n ten += k[1]\n if ten>=G:\n kei = c\n ...
['Wrong Answer', 'Accepted']
['s118114905', 's826398748']
[9244.0, 9180.0]
[31.0, 106.0]
[670, 688]
p03290
u985949234
2,000
1,048,576
A programming competition site _AtCode_ provides algorithmic problems. Each problem is allocated a score based on its difficulty. Currently, for each integer i between 1 and D (inclusive), there are p_i problems with a score of 100i points. These p_1 + … + p_D problems are all of the problems available on AtCode. A us...
["D, G = map(int, input().split())\ngrid = [[0,0]]\nfor i in range(D):\n p,c = map(int, input().split())\n grid.append([p,c])\n\nimport itertools\nkumi = list(itertools.product([0,1], repeat=D))\nanls = []\nfans = float('inf')\nfor item in kumi:\n count = 0\n ans = 0\n k = 0\n score = 0\n for i in ...
['Runtime Error', 'Accepted']
['s808434979', 's532454791']
[3064.0, 3188.0]
[18.0, 22.0]
[818, 821]
p03290
u993435350
2,000
1,048,576
A programming competition site _AtCode_ provides algorithmic problems. Each problem is allocated a score based on its difficulty. Currently, for each integer i between 1 and D (inclusive), there are p_i problems with a score of 100i points. These p_1 + … + p_D problems are all of the problems available on AtCode. A us...
['D,G = map(int,input().split())\nPC = []\n\nL = []\n\nt = 10 ** 9\nm = 0\n\nfor i in range(1,D + 1):\n p,c = map(int,input().split())\n s = 0\n pc = []\n for j in range(p):\n s += i * 100\n if j == p - 1:\n s += c\n L.append([j + 1,s])\n if s >= G and j + 1 < t:\n t = j + 1\n pc.append([...
['Runtime Error', 'Accepted']
['s564133793', 's940191804']
[3064.0, 3064.0]
[18.0, 24.0]
[1395, 1337]
p03290
u994064513
2,000
1,048,576
A programming competition site _AtCode_ provides algorithmic problems. Each problem is allocated a score based on its difficulty. Currently, for each integer i between 1 and D (inclusive), there are p_i problems with a score of 100i points. These p_1 + … + p_D problems are all of the problems available on AtCode. A us...
['D, G = [int(s) for s in input().split()]\nproblems = [[int(s) for s in input().split()] for _ in range(D)]\n\nresult = 10 ** 8\n\nfor i in range(2 ** D):\n cnt_problem = 0\n cnt_score = 0\n for j in range(D):\n if i << j:\n cnt_score += problems[j][1] + 100 * (j + 1) * problems[j][0]\n ...
['Wrong Answer', 'Accepted']
['s154116506', 's183818440']
[3064.0, 3064.0]
[26.0, 173.0]
[669, 673]
p03291
u023229441
2,000
1,048,576
The _ABC number_ of a string T is the number of triples of integers (i, j, k) that satisfy all of the following conditions: * 1 ≤ i < j < k ≤ |T| (|T| is the length of T.) * T_i = `A` (T_i is the i-th character of T from the beginning.) * T_j = `B` * T_k = `C` For example, when T = `ABCBC`, there are three tr...
['\n# if n-r<r: r=n-r\n# if r == 0: return 1\n# if r == 1: return n\n# \n\n# denominator = [k + 1 for k in range(r)]\n# \n# for p in range(2,r+1):\n\n\n# offset = (n - r) % p\n# for k in range(p-1,r,p):\n# numerator[k - offset] /= pivot\n\n# \n# result = 1...
['Runtime Error', 'Accepted']
['s302562969', 's059012693']
[10380.0, 10360.0]
[2206.0, 463.0]
[1373, 1401]
p03291
u065079240
2,000
1,048,576
The _ABC number_ of a string T is the number of triples of integers (i, j, k) that satisfy all of the following conditions: * 1 ≤ i < j < k ≤ |T| (|T| is the length of T.) * T_i = `A` (T_i is the i-th character of T from the beginning.) * T_j = `B` * T_k = `C` For example, when T = `ABCBC`, there are three tr...
['S = input()\nN = len(S)\nmod = 10**9+7\nnumofA = 0\nnumofAB = 0\nnumofABC = 0\nnumofquestion = 0\nfor i in range(N):\n if S[i] == "?":\n numofABC = (numofABC*3+numofAB) % mod\n numofAB = (numofAB*3+numofA) % mod\n numofA = (numofA * 3 + 1) % mod\n numofquestion += 1\n elif S[i] == "C...
['Wrong Answer', 'Accepted']
['s561085030', 's061029378']
[3188.0, 3188.0]
[85.0, 96.0]
[486, 524]
p03291
u068400994
2,000
1,048,576
The _ABC number_ of a string T is the number of triples of integers (i, j, k) that satisfy all of the following conditions: * 1 ≤ i < j < k ≤ |T| (|T| is the length of T.) * T_i = `A` (T_i is the i-th character of T from the beginning.) * T_j = `B` * T_k = `C` For example, when T = `ABCBC`, there are three tr...
["# coding: utf-8\n# Your code here!\n\nMOD = 1000000007\nS = input()\n\ndef add(a,b):\n a += b\n if a >= MOD:\n a -= MOD\n return a\n\ndp = [[0 for i in range(5)] for j in range(2000000)]\n\ndp[0][0] = 1\n\nfor i in range(len(S)):\n for j in range(4):\n if S[i] == '?':\n dp[i+1][j]...
['Time Limit Exceeded', 'Accepted']
['s211812364', 's092144859']
[305288.0, 45688.0]
[2126.0, 744.0]
[670, 669]
p03291
u077337864
2,000
1,048,576
The _ABC number_ of a string T is the number of triples of integers (i, j, k) that satisfy all of the following conditions: * 1 ≤ i < j < k ≤ |T| (|T| is the length of T.) * T_i = `A` (T_i is the i-th character of T from the beginning.) * T_j = `B` * T_k = `C` For example, when T = `ABCBC`, there are three tr...
['def get_input(inp):\n li = inp.split("\\n")\n\n def inner():\n return li.pop(0)\n return inner\n\nINPUT="""????C?????B??????A???????"""\ninput = get_input(INPUT)\n\ns = input().strip()\nMOD = pow(10, 9) + 7\n\n\n\n\ndp = [[0 for _ in range(len(s) + 1)] for _ in range(4)]\ndp[0][0] = 1\n\nfor i, _s in enumerate(...
['Wrong Answer', 'Accepted']
['s213323135', 's381831309']
[3192.0, 19168.0]
[18.0, 387.0]
[1212, 1052]
p03291
u089032001
2,000
1,048,576
The _ABC number_ of a string T is the number of triples of integers (i, j, k) that satisfy all of the following conditions: * 1 ≤ i < j < k ≤ |T| (|T| is the length of T.) * T_i = `A` (T_i is the i-th character of T from the beginning.) * T_j = `B` * T_k = `C` For example, when T = `ABCBC`, there are three tr...
['S = input()\n\nmax_S = 10**9 + 7\n\nN_Q = S.count("?")\nN_C = S.count("C")\n\nt_A = 0\nt_Q = 0\nif(S[0:1] == "C"):\n t_C = N_C - 1\nelse:\n t_C = N_C\n\nS_list = [{"bA": t_A, "bQ": t_Q, "aC": t_C, "aQ": N_Q - t_Q}]\nfor i in range(1, len(S)):\n if(S[i - 1:i] == "A"):\n t_A += 1\n elif(S[i - 1:i] ==...
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s580098166', 's860067430', 's810409925']
[40652.0, 41144.0, 3188.0]
[2106.0, 2106.0, 300.0]
[918, 916, 344]