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
p03289
u959981943
2,000
1,048,576
You are given a string S. Each character of S is uppercase or lowercase English letter. Determine if S satisfies all of the following conditions: * The initial character of S is an uppercase `A`. * There is exactly one occurrence of `C` between the third character from the beginning and the second to last characte...
["S = input()\n\nif S[0] == 'A' and S[2:-1].count('C') == 1 \\\n and S[1] != 'C' and S[-1] != 'C' and S.replace('C', '').islower():\n print('AC')\nelse:\n print('WA')\n", "S = input()\n\nif S[0] == 'A' and S[2:-1].count('C') == 1 and sum([c.isupper for c in S]) == 2:\n print('AC')\nelse:\n print('WA'...
['Wrong Answer', 'Runtime Error', 'Accepted']
['s098377186', 's483956942', 's662486808']
[2940.0, 2940.0, 2940.0]
[18.0, 19.0, 17.0]
[171, 132, 134]
p03289
u960171798
2,000
1,048,576
You are given a string S. Each character of S is uppercase or lowercase English letter. Determine if S satisfies all of the following conditions: * The initial character of S is an uppercase `A`. * There is exactly one occurrence of `C` between the third character from the beginning and the second to last characte...
['S = list(input())\ncnt = 0\n\narray = S[3:-1]\nif array.count("C")==1:\n array.remove("C")\n S = S[:3]+array+S[-1]\nelse:\n cnt += 1\n\nif S[0]=="A":\n del S[0]\nelse:\n cnt += 1\n\ns = "".join(S)\nif s.islower == False:\n cnt += 1\nprint("AC" if cnt==0 else "WA")\n', 'S = list(input("Enter :"))\nans = 0\nC_loc...
['Runtime Error', 'Runtime Error', 'Accepted']
['s511519007', 's669543898', 's776843650']
[3060.0, 3188.0, 3064.0]
[17.0, 18.0, 17.0]
[253, 246, 282]
p03289
u962197874
2,000
1,048,576
You are given a string S. Each character of S is uppercase or lowercase English letter. Determine if S satisfies all of the following conditions: * The initial character of S is an uppercase `A`. * There is exactly one occurrence of `C` between the third character from the beginning and the second to last characte...
["S = int(input())\nprint('AC' if S[0] == 'A' and S[2:-1].count('C') == 1 and S[1:].replace('C','').islower() else 'WA')\n ", "S = input()\nprint('AC' if S[0] == 'A' and S[2:-1].count('C') == 1 and S[1] != 'C' and S[1:].replace('C','').islower() else 'WA')"]
['Runtime Error', 'Accepted']
['s773550904', 's046418105']
[2940.0, 2940.0]
[20.0, 18.0]
[120, 128]
p03289
u969850098
2,000
1,048,576
You are given a string S. Each character of S is uppercase or lowercase English letter. Determine if S satisfies all of the following conditions: * The initial character of S is an uppercase `A`. * There is exactly one occurrence of `C` between the third character from the beginning and the second to last characte...
["S = input()\nif S[0] == 'A' and S[2:-1].count('C') == 1:\n S2 = S[1] + S[2:-1].replace('C', '')\n if S2 == S.lower():\n print('AC')\n exit()\nprint('WA')", "S = input()\nif S[0] == 'A' and S[2:-1].count('C') == 1:\n S = S[1] + S[2:-1].replace('C', '') + S[-1]\n if S == S.lower():\n pr...
['Wrong Answer', 'Accepted']
['s855399044', 's095565413']
[2940.0, 3060.0]
[17.0, 17.0]
[167, 173]
p03289
u970107703
2,000
1,048,576
You are given a string S. Each character of S is uppercase or lowercase English letter. Determine if S satisfies all of the following conditions: * The initial character of S is an uppercase `A`. * There is exactly one occurrence of `C` between the third character from the beginning and the second to last characte...
["import re\n\nS = input()\n\nif(S[0] == 'A'):\n regex = r'[a-z]*C[a-z]*[a-z]'\n ans = re.match(regex, S[3:len(S)])\n if(ans != None):\n if(ans.span() == (0, len(S[3:len(S)]))):\n print('AC')\n else:\n print('WA')\n else:\n print('WA')\n", "import re\n\nS = input()...
['Wrong Answer', 'Accepted']
['s067454615', 's373678557']
[3188.0, 3188.0]
[19.0, 19.0]
[276, 209]
p03289
u970899068
2,000
1,048,576
You are given a string S. Each character of S is uppercase or lowercase English letter. Determine if S satisfies all of the following conditions: * The initial character of S is an uppercase `A`. * There is exactly one occurrence of `C` between the third character from the beginning and the second to last characte...
["n=list(input())\ncount=0\nif n[0]=='A' and n[2:-1].count('C')==1:\n del n[0]\n n.remove('C')\n print(n)\n for i in range(len(n)):\n if n[i].islower()==1:\n count+=1\n if count==len(n):\n print('AC')\n else:\n print('WA')\n \nelse:\n print('WA')", "n=list(input()...
['Wrong Answer', 'Accepted']
['s584720800', 's213244132']
[3064.0, 3060.0]
[17.0, 17.0]
[285, 272]
p03289
u977389981
2,000
1,048,576
You are given a string S. Each character of S is uppercase or lowercase English letter. Determine if S satisfies all of the following conditions: * The initial character of S is an uppercase `A`. * There is exactly one occurrence of `C` between the third character from the beginning and the second to last characte...
["S = input()\nans = 'WA'\nif S[0] == 'A':\n if S[2 : -1].count('C') == 1:\n if S[0].replace('A', 'a') + S[2 : -1].replace('C', 'c') + S[-1] == S.lower():\n ans = 'AC'\nprint(ans)", "S = input()\nmid = S[2:-1]\nS_lower = S.lower()\nS_replace = S.replace('C', 'c')\nC_count = 0\n\nif S[0] == 'A':\n ...
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s022104946', 's207238004', 's772859383']
[3060.0, 3060.0, 3060.0]
[18.0, 18.0, 17.0]
[192, 316, 199]
p03289
u977642052
2,000
1,048,576
You are given a string S. Each character of S is uppercase or lowercase English letter. Determine if S satisfies all of the following conditions: * The initial character of S is an uppercase `A`. * There is exactly one occurrence of `C` between the third character from the beginning and the second to last characte...
["def main(S):\n if not S[0] == 'A':\n return 'WA'\n if not S[2] == 'C':\n return 'WA'\n\n count_c = 0\n count_c += S.count('C')\n count_c += S.count('c')\n\n if not count_c == 1:\n return 'WA'\n\n for s in S[1:]:\n if s == 'C':\n continue\n elif not s....
['Wrong Answer', 'Accepted']
['s514550448', 's596420298']
[2940.0, 3772.0]
[17.0, 24.0]
[411, 643]
p03289
u982594421
2,000
1,048,576
You are given a string S. Each character of S is uppercase or lowercase English letter. Determine if S satisfies all of the following conditions: * The initial character of S is an uppercase `A`. * There is exactly one occurrence of `C` between the third character from the beginning and the second to last characte...
["s = input().rstrip()\n \nans = 'WA'\nif s[0] == 'A' and s[2:len(s) - 1].count('C') == 1:\n i = s[2:len(s) - 1].find('C')\n if s[1:i+2].islower() and s[i + 2 + 1:].islower():\n ans = 'AC'\n", "s = input().rstrip()\n\nans = 'WA'\nif s[0] == 'A' and s[2:len(s) - 1].count('C') == 1:\n i = s[2:len(s) - 1].find('C'...
['Wrong Answer', 'Accepted']
['s614325449', 's042400790']
[2940.0, 3060.0]
[17.0, 17.0]
[186, 206]
p03289
u982762220
2,000
1,048,576
You are given a string S. Each character of S is uppercase or lowercase English letter. Determine if S satisfies all of the following conditions: * The initial character of S is an uppercase `A`. * There is exactly one occurrence of `C` between the third character from the beginning and the second to last characte...
["from collections import Counter\n\ndef is_lower_case(c):\n lower_case_alphabets = 'abcdefghijklmnopqrstuvwxyz'\n return c in lower_case_alphabets\n\nS = input()\ncnt = Counter(S[2:-1])\n\nflag = True\nif S[0] != 'A':\n flag = False\nif cnt['C'] != 1:\n flag = False\nfor c in S:\n if c != 'C' and not is_lower_cas...
['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted']
['s222460941', 's271433162', 's662427945', 's781948408']
[3316.0, 3444.0, 3316.0, 3316.0]
[21.0, 24.0, 21.0, 20.0]
[356, 356, 355, 360]
p03289
u990849962
2,000
1,048,576
You are given a string S. Each character of S is uppercase or lowercase English letter. Determine if S satisfies all of the following conditions: * The initial character of S is an uppercase `A`. * There is exactly one occurrence of `C` between the third character from the beginning and the second to last characte...
["S = input()\nm = re.match('^A[a-z]+C[a-z]+$', S)\nif m == None:\n print('WA')\nelse:\n print('AC')", "import re\n\nS = input()\nm = re.match('^A[a-z]+C[a-z]+$', S)\nif m == None:\n print('WA')\nelse:\n print('AC')"]
['Runtime Error', 'Accepted']
['s163405694', 's748779007']
[2940.0, 3188.0]
[17.0, 19.0]
[99, 110]
p03289
u991567869
2,000
1,048,576
You are given a string S. Each character of S is uppercase or lowercase English letter. Determine if S satisfies all of the following conditions: * The initial character of S is an uppercase `A`. * There is exactly one occurrence of `C` between the third character from the beginning and the second to last characte...
['s = input()\nl = len(s)\n\nif s[0] == "A":\n if s[2:l - 1].count("C") == 1:\n if s.count("A") == 1:\n s.replace("A", "a")\n s.replace("C", "c")\n if s.islower == True:\n print("AC")\n exit()\nprint("WA")', 's = input()\nl = len(s)\n\nif s[0] == ...
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s137263320', 's151235212', 's682808035']
[3060.0, 3060.0, 3068.0]
[18.0, 20.0, 18.0]
[265, 215, 230]
p03289
u993435350
2,000
1,048,576
You are given a string S. Each character of S is uppercase or lowercase English letter. Determine if S satisfies all of the following conditions: * The initial character of S is an uppercase `A`. * There is exactly one occurrence of `C` between the third character from the beginning and the second to last characte...
['S = input()\n\nans = "WA"\n\nif S[0] != "A":\n print(ans)\n \nelse:\n if S[2:len(S) - 1].count("C") != 1:\n print(ans)\n else:\n s = S.index("C")\n SS = S[1:s] + S[s + 1:]\n print(SS)\n if SS.islower() == False:\n print(ans)\n else:\n print("AC")\n ', 'S = input()\n\nans = "WA"\n\...
['Wrong Answer', 'Accepted']
['s491654067', 's527235844']
[3060.0, 2940.0]
[17.0, 17.0]
[268, 254]
p03289
u994064513
2,000
1,048,576
You are given a string S. Each character of S is uppercase or lowercase English letter. Determine if S satisfies all of the following conditions: * The initial character of S is an uppercase `A`. * There is exactly one occurrence of `C` between the third character from the beginning and the second to last characte...
["S = input()\nN = len(S)\n\ncond1 = True if S[0] == 'A' else False\ncond2 = True if S[3:-2].count('C') == 1 else False\ncond3 = True if sum(map(lambda x: x.islower(), S)) == N-2 else False\n\nprint('AC') if cond1 and cond2 and cond3 else print('WA')", "S = input()\nN = len(S)\n \ncond1 = True if S[0] == 'A' else False...
['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted']
['s146601600', 's373174136', 's441281853', 's423448561']
[3060.0, 3060.0, 3060.0, 3060.0]
[17.0, 18.0, 17.0, 18.0]
[241, 246, 243, 243]
p03289
u994521204
2,000
1,048,576
You are given a string S. Each character of S is uppercase or lowercase English letter. Determine if S satisfies all of the following conditions: * The initial character of S is an uppercase `A`. * There is exactly one occurrence of `C` between the third character from the beginning and the second to last characte...
["w=input()\nflag=0\nif w[0]=='A' and w[2]=='C'and w[1].lower()==w[1]:\n flag+=0\nelse:\n flag=1 \nif w[3:].lower()==w[:3]:\n flag+=0\nelse:flag=1\nif flag:print('WA')\nelse:print('AC')", "w=input()\nflag=0\nif w[0]=='A' and w.count('C')==1 and w.count('A')==1 and w[1].lower()==w[1] and w[-1].lower()==w[-1]...
['Wrong Answer', 'Accepted']
['s002864832', 's401217123']
[3060.0, 3188.0]
[19.0, 19.0]
[185, 293]
p03289
u994988729
2,000
1,048,576
You are given a string S. Each character of S is uppercase or lowercase English letter. Determine if S satisfies all of the following conditions: * The initial character of S is an uppercase `A`. * There is exactly one occurrence of `C` between the third character from the beginning and the second to last characte...
['s=list(input())\nprint(s[2:-1])\n\ndef check(S):\n if not S[0]=="A":\n return False\n if not S[2:-1].count("C")==1:\n return False\n NG=[0, S.index("C")]\n for i,s in enumerate(S):\n if i in NG:\n continue\n if s.isupper():\n return False\n return True\...
['Wrong Answer', 'Accepted']
['s083747848', 's701027498']
[2940.0, 2940.0]
[17.0, 17.0]
[347, 332]
p03289
u995062424
2,000
1,048,576
You are given a string S. Each character of S is uppercase or lowercase English letter. Determine if S satisfies all of the following conditions: * The initial character of S is an uppercase `A`. * There is exactly one occurrence of `C` between the third character from the beginning and the second to last characte...
['s = input()\n\nif(s[0] == "A" and s.count("A") == 1):\n if(s[2:len(s)-1].count("C") == 1 and s.count("C") == 1):\n s.strip("C")\n s.strip("A")\n if(s.islower()):\n print("AC")\n else:\n print("WA")\n else: \n print("WA")\nelse:\n print("WA")', 's = inp...
['Wrong Answer', 'Runtime Error', 'Accepted']
['s320829465', 's505246954', 's585295354']
[3060.0, 3060.0, 3060.0]
[18.0, 17.0, 17.0]
[294, 254, 314]
p03289
u995102075
2,000
1,048,576
You are given a string S. Each character of S is uppercase or lowercase English letter. Determine if S satisfies all of the following conditions: * The initial character of S is an uppercase `A`. * There is exactly one occurrence of `C` between the third character from the beginning and the second to last characte...
['S = input()\n\nans = "WA"\nif S[0] == "A":\n flag = "AC"\n S = S.replace("A", "a", 1)\n\ncount = 0\nfor i in range(2, len(S) - 1):\n if S[i] == "C":\n count += 1\n S = S.replace("C", "c", 1)\nif count != 1:\n ans = "WA"\n\nif not S.islower():\n ans = "WA"\n\nprint(ans)\n', 'S = input()\n\...
['Wrong Answer', 'Accepted']
['s464327907', 's514931909']
[3060.0, 3060.0]
[17.0, 17.0]
[281, 280]
p03289
u996564551
2,000
1,048,576
You are given a string S. Each character of S is uppercase or lowercase English letter. Determine if S satisfies all of the following conditions: * The initial character of S is an uppercase `A`. * There is exactly one occurrence of `C` between the third character from the beginning and the second to last characte...
["S = input()\nCS = S[2:-1]\nprint(CS)\nif S[0] == 'A':\n S = S.lstrip('A')\n if CS.count('C') == 1:\n S = S.replace('C', '')\n if S.islower() == True:\n print('AC')\n else:\n print('WA')\n else:\n print('WA')\nelse:\n print('WA')", "S = input()\nCS = S[2:-1]\nif S[0] == 'A':\n S = S.lstrip('...
['Wrong Answer', 'Accepted']
['s449608261', 's333417401']
[9036.0, 9024.0]
[30.0, 29.0]
[240, 230]
p03289
u999893056
2,000
1,048,576
You are given a string S. Each character of S is uppercase or lowercase English letter. Determine if S satisfies all of the following conditions: * The initial character of S is an uppercase `A`. * There is exactly one occurrence of `C` between the third character from the beginning and the second to last characte...
['import sys\n\ns = input()\nif s[0] == "A" and s.count("C") == 1 and "C" in s[2:-1]:\n ss = set(s)\n ss.remove("A")\n ss.remove("C")\n SS = [i.upper() for i in ss]\n if len(ss & SS) == 0:\n print("AC")\n sys.exit()\n\nprint("WA")', 's = input()\n\nprint("AC" if s[0] == "A" and "C" in s[2:-...
['Runtime Error', 'Accepted']
['s100925347', 's293147317']
[3060.0, 2940.0]
[17.0, 17.0]
[245, 107]
p03290
u002459665
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\n\nD, G = map(int, input().split())\nPC = []\nfor i in range(D):\n p, c = map(int, input().split())\n total = ((i + 1) * 100) * p + c\n PC.append([p, c, total])\n\nA = []\nB = {i for i in range(D)}\nfor i in range(D+1):\n A += list(combinations(B, i))\n\nprint(A)\n\nans ...
['Wrong Answer', 'Accepted']
['s035270968', 's748339595']
[3188.0, 3064.0]
[61.0, 44.0]
[792, 1100]
p03290
u013408661
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\nd,g=map(int,input().split())\nl=[[int(i) for i in l.split()] for l in sys.stdin]\ndef dfs(x,num,cost):\n if x==len(l):\n return 10**18\n num1+=l[x][0]*100*(x+1)+l[x][1]\n cost1+=l[x][0]\n cost3=dfs(x+1,num1,cost1)\n num2=num\n cost2=cost\n cost4=dfs(x+1,num2,cost2)\n for i in range(len(n),0,-1)...
['Wrong Answer', 'Accepted']
['s881713567', 's736142718']
[3064.0, 3188.0]
[18.0, 35.0]
[588, 1091]
p03290
u016881126
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\nreadline = sys.stdin.buffer.readline\nreadlines = sys.stdin.buffer.readlines\nread = sys.stdin.buffer.read\nsys.setrecursionlimit(10 ** 7)\n\nD, G = map(int, readline().split())\nproblems = []\nfor i in range(1, D+1):\n p, c = map(int, readline().split())\n score = 100 * i\n problems.append({\n ...
['Wrong Answer', 'Accepted']
['s023204873', 's755023612']
[3188.0, 3064.0]
[52.0, 49.0]
[1095, 1153]
p03290
u026155812
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\nimport math\n\nD, G = map(int, input().split())\np, c = [0]*D, [0]*D\nfor i in range(D):\n p[i], c[i] = map(int, input().split())\n\nls = []\nfor i in itertools.product([0, 1], repeat=D):\n sum = 0\n ans = 0\n for j, x in enumerate(i):\n if x == 1:\n sum += c[j] + (100*...
['Wrong Answer', 'Accepted']
['s679074140', 's145336511']
[3064.0, 3064.0]
[29.0, 29.0]
[765, 770]
p03290
u030527617
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...
['_lst = input().split()\nd = int(_lst[0])\ng = int(_lst[1])\n\npc = list()\n\nfor i in range(d):\n _lst = input().split()\n pc.append((int(_lst[0]), int(_lst[1])))\n\nscore = 0\nresult_count = 0\ntmp = 0\n\n\nfor i in range(2 ** d):\n count = 0\n score = 0\n\n \n for j in range(d):\n print(i >...
['Wrong Answer', 'Accepted']
['s763750904', 's102148307']
[3828.0, 3064.0]
[39.0, 25.0]
[1366, 1339]
p03290
u033606236
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())\nary = [list(map(int,input().split())) for _ in range(d)]\ns = set(i for i in range(d))\nans = float("Inf")\nfor i in range(2**d):\n a = []\n total,count = 0,0\n for j in range(d):\n if i >> j & 1:\n a.append(j)\n for x in a:\n total += 100*(x+1)*ary...
['Wrong Answer', 'Accepted']
['s800507589', 's738073203']
[3064.0, 3064.0]
[29.0, 29.0]
[675, 740]
p03290
u044964932
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 = map(int, input().split())\n pc = [list(map(int, input().split())) for _ in range(d)]\n\n n = len(pc)\n ans = float("inf")\n\n for i in range(2**n):\n point, cnt = 0, 0\n for j in range(n):\n if (i>>j) & 1:\n point += (j+1)*100*pc[j][0] + pc[j...
['Runtime Error', 'Accepted']
['s061199990', 's712575481']
[3064.0, 3188.0]
[18.0, 96.0]
[864, 864]
p03290
u057109575
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())\nX = [list(map(int, input().split())) for _ in range(D)]\n\ndef func(i, t):\n if i == 0 or i > D:\n return 10 ** 9\n \n # Solve all problems, or part of them\n k = min(t // (100 * i), X[i][0])\n s = 100 * i * k\n \n # If all problems are solved, add bonus\n...
['Runtime Error', 'Accepted']
['s689742192', 's454518935']
[3064.0, 3064.0]
[18.0, 18.0]
[628, 626]
p03290
u062459048
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)]\n\nl = []\nfor i in range(2 ** D):\n t = 0\n c = 0\n for j in range(D):\n if ((i >> j) & 1):\n t += (j+1)*100*PC[j][0]+PC[j][1]\n c += PC[j][0]\n if t >= G:\n l.append([c,int(i),t-G])\n \nct = 0\nl2 = []\n...
['Wrong Answer', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Wrong Answer', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted']
['s025367385', 's103657707', 's159197410', 's174102276', 's227841787', 's279295755', 's446608270', 's540928232', 's627384071', 's635984648', 's701382639', 's732372581', 's804850220', 's878314114', 's951268194', 's824449296']
[3188.0, 3064.0, 3064.0, 3192.0, 3064.0, 3188.0, 3064.0, 3064.0, 3064.0, 3188.0, 3064.0, 3064.0, 3192.0, 3064.0, 3064.0, 3064.0]
[22.0, 18.0, 17.0, 22.0, 18.0, 18.0, 18.0, 18.0, 17.0, 22.0, 17.0, 22.0, 18.0, 17.0, 21.0, 49.0]
[562, 447, 496, 511, 719, 677, 452, 708, 688, 522, 486, 516, 704, 523, 284, 577]
p03290
u094999522
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), *s = [list(map(int, i.split())) for i in open(0)]\ns = [[i[0] * -~n * 100 + i[1], i[0]] for n, i in enumerate(s)]\na = 10**9\nfor b in range(1 << d):\n su = sum(s[i] * (b >> i & 1) for i in range(d))\n n = sum(s[i][1] * (b >> i & 1) for i in range(d))\n if su <= g:\n m = d-bin(b)[2:].zfill(d)....
['Runtime Error', 'Accepted']
['s831197098', 's423592465']
[3064.0, 3064.0]
[17.0, 25.0]
[449, 452]
p03290
u100800700
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())\npc=[list(map(int,input()).split()) for i in range(d)]\ndef dfs(i,s,count,r):\n global ans\n if i==d:\n if s<g:\n e=max(r)\n n=min(pc[e-1][0],-(-(g-s)//(n*100)))\n count+=n\n s+=n*e*100\n if s>=g:\n ans=min(ans,c...
['Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted']
['s807895944', 's815643248', 's907183514', 's434969289']
[3064.0, 2940.0, 3064.0, 3064.0]
[18.0, 17.0, 18.0, 19.0]
[480, 461, 450, 834]
p03290
u101350975
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, nokori):\n global ans\n if i == d:\n \n if sum < g:\n use = max(nokori)\n \n n = min(-(-(g - sum) // (use * 100)))\n count += n\n sum += n * use * 100\n\n if sum >= g:\n ans = min(ans, count) \n else...
['Runtime Error', 'Wrong Answer', 'Accepted']
['s507993404', 's926480290', 's873833339']
[3064.0, 3064.0, 3064.0]
[18.0, 20.0, 20.0]
[828, 879, 890]
p03290
u101851939
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_and_c = [list(map(int, input().split())) for _ in range(d)]\nmin_number = 1000\nfor i in range(2**d):\n score = 0\n number = 0\n p_and_c_copy = p_and_c.copy()\n rest_num = set(range(1, d+1))\n for j in range(d):\n if i & (1 << j):\n number += p_and_...
['Wrong Answer', 'Accepted']
['s971563237', 's576815566']
[3188.0, 3064.0]
[77.0, 77.0]
[730, 713]
p03290
u102126195
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\ngetPoint = [[] for i in range(max(p))]\n\n#print(c)\nfor i in range(max(p)):\n for j in range(D):\n if p[j] - 1> i:\n getPoint[i].append((i + 1) * 100 * ...
['Runtime Error', 'Accepted']
['s156339194', 's890396876']
[3316.0, 3064.0]
[41.0, 90.0]
[1777, 927]
p03290
u107915058
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 = float("inf")\nfor i in range(1<<d):\n count = 0\n sum = 0\n nokori = set(range(1, d+1))\n \n \n for j in range(d):\n if j & 1<<i:\n sum += pc[i][0]*(i+1)*100+pc[i][1]\n count += pc[i][0]\n nokori.discard(i+1)\n \n \n if sum < g:\n ...
['Runtime Error', 'Accepted']
['s728990804', 's756668449']
[9148.0, 9248.0]
[27.0, 36.0]
[624, 588]
p03290
u113971909
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\nD,G=map(int,input().split())\nDat=[]\nfor i in range(1,D+1):\n pi,ci=map(int,input().split())\n Dat.append([i,pi,ci])\nGT = 0\nCnt = 0\nfor i in range(D,0,-1):\n for j in range(1,Dat[i-1][1]):\n Cnt += 1\n GT += 100*i\n# print(Cnt,GT)\n if GT>= G:\n print(Cnt)\n sys.exit()\n Cnt ...
['Wrong Answer', 'Accepted']
['s109365017', 's625518929']
[3064.0, 3064.0]
[18.0, 33.0]
[377, 718]
p03290
u118642796
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())\nPC = [0] + [[int(i) for i in input().split()] for _ in range(D)]\n\nans = 1e9\nfor i in range(2**D - 1):\n inSolve = -1\n score_tmp = 0\n solved = 0\n for j in range(D):\n if (i>>j)%2 == 1:\n score_tmp += (j+1)*100*PC[j][0]+PC[j][1]\n ...
['Runtime Error', 'Accepted']
['s461122007', 's408119968']
[3064.0, 3064.0]
[17.0, 23.0]
[637, 659]
p03290
u119148115
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())\nd = [list(map(int,input().split())) for i in range(D)]\n\nA = []\nfor i in range(D):\n A.append(100*(i+1)*d[i][0] + d[i][1])\n\nans = 0\nfor i in range(D):\n ans += d[i][0]\n\nfor i in range(2**D):\n a = 0\n g = 0\n B = []\n for j in range(D):\n ...
['Wrong Answer', 'Accepted']
['s882509735', 's412555838']
[3064.0, 3064.0]
[23.0, 24.0]
[635, 686]
p03290
u122132511
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)]\n\nans = float("inf")\n\nfor bit in range(1 << D):\n count = 0\n sum = 0\n rest = list(range(1, D+1))\n\n for i in range(D):\n if bit & (1 << i):\n sum += 100 * i * pc[i][0] + pc[i][1]\n ...
['Runtime Error', 'Accepted']
['s531532471', 's987021596']
[9140.0, 9236.0]
[34.0, 37.0]
[572, 607]
p03290
u127499732
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 from itertools import combinations_with_replacement\n from fractions import ceil\n d, g, *pc = map(int, open(0).read().split())\n p, c = pc[::2], pc[1::2]\n ans = 0\n l = range(d)\n for x in combinations_with_replacement(l, d):\n y = list(set(x))\n tmp = g\n cou...
['Runtime Error', 'Wrong Answer', 'Runtime Error', 'Accepted']
['s364219838', 's938487141', 's942930939', 's713695259']
[5048.0, 3064.0, 3064.0, 3188.0]
[38.0, 459.0, 377.0, 470.0]
[781, 800, 776, 783]
p03290
u146597538
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 = [list(map(int, input().split())) for _ in range(d)]\n\nans=float('inf')\nfor bit in range(2**d):\n b = 0\n score = 0\n num = 0\n \n \n for i in range(d):\n if (bit >> i) & 1:\n \n score += pc[0][i] * (i+1) * 100 + pc[1][i]\n ...
['Runtime Error', 'Accepted']
['s727334994', 's017572083']
[3064.0, 3064.0]
[18.0, 55.0]
[1002, 1002]
p03290
u160244242
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())\nlst = [list(map(int, input().split())) for _ in range(d)]\n\nfor k,i in enumerate(lst):\n i.append((k+1)*100)\n i.append(i[2]*i[0]+i[1])\n\ndef calcurate(pt, count, g, lst):\n lst1 = list()\n for i in lst:\n if i[3] > g - pt:\n lst1.append...
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s360418449', 's840659963', 's684963925']
[3064.0, 3064.0, 3064.0]
[19.0, 18.0, 42.0]
[769, 681, 852]
p03290
u163320134
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\nn,g=map(int,input().split())\narr=[list(map(int,input().split())) for _ in range(n)]\ncomp=[(100*(i+1)*arr[i][0]+arr[i][1]) for i in range(n)]\nans=10**10\nfor i in range(2**n):\n flag=format(i,'b')\n if len(flag)<n:\n flag='0'*(n-len(flag))+flag\n tsum=0\n tans=0\n for i in range(n):\n if f...
['Runtime Error', 'Accepted']
['s476336532', 's766907194']
[3064.0, 3064.0]
[17.0, 22.0]
[539, 540]
p03290
u164471280
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\nn, g = map(int, input().split())\nL = []\nfor i in range(n):\n t = list(map(int, input().split()))\n \n t.append((i+1)*100)\n L.append(t)\nprint(n, g, L)\n\nans = 100 * n\nfor v in itertools.permutations(L):\n print(v)\n score = 0\n count = 0\n k = 0\n p = v[k][0]\n whi...
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s477378451', 's583933659', 's014531941']
[65268.0, 3064.0, 3064.0]
[2103.0, 17.0, 22.0]
[1054, 1225, 1922]
p03290
u168333670
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\nquestion_list = []\n\nfor i in range(D):\n p, c = map(int, input().split())\n question_list.append([p, c])\n\n\nans = 10 ** 5\n\nfor i in range(D): \n others = D - 1\n\n for j in range(2 ** others): \n bit = format(j, "0" + str(D) + "b")\n total = 0\n ...
['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted']
['s347167485', 's659135081', 's704181860', 's117010751']
[3064.0, 3064.0, 3064.0, 3064.0]
[47.0, 48.0, 47.0, 24.0]
[1045, 1014, 1052, 772]
p03290
u171366497
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...
['#2-1-1 #ABC104C\nd,g = map(int,input().split())\nq={}\ncomp={}\np={}\nminsolve=0\nfor i in range(d):\n a,b=map(int,input().split())\n q[i]=a\n p[i]=100*(i+1)\n comp[i]=100*(i+1)*a+b\n minsolve+=a\n \nsolve=[0 for _ in range(d)]\ndef roop(s,check,point,solved,minsolve):\n solve=s.copy()\n solve...
['Wrong Answer', 'Accepted']
['s673073615', 's164951330']
[3064.0, 3064.0]
[20.0, 22.0]
[853, 853]
p03290
u172035535
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 func(i,g,cnt):\n\tif not g:\n\t\treturn cnt\n\telif i < 0:\n\t\treturn float('inf')\n\n\tcur_cnt = g//((i+1)*100)\n\tif g % (i+1)*100:\n\t\tcur_cnt += 1\n\tcur_cnt = min(cur_cnt,PC[i][0])\n\tg -= (i+1)*100*cur_cnt\n\tif cur_cnt == PC[i][0]:\n\t\t\n\t\tg -= PC[i][1]\n\t# print(g,cnt+cur_cnt)\n\tcnt = func(i-1,g,cn...
['Wrong Answer', 'Accepted']
['s697267221', 's455283270']
[3064.0, 3188.0]
[18.0, 20.0]
[492, 549]
p03290
u173243396
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())\nscoremap=[list(map(int, input().split())) for d in range(D)]\nanswer=float('inf')\n\nfor i in range(2**D):\n yet=[]\n score=count=0\n for j in range(D):\n if i>>j&1==0:\n yet.append(j)\n continue\n score+=scoremap[j][1]+(j+1)*100*scoremap[j][0]\n count+=scoremap[j]...
['Wrong Answer', 'Accepted']
['s678545777', 's776095322']
[3188.0, 3064.0]
[206.0, 214.0]
[605, 592]
p03290
u185354171
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,list(input().split()))\n\np_tatal = []\nfor i in range(D):\n p,c = map(int,list(input().split()))\n p_tatal.append([p,p*(i+1)*100+c])\n\nans = 10**18\nfor i in range(2**D):\n binary = bin(i)[2:].zfill(D)\n tatal = 0\n cnt = 0\n for j in range(D):\n if binary[j]=='1':\n ...
['Wrong Answer', 'Accepted']
['s973676823', 's270721292']
[3316.0, 3064.0]
[24.0, 22.0]
[709, 715]
p03290
u197457087
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\nP = []\nC = []\nfor i in range(D):\n tempP, tempc = map(int, input().split())\n P.append(tempP)\n C.append(tempC)\n\nprint(P,C)\n', 'd, g = map(int, input().split())\npc = [list(map(int, input().split())) for i in range(d)]\n\nans = float("inf")\n\nfor bit in range(1 << d): \n ...
['Runtime Error', 'Accepted']
['s792512168', 's298303903']
[2940.0, 3064.0]
[17.0, 25.0]
[156, 790]
p03290
u199295501
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 -*-\nimport itertools\n\nD, G = map(int, input().split())\n\npi = []\nci = []\nscore_i_c = []\nscore_i_h = []\nfor i in range(D):\n p_t, c_t = map(int, input().split())\n pi.append(p_t)\n ci.append(c_t)\n tmp = p_t * 100 * (i + 1) + c_t\n score_i_c.append((i,tmp,p_t))\n tmp = (p_...
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s051765038', 's743638424', 's961197256']
[3316.0, 3316.0, 3572.0]
[21.0, 21.0, 44.0]
[2013, 1843, 2040]
p03290
u201234972
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()\nL = len(S)\nQ = 10**9 + 7\nanum = [ 0 for _ in range(L+1)]\n#bnum = [ 0 for _ in range(L+1)]\ncnum = [ 0 for _ in range(L+1)]\nhnum = [ 0 for _ in range(L+1)]\nfor i in range(1,L+1):\n if S[i-1] == 'A':\n anum[i] = anum[i-1] + 1\n# bnum[i] = bnum[i-1]\n cnum[i] = cnum[i-1]\n ...
['Wrong Answer', 'Accepted']
['s700089302', 's985971144']
[3064.0, 3064.0]
[17.0, 25.0]
[1061, 685]
p03290
u209620426
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_p,total_q):\n print(i,total_q,total_p)\n\n if total_p >= g:\n ans.append(total_q)\n return\n\n if i == d:\n return\n\n for n in range(pc_list[i][0]+1):\n if n == pc_list[i][0]:\n dfs(i+1, total_p+100*(i+1)*n+pc_list[i][1], total_q+n)\n else:\n ...
['Wrong Answer', 'Accepted']
['s054122609', 's822658221']
[19244.0, 3064.0]
[2104.0, 25.0]
[485, 1170]
p03290
u215018528
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)\n\nres = 0\ncount = 0\nans_list = []\n\ndef dfs(i, p, c, res, count):\n if i == 0:\n if res >= g:\n ans_list.append(count)\n else:\n for j in ...
['Wrong Answer', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted']
['s183287788', 's314249058', 's394566063', 's851932479', 's059065930']
[179832.0, 3188.0, 3064.0, 3064.0, 14480.0]
[2115.0, 20.0, 18.0, 17.0, 1916.0]
[669, 603, 524, 524, 887]
p03290
u220904910
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())\nl=[list(map(int,input().split())) for i in range(D)]\nlst=[[(i+1)*100]*(l[i][0]-1) + [(i+1)*100 + l[i][1]] for i in range(len(l))]\nans = 100*D\ndis = 100000*D\nfor i in range(1<<D):\n print(bin(i))\n point,num,maxp=0,0,0\n for j in range(D):\n if (i>>j)...
['Wrong Answer', 'Accepted']
['s733403648', 's797340657']
[3188.0, 3064.0]
[29.0, 26.0]
[559, 541]
p03290
u222207357
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 = G//100\npc = []\n\nfor i in range(D):\n p,c = maap(int,input().split())\n pc.append((p,c//100))\n\nans = 1e9\n\nfor i in range(1<<D):\n points = 0\n cost = 0\n for j in range(D):\n jbit = ((i>>j)&1)\n \n points += jbit*( (j+1)*pc[j][0] + pc[j][1]...
['Runtime Error', 'Accepted']
['s798586872', 's284795513']
[3064.0, 3064.0]
[17.0, 29.0]
[801, 804]
p03290
u227476288
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 d in range(D):\n p[d], c[d] = map(int, input().split())\n\ntime_list = []\nfor i in range(1<<D):\n point = 0\n time = 0\n output = []\n for j in range(D): \n #print(i,j+1,bin(i>>j))\n if ((i >> j) & 1) == 1: \n output....
['Runtime Error', 'Accepted']
['s066322881', 's806568772']
[3064.0, 3064.0]
[18.0, 47.0]
[1116, 1119]
p03290
u228223940
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 = [[int(i) for i in input().split()] for j in range(d)]\n\nnum = 2**d\n\nscore = 0\nans = 0\n\n\ndef nokori(use,score):\n tmp = 0\n for i in range(d):\n if d-1-i not in use:\n if pc[d-1-i][0] * (d-1-i+1) * 100 >= score:\n tmp += (score +(d-1-i+...
['Wrong Answer', 'Accepted']
['s367771239', 's591370750']
[3192.0, 3064.0]
[19.0, 30.0]
[1073, 1411]
p03290
u252828980
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\nn,k = map(int,input().split())\nL = []\nfor i in range(n):\n a,b = map(int,input().split())\n L.append([0,a,b])\nfor i in range(n):\n L[i][0] = 100*(i+1)\n#print(L)\nli = [0,1]\nre = []\n\ndef cer(v):\n for i in range(n-1,0,-1):\n if v[i] == 0:\n return i\n...
['Runtime Error', 'Accepted']
['s908529587', 's423139068']
[9340.0, 9224.0]
[73.0, 35.0]
[986, 781]
p03290
u262204831
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()))\npc = []\nfor i in range(D):\n pc.append(list(map(int,input().split())))\n\nscoreList = [0 for i in range(D)]\n\nfor i in range(D):\n scoreList[i] = (i + 1) * 100 * pc[i][0] + pc[i][1]\n\nchoiceList = [[] for i in range(2 ** D)]\nfor i in range(2 ** D):\n for j in range(D...
['Wrong Answer', 'Accepted']
['s431144739', 's144233668']
[9340.0, 9240.0]
[40.0, 42.0]
[1127, 1126]
p03290
u263830634
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\n\na,b=map(int,input().split())\nc=[0]+[list(map(int,input().split()))for i in range(a)]\n\nprint(c)\n\ndef f(t,s): \n if t==0: \n return 10**9\n l=min(s//(t*100),c[t][0]) \n k=100*t*l \n if l==c[t][0]: \n k+=c[t][1] \n if k<s: \n l+=f(t-1,s-k) \n return min(l,f(t-1,s)) \npri...
['Wrong Answer', 'Runtime Error', 'Accepted']
['s164941197', 's650704701', 's967671055']
[3064.0, 2940.0, 3064.0]
[18.0, 17.0, 25.0]
[1028, 1031, 753]
p03290
u267325300
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\nD, 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\nused = [False for i in range(D)]\n\n\ndef check_goal(P, C, rest):\n result = []\n for i in range(len(P)):\n if used:\n continue\n ...
['Runtime Error', 'Accepted']
['s048035824', 's733893262']
[3188.0, 3188.0]
[18.0, 25.0]
[1408, 879]
p03290
u273201018
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\n\nD, G = map(int, input().split())\n\nP = [None] * D\nC = [None] * D\ncount = [None] * D\nscore = [None] * D\n\nfor i in range(D):\n p, c = map(int, input().split())\n P[i] = p\n C[i] = c\n count[i] = list(range(p+1))\n score[i] = [100 * ...
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s715108254', 's748872594', 's393991331']
[1903136.0, 1901728.0, 3188.0]
[2221.0, 2221.0, 28.0]
[571, 573, 1245]
p03290
u278868910
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())\nG = G // 100\nP= [0] * D\nC= [0] * D\n\nfor i in range(D):\n P[i], C[i] = (int(i) for i in input().split())\n C[i] = C[i] // 100\n\nINF = int(1e9)\nmem = [[0] * G for _ in range(D+1)]\nused = [[0] * G for _ in range(D+1)]\nprint (mem)\n\ndef dfs(idx, g):\n if g >= G:...
['Wrong Answer', 'Accepted']
['s770802870', 's545667695']
[31800.0, 3440.0]
[2105.0, 624.0]
[700, 877]
p03290
u282228874
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())\nanswer = 0\nQ = []\nfor i in range(d):\n p,c=map(int,input().split())\n answer += p\n Q.append((i+1,p,c))\nprint(answer)\n\ndp = [-10**9]*(answer+1) \ndp[0] = 0\nfor i,p,c in Q:\n for j in range(answer,-1,-1):\n for k in range(1,p+1):\n cc = i*100*k\n ...
['Wrong Answer', 'Accepted']
['s599290313', 's517787383']
[3064.0, 3064.0]
[709.0, 668.0]
[499, 485]
p03290
u285443936
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 = {},{}\nfor i in range(1,D+1):\n pi,ci = map(int,input().split())\n p[i] = pi\n c[i] = ci\nans = sum(p.values())\n\nfor i in range(2**D):\n cmp = {i:False for i in range(1,D+1)}\n score = 0\n ans_tmp = 0\n for j in range(D):\n if (i >> j) & 1:\n cmp[j+1] = True\n ...
['Wrong Answer', 'Accepted']
['s335629418', 's584038066']
[3188.0, 9236.0]
[28.0, 40.0]
[656, 718]
p03290
u288087195
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\nG /= 100\nl = [[0]*3 for i in range(D)]\n\nfor i in range(D):\n p, c = list(map(int, input().split()))\n l[i][0] = i+1\n l[i][1] = p\n l[i][2] = c/100\n\n\ndef dfs(i, scores):\n if scores <= 0:\n return 0\n\n if i == D:\n return 1e9\n\n a, p...
['Wrong Answer', 'Accepted']
['s285457415', 's869053744']
[3064.0, 3064.0]
[2104.0, 19.0]
[644, 527]
p03290
u302957509
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\nimport itertools\nimport math\n\nD, G = map(int, input().split())\n\np = {}\nc = {}\ns = {}\nfor i in range(1, D + 1):\n pi, ci = map(int, input().split())\n score = 100 * i * pi + ci\n s[i] = score\n p[i] = pi\n c[i] = ci\n\n\ndef complete(pset):\n score = 0\n solved = 0\n comped_max = 0\...
['Runtime Error', 'Accepted']
['s095921582', 's374609709']
[3064.0, 3064.0]
[21.0, 25.0]
[926, 924]
p03290
u304593245
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...
['\ndef solve():\n d = 0\n c = 0\n for i in range(D):\n d += p[i][0]\n dp = [[0]*(d+1) for i in range(D)]\n for i in range(D):\n for j in range(p[i][0]+1):\n if i == 0:\n if j == p[i][0]:\n dp[i][j] += p[i][1]\n dp[i][j] += 100*j\n...
['Runtime Error', 'Accepted']
['s118160803', 's207699109']
[9192.0, 9228.0]
[25.0, 213.0]
[839, 838]
p03290
u308919961
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(' '))\npc = []\nfor _ in range(d):\n p,c = map(int,input().split(' '))\n pc.append((p,c))\n\nans = 10000000\n\nfor i in range(2**d):\n cnt = 0\n score = 0\n max_flg = 0\n for j in range(d):\n #print(str(i) + ' ' + str(j))\n if((i>>j)&1 == 1):\n ...
['Wrong Answer', 'Accepted']
['s127579574', 's997026699']
[3188.0, 3064.0]
[25.0, 23.0]
[764, 765]
p03290
u309977459
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 = []\nPC = [list(map(int, input().split())) for _ in range(D)]\nPC = [0] + PC\n\n\ndef dfs(G, i):\n print(G)\n if i == 0:\n return 10**12\n n = min((G-1)//(100*i)+1, PC[i][0])\n #n = min(G//(100*i), PC[i][0])\n tmp = n*100*i\n if n == PC[i][0]:\n ...
['Wrong Answer', 'Accepted']
['s867033373', 's346907377']
[3188.0, 3064.0]
[20.0, 19.0]
[418, 405]
p03290
u327465093
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())\nbonus = []\nproblems = []\nfor _ in range(N):\n PI, CI = map(int, input().split())\n problems.append(PI)\n bonus.append(CI)\n\n\ndef make_plan(total_problem, total_score, problems):\n \n \n for i in range(N - 1, -1, -1):\n pi = problems[i]\n si = (i + ...
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s098100866', 's975899659', 's624795956']
[3064.0, 3064.0, 3064.0]
[2104.0, 2104.0, 174.0]
[1937, 2388, 2290]
p03290
u329407311
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, goal = map(int, input().split())\npc = [0] + [list(map(int, input().split())) for _ in range(d)]\n\ndef solve(goal, d):\n if d == 0:\n return 10**9\n n = min(goal//(100*d), pc[d][0])\n t = n * d * 100\n if n == pc[d][0]:\n t += pc[d][1]\n if t < goal:\n n += solve(goal-t, d-1)\n return min(n, solve(...
['Runtime Error', 'Accepted']
['s082266258', 's842896882']
[3064.0, 3064.0]
[18.0, 18.0]
[336, 339]
p03290
u342042786
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())\nprob = [list(map(int, input().split())) for i in range(D)]\ntmp = 100*10\n\nfor i in range(1<<D):\n grade = 0\n cnt = 0\n judge = list(range(1, D+1))\n\n for j in range(D):\n if (i>>j & 1):\n grade += (100*(j+1)*prob[j][0] + prob[j][1])\n cnt ...
['Wrong Answer', 'Accepted']
['s142736737', 's387068944']
[3064.0, 3188.0]
[24.0, 24.0]
[614, 634]
p03290
u347640436
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...
["INF = float('inf')\nd, g = map(int, input().split())\ndata = [list(map(int, input().split())) for _ in range(d)]\ndef f(data, score, targets):\n from builtins import min\n from math import ceil\n if score <= 0:\n return 0\n result = INF\n for i in targets:\n t = ceil(score / ((i + 1) * 100))\n if t < da...
['Wrong Answer', 'Accepted']
['s658256191', 's387881163']
[3064.0, 3064.0]
[2104.0, 22.0]
[586, 683]
p03290
u350836088
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 = list(input())\nl = len(S)\nif S[0]=="A" and "C" in S[2:l-1]:\n S.remove("A")\n S.remove("C")\n S = "".join(S)\n if S.islower():\n print("AC")\n else:\n print("WA")\nelse:\n print("WA")\n \n ', "D,G = map(int,input().split())\np,c = [],[]\nfor i in range(D):\n tmp0 ,tmp1 = map(int,input().split())\n...
['Wrong Answer', 'Accepted']
['s353729784', 's154340485']
[2940.0, 3064.0]
[17.0, 135.0]
[195, 651]
p03290
u354916249
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 numpy as np\n\nD, G = map(int, input().split())\n\nPC = []\nans = 10 ** 9\n\nfor _ in range(D):\n PC.append(list(map(int, input().split())))\n\nPC = np.array(PC)\n\nfor i in range(2 ** D):\n score = 0\n count = 0\n\n for j in range(D):\n if (i >> j) & 1:\n\n \tscore += (j+1) * 100 *...
['Runtime Error', 'Accepted']
['s163698604', 's210453027']
[2940.0, 14420.0]
[17.0, 1042.0]
[795, 794]
p03290
u357949405
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()))\npc = [list(map(int, input().split())) for _ in range(D)]\n\nfor i in range(len(pc)):\n pc[i].append((100 * (i+1) * pc[i][0] + pc[i][1]) / pc[i][0])\n pc[i].append(i+1)\n\npc = sorted(pc, key=lambda x: x[2], reverse=True)\n\nans = 0\ndel_list = []\nfor i, info in enumerate...
['Wrong Answer', 'Accepted']
['s168758134', 's021990393']
[3064.0, 3188.0]
[18.0, 202.0]
[741, 988]
p03290
u360116509
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 = map(int, input().split())\n pc = []\n for i in range(D):\n p, c = map(int, input().split())\n w = 100 * (i + 1)\n y = w * p + c\n z = y / p\n pc.append((p, w, y, z))\n pc = sorted(pc, key=lambda x: x[3], reverse=True)\n ans = 0\n for p, w, y, z...
['Wrong Answer', 'Accepted']
['s709922105', 's744922437']
[3064.0, 3064.0]
[18.0, 20.0]
[561, 382]
p03290
u366133198
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\ndef all_comb(iterable):\n for i in range(0, len(iterable) + 1):\n comb = itertools.combinations(iterable, i)\n for pair in comb:\n yield(pair)\n\ndef min_solve(goal_point, solve, pc_list):\n solve_point = sum([pc[0] * pc[2] + pc[1] for pc in solve])\n solve_num = ...
['Runtime Error', 'Runtime Error', 'Accepted']
['s105302561', 's843923510', 's543414712']
[3064.0, 3064.0, 3064.0]
[17.0, 17.0, 26.0]
[1045, 1404, 1028]
p03290
u369212307
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 pc = [list(map(int, input().split())) for _ in range(d)]\n \n ans = 1000\n for i in range(1 << d):\n \tscore = 0\n \tnum = 0\n \trest = 0\n \tfor j in range(d):\n \t\tif ((i >> j) & 1) == 1:\n \t\t\tscore += pc[j][0]*100*(j+1) + pc[j][1]\n \t\t\...
['Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted']
['s194688123', 's574719141', 's583415341', 's685634727', 's751252543', 's891158281', 's997989073', 's662825208']
[2940.0, 2940.0, 3064.0, 3064.0, 2940.0, 3064.0, 3064.0, 3064.0]
[17.0, 18.0, 18.0, 18.0, 17.0, 18.0, 18.0, 23.0]
[527, 527, 683, 679, 527, 828, 679, 687]
p03290
u371763408
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\nfrom collections import Counter\nD, G = map(int, input().split())\nP = [list(map(int, input().split())) for i in range(D)]\nmin_num = 10**8\n\njudge_list = list(itertools.product([0, 1, 2], repeat=D)) \n\n\nfor judge in judge_list:\n score = 0\n num = 0\n d = Counter() \n d.update(judge)...
['Wrong Answer', 'Accepted']
['s357439920', 's361627579']
[13172.0, 3064.0]
[1070.0, 18.0]
[1001, 510]
p03290
u375616706
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())\no, c = zip(*[map(int, input().split()) for _ in range(d)])\n\ncomp = [(i+1)*o[i]+c[i]//100 for i in range(d)]\nprint(o, c)\nprint(comp)\n\nG = g//100\n\n\nans = sum(o)\n\nfor j in range(2**d):\n tmp = bin(j)\n ope = tmp[2:len(tmp)].zfill(d)\n\n now = 0 \n f = 1\n num ...
['Runtime Error', 'Accepted']
['s628335812', 's568302126']
[3064.0, 3064.0]
[28.0, 27.0]
[1157, 1139]
p03290
u385644001
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...
['#3\nd,g = map(int,input().split())\nlista = []\nfor i in range(d):\n lista.append([])\n p,c = map(int,input().split())\n lista[i] = [p,c]\n \ndef search(allcomp,notouch,touch,rem,toachiev,ps):\n \n \n \n \n \n \n if touch != []:\n \n point = (touch[0] + 1)*100\n p...
['Runtime Error', 'Accepted']
['s491316051', 's561742691']
[3064.0, 3444.0]
[17.0, 23.0]
[2783, 917]
p03290
u386170566
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()))\nt = [[0,0]]\nfor i in range(D):\n t.append(list(map(int,input().split())))\ndef down(i,j,ans,wa):\n if wa >= G:\n return ans\n exit()\n else:\n if i == 0:\n for k in range(1,D+1):\n down(k,1,ans+1,wa+100*i)\n elif j <...
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s231912771', 's617122550', 's359035908']
[3064.0, 3188.0, 3064.0]
[18.0, 20.0, 20.0]
[958, 573, 552]
p03290
u407160848
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 can(d,g,p,c, maxPick):\n\t\n\n\t\n\tfor i in range(0, 2**(d-1)):\n\n\t\t\n\t\tpoint = 0\n\t\tpicked = 0\n\t\tfor j in range(0, d-1):\n\t\t\tif i & (2**j) != 0:\n\t\t\t\tpoint += (j+1) * 100 * p[j] + c[j]\n\t\t\t\tpicked += p[j]\n\n\t\tif picked > maxPick:\n\t\t\tprint (i, " is un")\n\t\t\tcontinue\n\t\tprint ("i"...
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s318831015', 's396345887', 's849008973']
[4336.0, 3316.0, 3188.0]
[144.0, 63.0, 59.0]
[1302, 1306, 1315]
p03290
u411858517
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\ndef solve(D, G, problems):\n bit_list = list(itertools.product([0, 1], repeat=D))\n \n result_count = 10 ** 8\n for pattern in bit_list:\n scores = 0 \n count = 0 \n for i in range(D):\n if pattern[i] == 1: \n scores += problems[i][0] * (...
['Wrong Answer', 'Accepted']
['s177076062', 's641738793']
[3316.0, 3188.0]
[22.0, 37.0]
[1158, 1212]
p03290
u423665486
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 resolve():\n\td, g = map(int, input().split())\n\tps = []\n\tcs = []\n\tans = 100**6\n\tfor _ in range(d):\n\t\tp, c = map(int, input().split())\n\t\tps.append(p)\n\t\tcs.append(c)\n\tfor i in range(d-1, -1, -1):\n\t\ttotal = 0\n\t\tsolved = 0\n\t\tfor _ in range(ps[i]):\n\t\t\tif total >= g and ans > solved:\n\t...
['Wrong Answer', 'Accepted']
['s584238522', 's520536448']
[3064.0, 3064.0]
[795.0, 819.0]
[842, 916]
p03290
u426764965
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\nans = 1e9\nfor mask in range(2**D - 1):\n score = 0\n num = 0\n rest_max = -1\n\n for i in range(D):\n if (mask >> i) & 1:\n score += 100 * (i+1) * P[i] + C[i]\n n...
['Runtime Error', 'Accepted']
['s810162407', 's078822209']
[3064.0, 3064.0]
[18.0, 21.0]
[747, 521]
p03290
u427344224
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\np_list = []\nc_list = []\nfor i in range(D):\n p, c = map(int, input().split())\n p_list.append(p)\n c_list.append(c)\n\nfi = 0\nco = 0\nresult1=0\nfor i in range(D-1, -1, -1):\n if fi >= G:\n break\n p = p_list[i]\n while p > 0:\n p -= 1\n fi...
['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted']
['s229636916', 's642191187', 's683355179', 's570056531']
[3064.0, 3064.0, 3188.0, 3064.0]
[17.0, 17.0, 18.0, 150.0]
[433, 418, 436, 838]
p03290
u445624660
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\n\n\nimport sys\nsys.setrecursionlimit(10**10)\n\nd, g = map(int, input().split())\nmemo = {}\npoints, bonus = [], []\nfor _ in range(d):\n p, c = map(int, input().split())\n points.append(p)\n bonus.append(c)\n\n\ndef f(c, p):\n if (c, p) in memo:\n return memo[(c, p)]\n if p >= g:\n ...
['Runtime Error', 'Accepted']
['s365000459', 's912511985']
[3064.0, 9280.0]
[18.0, 140.0]
[949, 1186]
p03290
u457554982
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...
['abcd=list(input())\nfor i in range(2**3):\n if i//4==0:\n op1="+"\n else:\n op1="-"\n i=i%4\n if i//2==0:\n op2="+"\n else:\n op2="-"\n i=i%2\n if i==0:\n op3="+"\n else:\n op3="-"\n siki=abcd[0]+op1+abcd[1]+op2+abcd[2]+op3+abcd[3]\n if eval(siki...
['Wrong Answer', 'Accepted']
['s861934662', 's908638200']
[3064.0, 3064.0]
[17.0, 61.0]
[352, 1030]
p03290
u459150945
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...
["pc = [list(map(int, input().split())) for i in range(D)]\n\n\ndef dfs(i, sum, count, nokori):\n global ans\n if i == D:\n if sum < G:\n use = max(nokori)\n n = min(pc[use-1][0], -(-(G-sum)//(use*100)))\n count += n\n sum += n * use * 100\n if sum >= G:\n...
['Runtime Error', 'Accepted']
['s502072728', 's202343491']
[3064.0, 3064.0]
[17.0, 119.0]
[534, 768]
p03290
u463858127
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\np = []\nc = []\nans = []\ncnt = 0\nss = 0\nfor _ in range(d):\n pp, cc = map(int, input().split())\n\n p.append(pp)\n c.append(cc)\n\n\n\nfor x in range(2**d):\n ss = 0\n cnt = 0\n for i in range(d):\n if (x>>i)&1:\n\n ss += (i+1)*100*p[i] + c[i]...
['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted']
['s322675287', 's351064775', 's452418393', 's503347627', 's621274082', 's293885596']
[8400.0, 8400.0, 8400.0, 8400.0, 8400.0, 3064.0]
[686.0, 661.0, 649.0, 668.0, 640.0, 150.0]
[783, 785, 785, 785, 959, 673]
p03290
u471539833
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=[]\navg=[]\nfor i in range(D):\n p1,c1=map(int,input().split())\n p.append(p1)\n c.append(c1)\n avg.append((p1*(i+1)*100+c1)/p1)\nans=sum(p)\nfor i in range(2**D):\n num=0\n point=0\n sit=[0]*D\n for j in range(D):\n if(i>>j&1):\n num+=p[j]\n sit[j]+=p[j]\n ...
['Wrong Answer', 'Accepted']
['s794412796', 's762792259']
[3064.0, 3064.0]
[1884.0, 1801.0]
[533, 519]
p03290
u480138356
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\ninput = sys.stdin.readline\n\ndef ceil(a, b):\n if a%b == 0:\n return a//b\n else:\n return a//b + 1\n\ndef main():\n D, G = map(int, input().split())\n pc = [list(map(int, input().split())) for i in range(D)]\n\n ans = int(1e9)\n for i in range(2**D):\n tmp = 0\n ...
['Runtime Error', 'Accepted']
['s199317565', 's308701868']
[3064.0, 3064.0]
[24.0, 21.0]
[922, 1096]
p03290
u489762173
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\ndef main():\n sum=0\n ans=0\n ansc=0\n D,G = map(int,input().split())\n\n lis=[]\n for x in range(D):\n P,C = map(int,input().split())\n lis.append([P,C])\n\n op_cnt = D\n\n for i in range(2 ** op_cnt):\n for j in range(op_cnt):\n if((i>>j) & 1 and...
['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted']
['s346373558', 's449063723', 's898274667', 's920259833']
[3316.0, 3356.0, 3064.0, 3064.0]
[201.0, 141.0, 199.0, 194.0]
[1020, 968, 1034, 995]
p03290
u496821919
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)]\n\nans = float("inf")\nfor i in range(2**D):\n sum = 0\n count = 0\n rem = set(range(1,D+1))\n for j in range(D):\n if (i >> j) & 1:\n sum += pc[j][0]*100*j+pc[j][1]\n count += pc[j][0]\n ...
['Runtime Error', 'Wrong Answer', 'Accepted']
['s476565609', 's524186592', 's064956619']
[3064.0, 3064.0, 3064.0]
[18.0, 25.0, 19.0]
[535, 542, 523]
p03290
u501643136
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)\nans = 10*100\nfor i in range(2**D):\n rest = G\n cnt = 0\n maxdgt = -1\n for j in range(D):\n if bin(i)>>j & 1:\n rest -= P[i]*(i+1)*100+C[i]\n cnt += P[i]\n else...
['Runtime Error', 'Accepted']
['s841656696', 's810887318']
[3064.0, 3064.0]
[17.0, 22.0]
[489, 487]
p03290
u503228842
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\nans = 10**9\nfor i in range(D):\n p[i], c[i] = map(int,input().split())\n\nfor j in range(2**D):\n total_score = 0\n solved_problems = 0\n unsolved = []\n for k in range(D):\n if (j>>k)&1:\n total_score += 100*(k+1)*p[k]+c[k]\n ...
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s558649241', 's825863052', 's199044849']
[3064.0, 3064.0, 3064.0]
[24.0, 23.0, 47.0]
[898, 897, 891]