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 |
|---|---|---|---|---|---|---|---|---|---|---|
p03030 | u140697185 | 2,000 | 1,048,576 | You have decided to write a book introducing good restaurants. There are N restaurants that you want to introduce: Restaurant 1, Restaurant 2, ..., Restaurant N. Restaurant i is in city S_i, and your assessment score of that restaurant on a 100-point scale is P_i. No two restaurants have the same score. You want to in... | ['N = int(input())\nA = []\nfor i in range(N):\n\ttem_data = input().split()\n\tA.append([tem_data[0] , int(tem_data[1]) , i])\nA = sorted(A , key = lambda x: (x[0] , -x[1]))\nfor name , score , number in A:\n\tprint(number)', 'N = int(input())\nA = []\nfor i in range(N):\n\ttem_data = input().split()\n\tA.append([tem... | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s593192223', 's870557681', 's100922157'] | [3060.0, 3060.0, 3060.0] | [18.0, 18.0, 17.0] | [213, 228, 215] |
p03030 | u141410514 | 2,000 | 1,048,576 | You have decided to write a book introducing good restaurants. There are N restaurants that you want to introduce: Restaurant 1, Restaurant 2, ..., Restaurant N. Restaurant i is in city S_i, and your assessment score of that restaurant on a 100-point scale is P_i. No two restaurants have the same score. You want to in... | ['N = int(input())\nB = []\nfor i in range(N):\n s,p = map(str,input().split())\n tmp = [i+1,s,int(p)]\n B.append(tmp)\nB.sort(key=lambda x:x[2],reverse=True)\nB.sort(key=lambda x:x[1])\nprint(B)\nfor x in B:\n print(x[0])\n', 'N = int(input())\nB = []\nfor i in range(N):\n s,p = map(str,input().split())... | ['Wrong Answer', 'Accepted'] | ['s782982539', 's227726865'] | [3060.0, 3064.0] | [18.0, 18.0] | [223, 213] |
p03030 | u143322814 | 2,000 | 1,048,576 | You have decided to write a book introducing good restaurants. There are N restaurants that you want to introduce: Restaurant 1, Restaurant 2, ..., Restaurant N. Restaurant i is in city S_i, and your assessment score of that restaurant on a 100-point scale is P_i. No two restaurants have the same score. You want to in... | ['n = int(input())\nsp = {}\nfor i in range(n):\n s, p = input().split()\n if s in sp:\n sp[s].append([int(p), i+1])\n else:\n sp[s] = []\n sp[s].append([int(p), i+1])\n \nfor i in sp.keys():\n sp[i].sort(reverse=True)\nsp = sorted(sp.items(), key=lambda x:x[0])\n\nprint(sp)\nfor... | ['Wrong Answer', 'Accepted'] | ['s095349668', 's114691952'] | [3064.0, 3064.0] | [17.0, 17.0] | [351, 341] |
p03030 | u143738910 | 2,000 | 1,048,576 | You have decided to write a book introducing good restaurants. There are N restaurants that you want to introduce: Restaurant 1, Restaurant 2, ..., Restaurant N. Restaurant i is in city S_i, and your assessment score of that restaurant on a 100-point scale is P_i. No two restaurants have the same score. You want to in... | ['from bisect import insort_left as il\nn=int(input())\na=[]\n\nd={}\nfor i in range(n):\n s,p=input().split()\n p=int(p)\n a.append(p)\n \n if s not in d:\n d[s]=[p]\n else:\n il(d[s],p)\nprint(d)\ns=sorted(d)\nprint(s)\n\n\n\nfor i in s:\n \n \n for j in range(len(d[i])):\n ... | ['Wrong Answer', 'Accepted'] | ['s437433244', 's561444515'] | [3060.0, 3188.0] | [18.0, 18.0] | [333, 317] |
p03030 | u143903328 | 2,000 | 1,048,576 | You have decided to write a book introducing good restaurants. There are N restaurants that you want to introduce: Restaurant 1, Restaurant 2, ..., Restaurant N. Restaurant i is in city S_i, and your assessment score of that restaurant on a 100-point scale is P_i. No two restaurants have the same score. You want to in... | ['N = int(input())\nL1 = []\nfor i in range(N):\n L1.append(list(input().split()))\n\nL2 = L1\n\nans=[]\nfor i in L1:\n seq = 1\n for j in L2:\n if i[0] > j[0]:\n seq += 1\n elif i[0] == j[0]:\n if int(i[1]) < int(j[1]):\n seq += 1\n ans.append(seq)\n \n... | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s134232159', 's787619873', 's164127022'] | [3316.0, 3060.0, 3064.0] | [21.0, 19.0, 22.0] | [365, 350, 352] |
p03030 | u144980750 | 2,000 | 1,048,576 | You have decided to write a book introducing good restaurants. There are N restaurants that you want to introduce: Restaurant 1, Restaurant 2, ..., Restaurant N. Restaurant i is in city S_i, and your assessment score of that restaurant on a 100-point scale is P_i. No two restaurants have the same score. You want to in... | ['n=int(input())\ns=[]\nfor i in range(n):\n S=list(input().split())\n s.append([S[0],int(S[1]),i+1])\ns.sort(key=lambda x: x[1],reverse=True)\ns.sort(key=lambda x: x[0])\nprint(s)\nfor i in range(n):\n print(s[i][2])\n', 'n=int(input())\ns=[]\nfor i in range(n):\n S=list(input().split())\n s.append([S[0... | ['Wrong Answer', 'Accepted'] | ['s639953276', 's345461981'] | [3064.0, 3188.0] | [17.0, 20.0] | [216, 206] |
p03030 | u150664457 | 2,000 | 1,048,576 | You have decided to write a book introducing good restaurants. There are N restaurants that you want to introduce: Restaurant 1, Restaurant 2, ..., Restaurant N. Restaurant i is in city S_i, and your assessment score of that restaurant on a 100-point scale is P_i. No two restaurants have the same score. You want to in... | ['N = int(input())\nList = [list(map(int,input().split())) for i in range(N)]\n\nfor i in range(N):\n List[i].append(i+1)\nList.sort(key=lambda x:x[1], reverse=True)\nList.sort(key=lambda x:x[0])\nfor i in range(N):\n print("{}".format(List[i][2]))', 'N = int(input())\nList = [list(map(str,input().split())) for i... | ['Runtime Error', 'Accepted'] | ['s883792965', 's210362958'] | [3060.0, 3064.0] | [18.0, 18.0] | [244, 277] |
p03030 | u152861889 | 2,000 | 1,048,576 | You have decided to write a book introducing good restaurants. There are N restaurants that you want to introduce: Restaurant 1, Restaurant 2, ..., Restaurant N. Restaurant i is in city S_i, and your assessment score of that restaurant on a 100-point scale is P_i. No two restaurants have the same score. You want to in... | ['N = int(input())\nli = [[i+1] + list(input().split()) for i in range(N)]\n\nprint(li)\nli = sorted(li, key=lambda x:(x[1],-int(x[2])))\nprint(li)\ni = 0\nfor i in range(N):\n print(li[i][0])', 'N = int(input())\nli = [[i+1] + list(input().split()) for i in range(N)]\n\nli = sorted(li, key=lambda x:(x[1],-int(x[2])... | ['Wrong Answer', 'Accepted'] | ['s779147460', 's222434962'] | [3064.0, 3060.0] | [18.0, 17.0] | [185, 165] |
p03030 | u153335839 | 2,000 | 1,048,576 | You have decided to write a book introducing good restaurants. There are N restaurants that you want to introduce: Restaurant 1, Restaurant 2, ..., Restaurant N. Restaurant i is in city S_i, and your assessment score of that restaurant on a 100-point scale is P_i. No two restaurants have the same score. You want to in... | ['n = int(input())\nls = []\nls2 = []\ncount = 0\nwhile count < n:\n ab = input().split()\n a, b = str(ab[0]), int(ab[1])\n ls.append([a, b])\n ls2.append([a, b])\n count = count + 1\nls2.sort(key=lambda x: x[1], reverse=True)\nls2.sort(key=lambda x: x[0])\nans = []\nfor s in ls:\n for i, hoge in enum... | ['Wrong Answer', 'Accepted'] | ['s044968951', 's005865859'] | [3064.0, 3064.0] | [18.0, 18.0] | [392, 392] |
p03030 | u155174554 | 2,000 | 1,048,576 | You have decided to write a book introducing good restaurants. There are N restaurants that you want to introduce: Restaurant 1, Restaurant 2, ..., Restaurant N. Restaurant i is in city S_i, and your assessment score of that restaurant on a 100-point scale is P_i. No two restaurants have the same score. You want to in... | ['n = int(input())\nsp = [[i+1] + list(input().split()) for i in range(n)]\n\nfor sorted_sp in sorted(sp, key=lambda x: (x[1], -int(x[2]))):\n print(sorted_sp)', 'n = int(input())\nsp = [[i+1] + list(input().split()) for i in range(n)]\n\nfor sorted_sp in sorted(sp, key=lambda x: (x[1], -int(x[2]))):\n print(sort... | ['Wrong Answer', 'Accepted'] | ['s616570779', 's523288631'] | [3060.0, 3060.0] | [17.0, 17.0] | [156, 159] |
p03030 | u156383602 | 2,000 | 1,048,576 | You have decided to write a book introducing good restaurants. There are N restaurants that you want to introduce: Restaurant 1, Restaurant 2, ..., Restaurant N. Restaurant i is in city S_i, and your assessment score of that restaurant on a 100-point scale is P_i. No two restaurants have the same score. You want to in... | ['n=int(input())\na=[]\nfor i in range(n):\n b,c=input().split()\n c=int(c)\n a.append([b,c])\nsa=sorted(a)\nsa.append(["STOP"])\nssa=[]\nssaa=[]\nwhile len(sa)>1:\n while True:\n ssa.append(sa[0])\n sa=sa[1:]\n if ssa[-1][0]!=sa[0][0] or sa[0]=="STOP":\n break\n ssa=ssa[:... | ['Wrong Answer', 'Accepted'] | ['s105027997', 's830345298'] | [3064.0, 3064.0] | [18.0, 18.0] | [397, 397] |
p03030 | u159228113 | 2,000 | 1,048,576 | You have decided to write a book introducing good restaurants. There are N restaurants that you want to introduce: Restaurant 1, Restaurant 2, ..., Restaurant N. Restaurant i is in city S_i, and your assessment score of that restaurant on a 100-point scale is P_i. No two restaurants have the same score. You want to in... | ['lst = [input().split()+[str(i+1)] for i in range(int(input()))]\nprint("\\n".join([i[2] for i in sorted(lst, key=lambda x:(-1*int(x[1]), x[0]))]))', 'print("\\n".join([i[2] for i in sorted([input().split()+[str(i+1)] for i in range(int(input()))], key=lambda x:(x[0], -1*int(x[1])))]))'] | ['Wrong Answer', 'Accepted'] | ['s761965267', 's761558102'] | [3060.0, 3060.0] | [17.0, 17.0] | [144, 134] |
p03030 | u160459241 | 2,000 | 1,048,576 | You have decided to write a book introducing good restaurants. There are N restaurants that you want to introduce: Restaurant 1, Restaurant 2, ..., Restaurant N. Restaurant i is in city S_i, and your assessment score of that restaurant on a 100-point scale is P_i. No two restaurants have the same score. You want to in... | ['n = int(input())\n\na = [input().split() for i in range(n)]\n\nli=[]\nfor i in range(n):\n li.append([a[i][0],100- int(a[i][1]), i+1])\n print(li)\n\nli.sort()\n\nfor i in range(n):\n print("{}\\n".format(li[i][2]))', 'n = int(input())\n\na = [input().split() for i in range(n)]\n\nli=[]\nfor i in range(n):\n ... | ['Wrong Answer', 'Accepted'] | ['s565097689', 's667586011'] | [3060.0, 3060.0] | [20.0, 18.0] | [209, 193] |
p03030 | u161201983 | 2,000 | 1,048,576 | You have decided to write a book introducing good restaurants. There are N restaurants that you want to introduce: Restaurant 1, Restaurant 2, ..., Restaurant N. Restaurant i is in city S_i, and your assessment score of that restaurant on a 100-point scale is P_i. No two restaurants have the same score. You want to in... | ['n = int(input())\nx = [input().split() for i in range(n)]\nfor i in range(n):\n x[i][1] = int(x[i][1])\n\nx.sort(key= lambda a: a[1])\nx.sort()\n\nprint(x)', 'n = int(input())\nx = [input().split() for i in range(n)]\nfor i in range(n):\n x[i][1] = int(x[i][1])\n x[i].append(i+1)\n\nx.sort(key= lambda a: a[1... | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s016627273', 's656252348', 's701508706'] | [9104.0, 9136.0, 9188.0] | [28.0, 27.0, 23.0] | [150, 201, 231] |
p03030 | u163421511 | 2,000 | 1,048,576 | You have decided to write a book introducing good restaurants. There are N restaurants that you want to introduce: Restaurant 1, Restaurant 2, ..., Restaurant N. Restaurant i is in city S_i, and your assessment score of that restaurant on a 100-point scale is P_i. No two restaurants have the same score. You want to in... | ['n = int(input())\ns = list(i, int(j) for i, j in map(input()))\nans = [s.index(i)+1 for i in sorted(s, key=lambda x:(x[0], -x[1]))]\nprint(i) for i in ans', 'n = int(input())\ns = list(i, int(j) for i, j in input().split())\nans = [s.index(i)+1 for i in sorted(s, key=lambda x:(x[0], -x[1]))]\nprint(i) for i in ans\n'... | ['Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted'] | ['s150207814', 's167869961', 's228416892', 's258989389', 's624357989', 's732929243'] | [8904.0, 8900.0, 8952.0, 8784.0, 8972.0, 8832.0] | [23.0, 22.0, 26.0, 25.0, 20.0, 27.0] | [151, 155, 162, 156, 154, 163] |
p03030 | u163874353 | 2,000 | 1,048,576 | You have decided to write a book introducing good restaurants. There are N restaurants that you want to introduce: Restaurant 1, Restaurant 2, ..., Restaurant N. Restaurant i is in city S_i, and your assessment score of that restaurant on a 100-point scale is P_i. No two restaurants have the same score. You want to in... | ['l = []\nfor i in range(N):\n s, p = input().split()\n l.append([s, int(p), i + 1])\n\nl.sort(key = lambda x: (x[0], -x[1]))\nfor i in l:\n print(i[2])', 'N = int(input())\nl = []\nfor i in range(N):\n s, p = input().split()\n l.append([s, int(p), i + 1])\n\nl.sort(key = lambda x: (x[0], -x[1]))\nfor i ... | ['Runtime Error', 'Accepted'] | ['s148600603', 's736405042'] | [2940.0, 3060.0] | [17.0, 18.0] | [152, 169] |
p03030 | u164474813 | 2,000 | 1,048,576 | You have decided to write a book introducing good restaurants. There are N restaurants that you want to introduce: Restaurant 1, Restaurant 2, ..., Restaurant N. Restaurant i is in city S_i, and your assessment score of that restaurant on a 100-point scale is P_i. No two restaurants have the same score. You want to in... | ['N = int(input())\nS_P = []\nfor i in range(N):\n S , P = input().split()\n S_P.append([ S , int(P) , i])\nS_P.sort( key = lambda x : x[0] )\nstate = S_P[0][0]\nS_P_sort = []\ntemp = []\nfor S , P , i in S_P:\n if S != state:\n temp.sort( key = lambda x : x[1])\n S_P_sort.extend(temp)\n S... | ['Runtime Error', 'Accepted'] | ['s976038355', 's830686049'] | [3064.0, 3064.0] | [18.0, 19.0] | [456, 542] |
p03030 | u167523937 | 2,000 | 1,048,576 | You have decided to write a book introducing good restaurants. There are N restaurants that you want to introduce: Restaurant 1, Restaurant 2, ..., Restaurant N. Restaurant i is in city S_i, and your assessment score of that restaurant on a 100-point scale is P_i. No two restaurants have the same score. You want to in... | ['n=int(input())\nsp=[]\nfor i in range(n):\n temp=list(map(str,input().split())) + [i+1]\n sp.append(temp)\n sp[i][1]=int(sp[i][1])\nsp=sorted(sp,key=lambda x:(x[0],x[1]))\n\nque=[]\nprev_rest=sp[0][0]\nfor i in range(n):\n if prev_rest != sp[i][0]:\n que=sorted(que,key=lambda x:(x[0],x[1]))[::-1]\n... | ['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s410459500', 's441982579', 's749443982', 's752202879', 's771732168'] | [3064.0, 3064.0, 3064.0, 3064.0, 3064.0] | [18.0, 18.0, 18.0, 17.0, 18.0] | [465, 564, 445, 410, 552] |
p03030 | u167681750 | 2,000 | 1,048,576 | You have decided to write a book introducing good restaurants. There are N restaurants that you want to introduce: Restaurant 1, Restaurant 2, ..., Restaurant N. Restaurant i is in city S_i, and your assessment score of that restaurant on a 100-point scale is P_i. No two restaurants have the same score. You want to in... | ['n = int(input())\nsp = [input().split() for i in range(n)]\n\nsorted_sp = sorted(sp,key = lambda x: int(x[1]), reverse=True)\nsorted_sp = sorted(sorted_sp,key = itemgetter(0))\n\nfor i in range(n):\n for j in range(n):\n if sp[j] == sorted_sp[i]:\n print(j+1)', 'from operator import itemgetter\n\... | ['Runtime Error', 'Accepted'] | ['s153045370', 's779944488'] | [3060.0, 3060.0] | [17.0, 19.0] | [271, 304] |
p03030 | u169138653 | 2,000 | 1,048,576 | You have decided to write a book introducing good restaurants. There are N restaurants that you want to introduce: Restaurant 1, Restaurant 2, ..., Restaurant N. Restaurant i is in city S_i, and your assessment score of that restaurant on a 100-point scale is P_i. No two restaurants have the same score. You want to in... | ['from operator import itemgetter\nn=int(input())\nl=[[] for i in range(n)]\nfor i in range(n):\n s,p=input().split()\n l[i].append(s)\n l[i].append(int(p))\n l[i].append(i+1)\nl2=sorted(l)\nl3=sorted(l2,key=itemgetter(1),reverse=True)\nfor i in range(n):\n print(l3[i][2])', 'from operator import itemgetter\nn=int... | ['Wrong Answer', 'Runtime Error', 'Wrong Answer', 'Accepted'] | ['s054735454', 's727794508', 's750328955', 's450617117'] | [3064.0, 3060.0, 3060.0, 3064.0] | [18.0, 18.0, 18.0, 18.0] | [265, 226, 266, 283] |
p03030 | u169696482 | 2,000 | 1,048,576 | You have decided to write a book introducing good restaurants. There are N restaurants that you want to introduce: Restaurant 1, Restaurant 2, ..., Restaurant N. Restaurant i is in city S_i, and your assessment score of that restaurant on a 100-point scale is P_i. No two restaurants have the same score. You want to in... | ['n = int(input())\nsp = []\nfor i in range(n):\n sp.append(input().split())\n sp[i].append(i)\n sp[i][1] = int(sp[i][1])\nsp = sorted(sp, key = lambda x : x[1], reverse = True)\nsp = sorted(sp, key = lambda x : x[0])\nfo ri in range(n):\n print(sp[i][2]+1)', 'n = int(input())\nsp = []\nfor i in range(n):\n... | ['Runtime Error', 'Accepted'] | ['s276586464', 's612342050'] | [2940.0, 3060.0] | [17.0, 20.0] | [258, 258] |
p03030 | u173178698 | 2,000 | 1,048,576 | You have decided to write a book introducing good restaurants. There are N restaurants that you want to introduce: Restaurant 1, Restaurant 2, ..., Restaurant N. Restaurant i is in city S_i, and your assessment score of that restaurant on a 100-point scale is P_i. No two restaurants have the same score. You want to in... | ['n = int(input())\ns = [0]*n\np = [0]*n\nl = [[] for i in range(n)]\n\nfor i in range(n):\n s[i],p[i] = input().split()\n l[i] = [s[i],p[i],i+1]\n\nl.sort(key=lambda x:x[1],reverse = True)\nprint(l)\nl.sort(key=lambda x:x[0])\nprint(l)\nfor i in l:\n print(i[2])', 'n = int(input())\ns = [0]*n\np = [0]*n\nl = ... | ['Wrong Answer', 'Accepted'] | ['s188124934', 's855894979'] | [3064.0, 3064.0] | [18.0, 17.0] | [256, 244] |
p03030 | u173720816 | 2,000 | 1,048,576 | You have decided to write a book introducing good restaurants. There are N restaurants that you want to introduce: Restaurant 1, Restaurant 2, ..., Restaurant N. Restaurant i is in city S_i, and your assessment score of that restaurant on a 100-point scale is P_i. No two restaurants have the same score. You want to in... | ['N = int(input())\nS = [[i for i in input().split()] for i in range(N)]\n\nfor i in range(N):\n S[i][1] = -int(S[i][1])\n\ns = sorted(S)\n\nfor i in range(N):\n print(s.index(s[i]) + 1)\n', 'N = int(input())\nS = [[i for i in input().split()] for i in range(N)]\n\nfor i in range(N):\n S[i][1] = -int(S[i][1])\... | ['Wrong Answer', 'Accepted'] | ['s616081950', 's847588168'] | [3060.0, 3060.0] | [17.0, 17.0] | [182, 182] |
p03030 | u175034939 | 2,000 | 1,048,576 | You have decided to write a book introducing good restaurants. There are N restaurants that you want to introduce: Restaurant 1, Restaurant 2, ..., Restaurant N. Restaurant i is in city S_i, and your assessment score of that restaurant on a 100-point scale is P_i. No two restaurants have the same score. You want to in... | ['n = int(input())\nd = {}\nfor i in range(n):\n s, p = input().split()\n p = int(p)\n if s not in d:\n d[s] = [[p, i+1]]\n else:\n d[s] += [[p, i+1]]\n\nfor v in d.values():\n v.sort(reverse=True)\n for a in v:\n print(a[1])', 'n = int(input())\nd = {}\nfor i in range(n):\n s,... | ['Wrong Answer', 'Accepted'] | ['s832154145', 's918057771'] | [3060.0, 3060.0] | [17.0, 18.0] | [249, 261] |
p03030 | u175590965 | 2,000 | 1,048,576 | You have decided to write a book introducing good restaurants. There are N restaurants that you want to introduce: Restaurant 1, Restaurant 2, ..., Restaurant N. Restaurant i is in city S_i, and your assessment score of that restaurant on a 100-point scale is P_i. No two restaurants have the same score. You want to in... | ['n = int(input())\nx = [list(input().split(""))for i in range(n)]\n\nfor i in range(n):\n x[i][1] = int(x[i][1])\n\ntest2 = sorted(x,key = lambda k :(k[0],-k[1]))\n\nfor i in range(n):\n print(x.index(test2[i])+1)', 'n = int(input())\nx = [[input().split(),i+1]for i in range(n)]\nx = sorted(x, key = lambda x:(x[... | ['Runtime Error', 'Accepted'] | ['s305759044', 's556915739'] | [3064.0, 3060.0] | [18.0, 18.0] | [209, 153] |
p03030 | u176445062 | 2,000 | 1,048,576 | You have decided to write a book introducing good restaurants. There are N restaurants that you want to introduce: Restaurant 1, Restaurant 2, ..., Restaurant N. Restaurant i is in city S_i, and your assessment score of that restaurant on a 100-point scale is P_i. No two restaurants have the same score. You want to in... | ['n = int(input())\narr = [0]*n\n\nfor i in range(n):\n\tcity, score = input().split()\n arr[i] = [city, int(score), i+1]\narr.sort(key = lambda x: (x[0], -x[1]))\nfor ele in arr:\n print(arr[2])', 'n = int(input())\n\narr= [0]*n\n\nfor i in range(n):\n\tcity, score = input().split()\n\tarr[i] = [city, int(score), ... | ['Runtime Error', 'Accepted'] | ['s473868460', 's514778981'] | [2940.0, 3316.0] | [17.0, 40.0] | [188, 185] |
p03030 | u178192749 | 2,000 | 1,048,576 | You have decided to write a book introducing good restaurants. There are N restaurants that you want to introduce: Restaurant 1, Restaurant 2, ..., Restaurant N. Restaurant i is in city S_i, and your assessment score of that restaurant on a 100-point scale is P_i. No two restaurants have the same score. You want to in... | ["import pandas as pd\nn = int(input())\nshops = [0]*n\npoints = [0]*n\nnums = [i for i in range(1,n+1)]\nfor i in range(n):\n shops[i],points[i] = input().split()\nd = pd.DataFrame({'shops':shops,'points':points,'nums':nums}) \nl = d.sort_values('shops').sort_values('points', ascending=False)['nums'].tolist()\nf... | ['Runtime Error', 'Accepted'] | ['s936005196', 's957702564'] | [3064.0, 3060.0] | [17.0, 17.0] | [347, 214] |
p03030 | u178432859 | 2,000 | 1,048,576 | You have decided to write a book introducing good restaurants. There are N restaurants that you want to introduce: Restaurant 1, Restaurant 2, ..., Restaurant N. Restaurant i is in city S_i, and your assessment score of that restaurant on a 100-point scale is P_i. No two restaurants have the same score. You want to in... | ['n = int(input())\nw = list(map(int, input().split()))\ns = float("inf")\nfor i in range(1,n):\n x = abs(sum(w[0:i])-sum(w[i:n]))\n if x < s:\n s = x\nprint(s)', 'n = int(input())\ns = list()\nfor i in range(n):\n a,b = input().split()\n b = int(b) * -1\n s.append([a,b])\nh = sorted(s)\nfor i in ... | ['Runtime Error', 'Accepted'] | ['s650311960', 's660276735'] | [3060.0, 3060.0] | [18.0, 18.0] | [164, 172] |
p03030 | u181195295 | 2,000 | 1,048,576 | You have decided to write a book introducing good restaurants. There are N restaurants that you want to introduce: Restaurant 1, Restaurant 2, ..., Restaurant N. Restaurant i is in city S_i, and your assessment score of that restaurant on a 100-point scale is P_i. No two restaurants have the same score. You want to in... | ['N= int(input())\nli = list()\n\nfor i in range(N):\n res,score = input().split()\n score = int(score)\n li.append([res,score,i+1])\n \nli.sort()\n\nfor i in li:\n print(i[2])', 'N= int(input())\nli = list()\n\nfor i in range(N):\n res,score = input().split()\n score = int(score)\n li.append([res,-score,i+1])\... | ['Wrong Answer', 'Accepted'] | ['s594307692', 's772135635'] | [3060.0, 3060.0] | [17.0, 18.0] | [168, 170] |
p03030 | u188244611 | 2,000 | 1,048,576 | You have decided to write a book introducing good restaurants. There are N restaurants that you want to introduce: Restaurant 1, Restaurant 2, ..., Restaurant N. Restaurant i is in city S_i, and your assessment score of that restaurant on a 100-point scale is P_i. No two restaurants have the same score. You want to in... | ["# ABC 128, B - guidebook\nfrom operator import itemgetter\n\nn = int(input())\n\nX = []\nfor i in range(n):\n tmp = input().split(' ')\n X.append((tmp[0], -int(tmp[1])))\n\nY = sorted(X, key=itemgetter(0,1))\nfor x in X:\n print(Y.index(x)+1)\n", "# ABC 128, B - guidebook\nfrom operator import itemgetter\n\n... | ['Wrong Answer', 'Accepted'] | ['s315195897', 's511832903'] | [3060.0, 3060.0] | [18.0, 18.0] | [240, 241] |
p03030 | u189479417 | 2,000 | 1,048,576 | You have decided to write a book introducing good restaurants. There are N restaurants that you want to introduce: Restaurant 1, Restaurant 2, ..., Restaurant N. Restaurant i is in city S_i, and your assessment score of that restaurant on a 100-point scale is P_i. No two restaurants have the same score. You want to in... | ['N = int(input())\nS = []\nP = []\nfor i in range(N):\n tmp_S, tmp_P = input().split()\n S.append(tmp_S)\n P.append(int(tmp_P)*(-1))\n\nindex = [i for i in range(1,N+1)]\n\nZIP = zip(P, index, S)\n\nZIP = sorted(ZIP)\n\nP, index, S = zip(*ZIP)\n\nfor i in range(N):\n print(index[i])\n print(S[i])\n\nZIP... | ['Wrong Answer', 'Accepted'] | ['s431026054', 's684033117'] | [3064.0, 3064.0] | [17.0, 18.0] | [395, 277] |
p03030 | u193598069 | 2,000 | 1,048,576 | You have decided to write a book introducing good restaurants. There are N restaurants that you want to introduce: Restaurant 1, Restaurant 2, ..., Restaurant N. Restaurant i is in city S_i, and your assessment score of that restaurant on a 100-point scale is P_i. No two restaurants have the same score. You want to in... | ['N = int(input())\nrestaurants = []\n\nfor i in range(N):\n index = i + 1\n S, P = input().split()\n\n restaurants.append( (index, str(S), int(P)) )\n\nrestaurants = sorted(restaurants, key=lambda x:(x[1], x[2]))\n\nfor i in range(N):\n print (restaurants[i][0])\n', 'N = int(input())\nrestaurants = []\n\nf... | ['Wrong Answer', 'Accepted'] | ['s606540019', 's028711145'] | [3060.0, 3060.0] | [17.0, 18.0] | [262, 342] |
p03030 | u195355592 | 2,000 | 1,048,576 | You have decided to write a book introducing good restaurants. There are N restaurants that you want to introduce: Restaurant 1, Restaurant 2, ..., Restaurant N. Restaurant i is in city S_i, and your assessment score of that restaurant on a 100-point scale is P_i. No two restaurants have the same score. You want to in... | ['input1 = int(input())\n\nLIST = []\n\nfor i in range(input1):\n input2 = input()\n TOWN = input2.split()[0]\n SCORE = int(input2.split()[1])\n NUM = i\n LIST.append([TOWN,SCORE,NUM])\n\nLIST.sort()\n\nLIST_TOWN = []\nfor i in range(input1):\n LIST_TOWN.append(LIST[i][0])\nLIST_TOWN = list(set(LIST_T... | ['Wrong Answer', 'Accepted'] | ['s989815812', 's316917898'] | [3064.0, 3060.0] | [18.0, 17.0] | [641, 229] |
p03030 | u196697332 | 2,000 | 1,048,576 | You have decided to write a book introducing good restaurants. There are N restaurants that you want to introduce: Restaurant 1, Restaurant 2, ..., Restaurant N. Restaurant i is in city S_i, and your assessment score of that restaurant on a 100-point scale is P_i. No two restaurants have the same score. You want to in... | ["from collections import defaultdict\n\nN = int(input())\nS = [0] * N\nP = [0] * N\n\ncity_point = {}\n\nfor i in range(N):\n inp = input().split()\n S[i] = inp[0]\n P[i] = inp[1]\n city_point[i] = {'city': S[i], 'point': int(P[i])}\n \nsorted_list = sorted(city_point.items(), key=lambda x: (x[1]['city'... | ['Wrong Answer', 'Runtime Error', 'Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s537583488', 's596332506', 's652064334', 's803166488', 's621384999'] | [3436.0, 3316.0, 3064.0, 3316.0, 3060.0] | [21.0, 21.0, 17.0, 21.0, 18.0] | [372, 367, 351, 318, 239] |
p03030 | u204904256 | 2,000 | 1,048,576 | You have decided to write a book introducing good restaurants. There are N restaurants that you want to introduce: Restaurant 1, Restaurant 2, ..., Restaurant N. Restaurant i is in city S_i, and your assessment score of that restaurant on a 100-point scale is P_i. No two restaurants have the same score. You want to in... | ['n = int(input())\nSP = []\nfor i in range(n):\n sp = input().split()\n sp.append(i+1)\n SP.append(sp)\nsortedSP = sorted(SP, key = lambda x:x[0])\nfor i in range(n-1):\n for j in range(n-1-i):\n if sortedSP[j][0] == sortedSP[j+1][0] and int(sortedSP[j][1]) < int(sortedSP[j+1][1]):\n sortedSP[j], sortedSP[... | ['Wrong Answer', 'Accepted'] | ['s793474023', 's884329179'] | [3064.0, 3188.0] | [21.0, 22.0] | [400, 384] |
p03030 | u209619667 | 2,000 | 1,048,576 | You have decided to write a book introducing good restaurants. There are N restaurants that you want to introduce: Restaurant 1, Restaurant 2, ..., Restaurant N. Restaurant i is in city S_i, and your assessment score of that restaurant on a 100-point scale is P_i. No two restaurants have the same score. You want to in... | ['A=[]\np = int(input())\nfor i in range(p):\n j,k = input().split()\n A.append([j,k,i+1])\nA = sorted(A)\nfor j,k,l in A:\n print(l)', 'A=[]\np = int(input())\nfor i in range(p):\n j,k = input().split()\n A.append([j,i+1,k])\nA = sorted(A,reverse = False)\nfor j,k,l in A:\n print(k)', 'A=[]\np = int(input())\nfo... | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s065305904', 's816856715', 's854051763'] | [3060.0, 3060.0, 3060.0] | [17.0, 17.0, 17.0] | [127, 143, 133] |
p03030 | u210827208 | 2,000 | 1,048,576 | You have decided to write a book introducing good restaurants. There are N restaurants that you want to introduce: Restaurant 1, Restaurant 2, ..., Restaurant N. Restaurant i is in city S_i, and your assessment score of that restaurant on a 100-point scale is P_i. No two restaurants have the same score. You want to in... | ['n=int(input())\nx=[]\nfor i in range(n):\n key,val=map(str,input().split())\n x.append([key,-int(val),i+1])\ndic_sort=sorted(x, key=lambda x:(x[0],x[1]))\nprint(dic_sort)\nfor i in range(n):\n print(dic_sort[i][2])', 'n=int(input())\nx=[]\nfor i in range(n):\n key,val=map(str,input().split())\n x.appen... | ['Wrong Answer', 'Accepted'] | ['s836940715', 's040297162'] | [3060.0, 3064.0] | [18.0, 17.0] | [215, 199] |
p03030 | u213401801 | 2,000 | 1,048,576 | You have decided to write a book introducing good restaurants. There are N restaurants that you want to introduce: Restaurant 1, Restaurant 2, ..., Restaurant N. Restaurant i is in city S_i, and your assessment score of that restaurant on a 100-point scale is P_i. No two restaurants have the same score. You want to in... | ['N = int(input())\nlist = [None]*N\nfor i in range(N):\n s, P = input().split()\n list[i]=(i,s,int(p)*-1)\nfor i in sorted(list, key = lambda x: (x[1],x[2])):\n print(i[0]+1)', 'N = int(input())\nlist = [None]*N\nfor i in range(N):\n s, P = input().split()\n list[i]=(i,s,int(p)*-1)\nfor i in sorted(list, key = la... | ['Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted'] | ['s180266429', 's567044234', 's608157324', 's602072456'] | [3060.0, 2940.0, 2940.0, 3060.0] | [17.0, 17.0, 17.0, 17.0] | [170, 169, 169, 170] |
p03030 | u214434454 | 2,000 | 1,048,576 | You have decided to write a book introducing good restaurants. There are N restaurants that you want to introduce: Restaurant 1, Restaurant 2, ..., Restaurant N. Restaurant i is in city S_i, and your assessment score of that restaurant on a 100-point scale is P_i. No two restaurants have the same score. You want to in... | ['n = int(input())\nlis = []\nfor i in range(n):\n s,p = input().split()\n lis.append((s,int(p),i))\nfrom operator import itemgetter\nlis = sorted(lis,key=itemgetter(0))\nlis = sorted(lis,key=itemgetter(1),reverse=True)\nfor i in range(n):\n print(lis[i][2])', 'n = int(input())\nlis = []\nfor i in range(1,n+1)... | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s227195333', 's551027137', 's183026602'] | [3064.0, 3064.0, 3064.0] | [18.0, 18.0, 18.0] | [256, 260, 260] |
p03030 | u218487880 | 2,000 | 1,048,576 | You have decided to write a book introducing good restaurants. There are N restaurants that you want to introduce: Restaurant 1, Restaurant 2, ..., Restaurant N. Restaurant i is in city S_i, and your assessment score of that restaurant on a 100-point scale is P_i. No two restaurants have the same score. You want to in... | ['# -*- coding: utf-8 -*-\n\nN = int(input())\ndi = {}\n\nfor i in range(N):\n tmp = input().split()\n di[i] = tmp\n\ndi_sorted = sorted(di.items(), key=lambda x: x[1][0])\ndi_sorted = sorted(di.items(), key=lambda x: x[1][1])\n\nfor i, j in di_sorted:\n print(i+1)', '# -*- coding: utf-8 -*-\n\nN = int(input()... | ['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s839903921', 's946308257', 's957238497', 's943098690'] | [3060.0, 3060.0, 3060.0, 3060.0] | [18.0, 18.0, 17.0, 18.0] | [259, 274, 279, 266] |
p03030 | u219466830 | 2,000 | 1,048,576 | You have decided to write a book introducing good restaurants. There are N restaurants that you want to introduce: Restaurant 1, Restaurant 2, ..., Restaurant N. Restaurant i is in city S_i, and your assessment score of that restaurant on a 100-point scale is P_i. No two restaurants have the same score. You want to in... | ['n = int(input())\n# a, p = list(map(int, input().split()))\n# a = list(map(int, input().split()))\n\nS = [list(input().split()) for i in range(n)]\n\n# for i, s in enumerate(S):\n# s.append(i+1)\n\nS = sorted(S, key=lambda x: x[1], reverse=True)\nS = sorted(S, key=lambda x: x[0], reverse=False)\n\nfor s, p, n in ... | ['Runtime Error', 'Accepted'] | ['s486424874', 's247358046'] | [3060.0, 3060.0] | [18.0, 18.0] | [378, 379] |
p03030 | u221345507 | 2,000 | 1,048,576 | You have decided to write a book introducing good restaurants. There are N restaurants that you want to introduce: Restaurant 1, Restaurant 2, ..., Restaurant N. Restaurant i is in city S_i, and your assessment score of that restaurant on a 100-point scale is P_i. No two restaurants have the same score. You want to in... | ["N = int(input())\n\nlists = []\nfor _ in range (N):\n S = input().split(' ')\n lists.append(S)\n\nlist_sorted = lists.copy()\nlist_sorted.sort()\nfor result in range(N):\n for sorted in range (N):\n if lists[result] == list_sorted[sorted]:\n print(sorted+1)", "N = int(input())\n\nlists = []... | ['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s171257842', 's193635995', 's693638030', 's270029148'] | [3060.0, 3060.0, 3060.0, 3064.0] | [19.0, 19.0, 19.0, 18.0] | [272, 331, 324, 347] |
p03030 | u223555291 | 2,000 | 1,048,576 | You have decided to write a book introducing good restaurants. There are N restaurants that you want to introduce: Restaurant 1, Restaurant 2, ..., Restaurant N. Restaurant i is in city S_i, and your assessment score of that restaurant on a 100-point scale is P_i. No two restaurants have the same score. You want to in... | ['n=int(input())\na=[]\n\nfor i in range(n):\n s,p=input().split()\n a.append([s,100-int(p)])\nprint(a)\ncity=sorted(a) \nprint(city)\nfor i in city:\n print(a.index(i)+1)\n', 'N=int(input())\na=[]\nfor i in range(N):\n s,p=input().split()\n p=int(p)\n \n a.append((s,-p,i+1))\na.sort()\nfor i in ... | ['Wrong Answer', 'Accepted'] | ['s644928998', 's254744720'] | [3060.0, 8960.0] | [18.0, 28.0] | [171, 194] |
p03030 | u225388820 | 2,000 | 1,048,576 | You have decided to write a book introducing good restaurants. There are N restaurants that you want to introduce: Restaurant 1, Restaurant 2, ..., Restaurant N. Restaurant i is in city S_i, and your assessment score of that restaurant on a 100-point scale is P_i. No two restaurants have the same score. You want to in... | ["n=int(input())\na=[list(input().split())+[i] for i in range(n)]\nfor i in range(n):\n a[i][1]=-int(a[i][1])\na.sort()\nans=[0]*n\nfor i in range(n):\n ans[a[i][2]]=i+1\nprint(*ans,sep='¥n')", "n=int(input())\na=[list(input().split())+[i] for i in range(n)]\nfor i in range(n):\n a[i][1]=-int(a[i][1])\na.sort()\nans... | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s181711297', 's422725990', 's354390856'] | [3188.0, 3064.0, 3060.0] | [18.0, 17.0, 17.0] | [184, 183, 129] |
p03030 | u225627575 | 2,000 | 1,048,576 | You have decided to write a book introducing good restaurants. There are N restaurants that you want to introduce: Restaurant 1, Restaurant 2, ..., Restaurant N. Restaurant i is in city S_i, and your assessment score of that restaurant on a 100-point scale is P_i. No two restaurants have the same score. You want to in... | ['N = int(input())\n\nSP = []\nfor i in range(N):\n str = input().split()\n SP.append([str[0] ,int(str[1])*-1,i])\n\nSP.sort()\n\nprint(SP)\nfor i in range(N):\n print(SP[i][2]+1)', 'N = int(input())\n\nSP = []\nfor i in range(N):\n str = input().split()\n SP.append([str[0] ,int(str[1])*-1,i])\n\nSP.sort... | ['Wrong Answer', 'Accepted'] | ['s378965567', 's964170831'] | [3060.0, 3064.0] | [17.0, 18.0] | [175, 165] |
p03030 | u226912938 | 2,000 | 1,048,576 | You have decided to write a book introducing good restaurants. There are N restaurants that you want to introduce: Restaurant 1, Restaurant 2, ..., Restaurant N. Restaurant i is in city S_i, and your assessment score of that restaurant on a 100-point scale is P_i. No two restaurants have the same score. You want to in... | ['from operator import itemgetter\n\nN = int(input())\nX=[]\nS=[]\nP=[]\n\nfor n in range(N):\n X.append([n+1])\n\nfor n in range(N):\n s, p = map(str, input().split())\n S.append(s)\n P.append(p)\n\nfor n, s in enumerate(S):\n X[n].append(s)\n\nfor n, p in enumerate(P):\n X[n].append(p)\n\nY =sorted(... | ['Wrong Answer', 'Accepted'] | ['s947781985', 's909518440'] | [3064.0, 3064.0] | [18.0, 18.0] | [401, 366] |
p03030 | u233183615 | 2,000 | 1,048,576 | You have decided to write a book introducing good restaurants. There are N restaurants that you want to introduce: Restaurant 1, Restaurant 2, ..., Restaurant N. Restaurant i is in city S_i, and your assessment score of that restaurant on a 100-point scale is P_i. No two restaurants have the same score. You want to in... | ['n=int(input())\nrows=sorted([input().split() for i in range(n)])\nrows.sort(key=lambda x: x[1], reverse=True)\nprint(rows)', 'n=int(input())\nrows=sorted([input().split() for i in range(n)])\nrows.sort(key=lambda x: x[1], reverse=True)\nprint(rows)', 'n=int(input())\nrows=[input() for i in range(n)] \nprint(sorted(ro... | ['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s310454318', 's539298342', 's712443902', 's841871124', 's438039915'] | [2940.0, 3060.0, 2940.0, 3060.0, 3060.0] | [18.0, 18.0, 18.0, 17.0, 18.0] | [119, 119, 68, 181, 180] |
p03030 | u233720439 | 2,000 | 1,048,576 | You have decided to write a book introducing good restaurants. There are N restaurants that you want to introduce: Restaurant 1, Restaurant 2, ..., Restaurant N. Restaurant i is in city S_i, and your assessment score of that restaurant on a 100-point scale is P_i. No two restaurants have the same score. You want to in... | ['N = int(input())\nA = []\nfor i in range(N) :\n S, P = input().split()\n A.append([S])\n A[i].append(100-int(P))\nnew_A_list = sorted(A)\nfor i in range(N) :\n print(new_A_list.index(A[i])+1)', 'N = int(input())\nA = []\nfor i in range(N) :\n S, P = input().split()\n A.append([S])\n A[i].append(1... | ['Wrong Answer', 'Accepted'] | ['s914428057', 's369621429'] | [3060.0, 3060.0] | [17.0, 18.0] | [195, 195] |
p03030 | u235376569 | 2,000 | 1,048,576 | You have decided to write a book introducing good restaurants. There are N restaurants that you want to introduce: Restaurant 1, Restaurant 2, ..., Restaurant N. Restaurant i is in city S_i, and your assessment score of that restaurant on a 100-point scale is P_i. No two restaurants have the same score. You want to in... | ['n=int(input())\nl1=[]\nl2=[]\nfor i in range(n):\n sp=input().rstrip().split()\n l1.append(sp[0])\n l2.append(-int(sp[1]))\nl=list(zip(l1,l2))\n\nans=sorted(l)\nprint(ans)\nfor i in range(len(ans)):\n print(l.index(ans[i])+1)\n\n\n\n', 'n=int(input())\nl=[]\nfor i in range(n):\n s,p=[x for x in input().r... | ['Wrong Answer', 'Accepted'] | ['s057415833', 's085746597'] | [3060.0, 3060.0] | [18.0, 17.0] | [229, 203] |
p03030 | u241159583 | 2,000 | 1,048,576 | You have decided to write a book introducing good restaurants. There are N restaurants that you want to introduce: Restaurant 1, Restaurant 2, ..., Restaurant N. Restaurant i is in city S_i, and your assessment score of that restaurant on a 100-point scale is P_i. No two restaurants have the same score. You want to in... | ['N = int(input())\nA = [input().split() for _ in range(N)]\na = []\nfor i in range(N):\n a.append([A[i][0], 100 - int(A[i][1])])\nA = sorted(a)\nprint(a)\nprint(A)\n\nfor i in range(N):\n print(a.index(A[i])+1)', 'n = int(input())\nspi = []\nfor i in range(n):\n s,p = input().split()\n p = 100-int(p)\n spi.... | ['Wrong Answer', 'Accepted'] | ['s189186967', 's351948789'] | [3064.0, 9108.0] | [17.0, 29.0] | [201, 152] |
p03030 | u243312682 | 2,000 | 1,048,576 | You have decided to write a book introducing good restaurants. There are N restaurants that you want to introduce: Restaurant 1, Restaurant 2, ..., Restaurant N. Restaurant i is in city S_i, and your assessment score of that restaurant on a 100-point scale is P_i. No two restaurants have the same score. You want to in... | ["def main():\n n = int(input())\n ll = list()\n for i in range(n):\n tmp = list(map(str, input().split()))\n tmp[1] = int(tmp[1])\n tmp.append(i+1)\n ll.append(tmp)\n print(ll)\n \n ll_s = sorted(ll, key=lambda x:(x[0],-x[1]))\n print(ll_s)\n for i in ll_s:\n ... | ['Runtime Error', 'Accepted'] | ['s524326695', 's563995501'] | [3064.0, 3060.0] | [18.0, 17.0] | [366, 320] |
p03030 | u246253778 | 2,000 | 1,048,576 | You have decided to write a book introducing good restaurants. There are N restaurants that you want to introduce: Restaurant 1, Restaurant 2, ..., Restaurant N. Restaurant i is in city S_i, and your assessment score of that restaurant on a 100-point scale is P_i. No two restaurants have the same score. You want to in... | ['from collections import defaultdict\n\nN = int(input())\ndi = defaultdict(list)\n\nfor n in range(1, N + 1):\n S, P = input().split()\n P = int(P)\n di[S].append({n: P})\n\nli = sorted(di.items(), key=lambda x: x[0])\n\nprint(li)\n\ndi2 = {}\n\nfor tu in li:\n for mini_dict in tu[1]:\n for k, v in ... | ['Wrong Answer', 'Accepted'] | ['s664157490', 's157408156'] | [3564.0, 3316.0] | [25.0, 22.0] | [498, 487] |
p03030 | u247922466 | 2,000 | 1,048,576 | You have decided to write a book introducing good restaurants. There are N restaurants that you want to introduce: Restaurant 1, Restaurant 2, ..., Restaurant N. Restaurant i is in city S_i, and your assessment score of that restaurant on a 100-point scale is P_i. No two restaurants have the same score. You want to in... | ['from operator import itemgetter\nn = int(input())\nrest = []\nfor i in range(n):\n s, p = map(str, input().split())\n rest.append([i+1, s, int(p)])\n\n rest = sorted(rest, key=itemgetter(2), reverse=True)\n rest = sorted(rest, key=itemgetter(1))\n for i in range(n):\n print(rest[i][0])', 'from operator import... | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s258441058', 's302092240', 's970631729'] | [3064.0, 3060.0, 3064.0] | [18.0, 18.0, 18.0] | [284, 276, 326] |
p03030 | u253952966 | 2,000 | 1,048,576 | You have decided to write a book introducing good restaurants. There are N restaurants that you want to introduce: Restaurant 1, Restaurant 2, ..., Restaurant N. Restaurant i is in city S_i, and your assessment score of that restaurant on a 100-point scale is P_i. No two restaurants have the same score. You want to in... | ['n = int(input())\ndic = []\nfor _ in range(n):\n name, point = input().split()\n dic.append((name, int(point)))\n\nsrt = sorted(dic, reverse=True, key=lambda x: x[1])\nsrt = sorted(range(n), key=lambda x: srt[x][0])\n\nfor i in srt:\n print(str(i+1))\n ', 'n = int(input())\ndic = []\nfor _ in range(n):... | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s046633522', 's533828170', 's155325504'] | [3060.0, 3064.0, 3060.0] | [18.0, 18.0, 17.0] | [257, 322, 248] |
p03030 | u255943004 | 2,000 | 1,048,576 | You have decided to write a book introducing good restaurants. There are N restaurants that you want to introduce: Restaurant 1, Restaurant 2, ..., Restaurant N. Restaurant i is in city S_i, and your assessment score of that restaurant on a 100-point scale is P_i. No two restaurants have the same score. You want to in... | ["N = int(input())\nSP = []\nfor _ in range(N):\n SP.append([i for i in input().split()])\nfor n in range(N):\n SP[n][1] = str(100 - int(SP[n][1])).rjust(3,'0')\nSP2 = []\nfor n in range(N):\n SP2.append(SP[0]+SP[1])\nans = sorted(range(len(SP2)), key=lambda k: SP2[k])\nfor i in ans:\n print(i+1)", "N = int... | ['Runtime Error', 'Runtime Error', 'Wrong Answer', 'Runtime Error', 'Runtime Error', 'Wrong Answer', 'Runtime Error', 'Accepted'] | ['s362073503', 's465472427', 's471543245', 's473202685', 's536163853', 's758482558', 's899736413', 's926224361'] | [3188.0, 3064.0, 3060.0, 3064.0, 2940.0, 3060.0, 3064.0, 3188.0] | [18.0, 17.0, 17.0, 18.0, 17.0, 17.0, 17.0, 18.0] | [296, 286, 159, 291, 134, 161, 277, 302] |
p03030 | u260947909 | 2,000 | 1,048,576 | You have decided to write a book introducing good restaurants. There are N restaurants that you want to introduce: Restaurant 1, Restaurant 2, ..., Restaurant N. Restaurant i is in city S_i, and your assessment score of that restaurant on a 100-point scale is P_i. No two restaurants have the same score. You want to in... | ['import collections as cl\n\nN=int(input())\n\nL = []\n\nfor i in range(N):\n S,P_ = input().split()\n P = int(P_)\n \n flg = False\n for j in range(len(L)):\n if L[j][0]>S or (L[j][0]==S and L[j][1]>P):\n L.insert(j,(S,P,i))\n flg = True\n break\n if flg==False:\n L.append((S,P,i))\n \nI... | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s345251630', 's460513725', 's407430328'] | [3316.0, 3316.0, 3316.0] | [22.0, 22.0, 21.0] | [391, 395, 382] |
p03030 | u262525101 | 2,000 | 1,048,576 | You have decided to write a book introducing good restaurants. There are N restaurants that you want to introduce: Restaurant 1, Restaurant 2, ..., Restaurant N. Restaurant i is in city S_i, and your assessment score of that restaurant on a 100-point scale is P_i. No two restaurants have the same score. You want to in... | ['from operator import itemgetter, attrgetter\nN = int(input())\nA = []\nfor i in range(N):\n tmp = input().split()\n A.append([tmp[0],-int(tmp[1]),i])\nA.sort()\nA.sort(key=itemgetter(0,1))\nprint([A[i][2]+1 for i in range(N)])', 'from operator import itemgetter, attrgetter\nN = int(input())\nA = []\nfor i in ra... | ['Wrong Answer', 'Accepted'] | ['s766042645', 's958533401'] | [3060.0, 3060.0] | [18.0, 18.0] | [224, 227] |
p03030 | u263734237 | 2,000 | 1,048,576 | You have decided to write a book introducing good restaurants. There are N restaurants that you want to introduce: Restaurant 1, Restaurant 2, ..., Restaurant N. Restaurant i is in city S_i, and your assessment score of that restaurant on a 100-point scale is P_i. No two restaurants have the same score. You want to in... | ['n = int(input())\ndata = []\nfor i in range(n):\n tw, sc = input().split()\n data.append([tw, int(sc), i+1])\n\ndata.sort()\n\nfor d in data:\n print (d[2])', 'n = int(input())\ndata = []\nfor i in range(n):\n tw, sc = input().split()\n data.append([tw, -int(sc), i+1])\n\ndata.sort()\n\nfor d in data:\... | ['Wrong Answer', 'Accepted'] | ['s510164045', 's903275613'] | [3060.0, 3060.0] | [20.0, 17.0] | [156, 157] |
p03030 | u268318377 | 2,000 | 1,048,576 | You have decided to write a book introducing good restaurants. There are N restaurants that you want to introduce: Restaurant 1, Restaurant 2, ..., Restaurant N. Restaurant i is in city S_i, and your assessment score of that restaurant on a 100-point scale is P_i. No two restaurants have the same score. You want to in... | ['from operator import itemgetter\n\nn = int(input())\nA = []\ncity = []\nfor _ in range(n):\n s,p = input().split()\n city.append([s,-int(p)])\n A.append([s,-int(p)])\n\nA = sorted(A, key=itemgetter(0,1))\nfor c in city:\n print(A.index(c)+1)', 'from operator import itemgetter\n\nn = int(input())\nA = []\n... | ['Wrong Answer', 'Accepted'] | ['s494372716', 's812144508'] | [3064.0, 3064.0] | [18.0, 18.0] | [241, 241] |
p03030 | u273010357 | 2,000 | 1,048,576 | You have decided to write a book introducing good restaurants. There are N restaurants that you want to introduce: Restaurant 1, Restaurant 2, ..., Restaurant N. Restaurant i is in city S_i, and your assessment score of that restaurant on a 100-point scale is P_i. No two restaurants have the same score. You want to in... | ["N = int(input())\nS, P = ['0']*N, [0]*N\nSP = []\nfor i in range(N):\n tmp_s, tmp_p = map(str, input().split())\n S[i], P[i] = tmp_s, tmp_p\n SP.append((tmp_s,int(tmp_p)))\n\n\nSSP = sorted(SP, key=itemgetter(1), reverse=True)\n\nSSP = sorted(SSP, key=itemgetter(0))\n\nanswer = [0]*N\nfor i in range(N):\n ... | ['Runtime Error', 'Accepted'] | ['s576176119', 's174281259'] | [3064.0, 3064.0] | [17.0, 19.0] | [461, 503] |
p03030 | u276115223 | 2,000 | 1,048,576 | You have decided to write a book introducing good restaurants. There are N restaurants that you want to introduce: Restaurant 1, Restaurant 2, ..., Restaurant N. Restaurant i is in city S_i, and your assessment score of that restaurant on a 100-point scale is P_i. No two restaurants have the same score. You want to in... | ['# ABC 128: B – Guidebook\nfrom operator import itemgetter\n\nn = int(input(0))\n\ns = []\np = []\n\nfor _ in range(n):\n tmp = [s for s in input().split()]\n s.append(tmp[0])\n p.append(int(tmp[1]))\n\nrestaurants = []\nfor i in range(n):\n restaurants.append([i + 1, s[i], p[i]])\n\nrestaurants.sort(key=i... | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s569185291', 's635002695', 's098803406'] | [3064.0, 3064.0, 3060.0] | [18.0, 18.0, 17.0] | [415, 415, 274] |
p03030 | u277353449 | 2,000 | 1,048,576 | You have decided to write a book introducing good restaurants. There are N restaurants that you want to introduce: Restaurant 1, Restaurant 2, ..., Restaurant N. Restaurant i is in city S_i, and your assessment score of that restaurant on a 100-point scale is P_i. No two restaurants have the same score. You want to in... | ["number=int(input())\nbook=[]\nfor i in range(0,number):\n book.append((input().split()).append(i+1))\nbook1=list.sort(book,key=lambda x: x[1],reverse=True)\nbook2=book2.sort()\nfor i in range(0,len(book2)):\n print(book[i][2],'\\n')\n ", 'number=int(input())\nbook=[]\nfor i in range(0,number):\n book.append(input... | ['Runtime Error', 'Wrong Answer', 'Accepted'] | ['s071384698', 's439871922', 's919260418'] | [2940.0, 3064.0, 3064.0] | [17.0, 17.0, 17.0] | [229, 296, 297] |
p03030 | u280978334 | 2,000 | 1,048,576 | You have decided to write a book introducing good restaurants. There are N restaurants that you want to introduce: Restaurant 1, Restaurant 2, ..., Restaurant N. Restaurant i is in city S_i, and your assessment score of that restaurant on a 100-point scale is P_i. No two restaurants have the same score. You want to in... | ['n = int(input())\nSP = []\nfor i in range(n):\n s,p = input().split()\n SP.append([i+1,s,int(p)])\n \nfrom operator import itemgetter\n\nSP.sort(key = itemgetter(2))\nSP.sort(key = itemgetter(1))\nfor j,s,p in SP:\n print(j)', 'n = int(input())\nSP = []\nfor i in range(n):\n s,p = input().split()\n ... | ['Wrong Answer', 'Accepted'] | ['s240781174', 's713436343'] | [3188.0, 3060.0] | [18.0, 19.0] | [225, 240] |
p03030 | u281610856 | 2,000 | 1,048,576 | You have decided to write a book introducing good restaurants. There are N restaurants that you want to introduce: Restaurant 1, Restaurant 2, ..., Restaurant N. Restaurant i is in city S_i, and your assessment score of that restaurant on a 100-point scale is P_i. No two restaurants have the same score. You want to in... | ['n = int(input())\nl = [0] * n\nfor i in range(n):\n l[i] = list(map(str, input().split()))\n l[i][1] = int(l[i][1])\nl_sorted = sorted(l, key=lambda l: l[1], reverse=True)\nl_sorted = sorted(l_sorted, key=lambda l: l[0])\nprint(l_sorted)\nfor i in range(len(l)):\n print(l.index(l_sorted[i]) + 1)', 'n = int(i... | ['Wrong Answer', 'Accepted'] | ['s608127091', 's327581919'] | [3064.0, 3060.0] | [18.0, 18.0] | [296, 282] |
p03030 | u282228874 | 2,000 | 1,048,576 | You have decided to write a book introducing good restaurants. There are N restaurants that you want to introduce: Restaurant 1, Restaurant 2, ..., Restaurant N. Restaurant i is in city S_i, and your assessment score of that restaurant on a 100-point scale is P_i. No two restaurants have the same score. You want to in... | ['n = int(input())\nSPN = []\nfor i in range(n):\n s,p = input().split()\n SPN.append([s,int(p),i+1])\nSPN = sorted(sorted(SPN, key=lambda x:x[1], reverse=1), lambda x:x[0])\nfor s,p,n in SPN:\n print(n)\n', 'N = int(input())\nL = []\nfor i in range(N):\n S,P = input().split()\n L.append([S,-int(P),i+1])... | ['Runtime Error', 'Accepted'] | ['s067929564', 's028242575'] | [2940.0, 3060.0] | [17.0, 18.0] | [204, 134] |
p03030 | u288430479 | 2,000 | 1,048,576 | You have decided to write a book introducing good restaurants. There are N restaurants that you want to introduce: Restaurant 1, Restaurant 2, ..., Restaurant N. Restaurant i is in city S_i, and your assessment score of that restaurant on a 100-point scale is P_i. No two restaurants have the same score. You want to in... | ['n = int(input())\nl = list(list(input().split()) for i in range(n))\na = sorted(l)\nprint(a)\nfor i in range(n-1):\n if a[i][0]==a[i+1][0]:\n x = a[i][1]\n a[i][1] = a[i+1][1]\n a[i+1][1]= x\nprint(a)', 'n = int(input())\nl = list(list(input().split()) for i in range(n))\na = sorted(l)\nfor i in range(n):\n... | ['Wrong Answer', 'Accepted'] | ['s269813620', 's701168633'] | [3060.0, 3064.0] | [18.0, 18.0] | [201, 216] |
p03030 | u291766461 | 2,000 | 1,048,576 | You have decided to write a book introducing good restaurants. There are N restaurants that you want to introduce: Restaurant 1, Restaurant 2, ..., Restaurant N. Restaurant i is in city S_i, and your assessment score of that restaurant on a 100-point scale is P_i. No two restaurants have the same score. You want to in... | ["def main():\n N = int(input())\n SP = []\n for _ in range(N):\n temp = input().split()\n SP.append((temp[0], int(temp[1])))\n\n sorted_SP = sorted(SP, key=lambda x: x[1], reverse=True)\n sorted_SP = sorted(sorted_SP, key=lambda x: x[0])\n\n indices = [SP.index(x)+1 for x in sorted_SP]\... | ['Wrong Answer', 'Accepted'] | ['s063980649', 's577950083'] | [3064.0, 3064.0] | [18.0, 17.0] | [388, 408] |
p03030 | u297103202 | 2,000 | 1,048,576 | You have decided to write a book introducing good restaurants. There are N restaurants that you want to introduce: Restaurant 1, Restaurant 2, ..., Restaurant N. Restaurant i is in city S_i, and your assessment score of that restaurant on a 100-point scale is P_i. No two restaurants have the same score. You want to in... | ['from collections import OrderedDict\n\nN = int(input())\nX = {}\ntmp1 = []\nfor i in range(N):\n tmp1.append(input())\n tmp2 = tmp1[i].split()\n if tmp2[0] in X:\n X[tmp2[0]].append(int(tmp2[1]))\n else:\n X[tmp2[0]] = [int(tmp2[1])]\n\nX_sorted = OrderedDict(sorted(X.items(), key=lambda x:x... | ['Wrong Answer', 'Accepted'] | ['s842049922', 's996784865'] | [3316.0, 3316.0] | [21.0, 21.0] | [582, 567] |
p03030 | u301432992 | 2,000 | 1,048,576 | You have decided to write a book introducing good restaurants. There are N restaurants that you want to introduce: Restaurant 1, Restaurant 2, ..., Restaurant N. Restaurant i is in city S_i, and your assessment score of that restaurant on a 100-point scale is P_i. No two restaurants have the same score. You want to in... | ['from operator import itemgetter\ni = int(input())\n\ndata = []\n\ndef chg(x,y):\n\tprint("hoge")\n\tif x[0] == y[0]:\n\t\treturn x[1] > y[1]\n\telse:\n\t\treturn x[0] > y[0]\n\nfor i in range(i):\n\tip = input().split(\' \')\n\tdt = [ip[0],int(ip[1])]\n\tdata.append(dt)\n\n\nls = sorted(data,key=itemgetter(1),reverse... | ['Wrong Answer', 'Accepted'] | ['s916176845', 's741455680'] | [3064.0, 3064.0] | [19.0, 18.0] | [435, 418] |
p03030 | u301870186 | 2,000 | 1,048,576 | You have decided to write a book introducing good restaurants. There are N restaurants that you want to introduce: Restaurant 1, Restaurant 2, ..., Restaurant N. Restaurant i is in city S_i, and your assessment score of that restaurant on a 100-point scale is P_i. No two restaurants have the same score. You want to in... | ['from operator import itemgetter\n\nn = int(input())\n\nwrap = []\n\nfor i in range(n):\n input_data = input()\n wrap.append([i+1, input_data.split()[0], int(input_data.split()[1])])\n\nwrap.sort(key=itemgetter(2), reverse=True)\nwrap.sort(key=itemgetter(1))\nprint(wrap)\n\nfor i in wrap:\n print(i[0])', 'fro... | ['Wrong Answer', 'Accepted'] | ['s837437292', 's021259541'] | [3060.0, 3060.0] | [18.0, 18.0] | [296, 284] |
p03030 | u303745819 | 2,000 | 1,048,576 | You have decided to write a book introducing good restaurants. There are N restaurants that you want to introduce: Restaurant 1, Restaurant 2, ..., Restaurant N. Restaurant i is in city S_i, and your assessment score of that restaurant on a 100-point scale is P_i. No two restaurants have the same score. You want to in... | ['N = int(input())\nlst = []\nfor i in range(1,N+1):\n S,P = input().split()\n \n lst.append([S,-1*int(P),i])\n\nlst = sorted(lst,key=lambda x:(x[0],x[1]))\nfor i in range(N):\n print(i)', 'N = int(input())\nlst = []\nfor i in range(1,N+1):\n S,P = input().split()\n \n lst.append([S,-1*int(P),i])\n\nlst = sorted... | ['Wrong Answer', 'Accepted'] | ['s285238420', 's892561972'] | [3060.0, 3060.0] | [17.0, 18.0] | [246, 244] |
p03030 | u307028468 | 2,000 | 1,048,576 | You have decided to write a book introducing good restaurants. There are N restaurants that you want to introduce: Restaurant 1, Restaurant 2, ..., Restaurant N. Restaurant i is in city S_i, and your assessment score of that restaurant on a 100-point scale is P_i. No two restaurants have the same score. You want to in... | ["N = int(input())\nL = [[]*4]*N\nS = ''\nP = ''\nfor i in range(N):\n S, P = input().split()\n L[i] = [0, S, int(P)*-1, i, 0]\nL.sort()\nfor i in range(N):\n L[i][0] = L[i][3]\n L[i][4] = i+1\n\nL.sort()\nfor i in range(N):\n print(L[i][4])", "N = int(input())\nL = [[]*4]*N\nS = ''\nP = ''\nfor i in range(N):\n ... | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s502082932', 's723576770', 's624378418'] | [3064.0, 3060.0, 3060.0] | [19.0, 19.0, 17.0] | [230, 165, 163] |
p03030 | u309120194 | 2,000 | 1,048,576 | You have decided to write a book introducing good restaurants. There are N restaurants that you want to introduce: Restaurant 1, Restaurant 2, ..., Restaurant N. Restaurant i is in city S_i, and your assessment score of that restaurant on a 100-point scale is P_i. No two restaurants have the same score. You want to in... | ['N = int(input())\nl = [input().split() for _ in range(N)]\nfor i in range(N):\n l[i][1] = int(l[i][1])\n\nl = sorted(l, key=lambda x:(x[0], -x[1]))\nfor i in range(N):\n print(l[i][0])', 'N = int(input())\nl = []\nfor i in range(N):\n s, p = input().split()\n l.append([s, int(p), i+1])\n\n\nl = sorted(l, key=lamb... | ['Wrong Answer', 'Accepted'] | ['s853311173', 's045798606'] | [9084.0, 9024.0] | [27.0, 29.0] | [179, 247] |
p03030 | u310381103 | 2,000 | 1,048,576 | You have decided to write a book introducing good restaurants. There are N restaurants that you want to introduce: Restaurant 1, Restaurant 2, ..., Restaurant N. Restaurant i is in city S_i, and your assessment score of that restaurant on a 100-point scale is P_i. No two restaurants have the same score. You want to in... | ['N=int(input())\nS=[]\nfor i in range(N):\n S.append(list(input().split()))\n S[i][1]=-int(S[i][1])\nfor i in range(N):\n print(sorted(range(N),key=lambda k : S[k])[i])', 'N=int(input())\nS=[]\nfor i in range(N):\n S.append(list(input().split()))\n S[i][1]=-int(S[i][1])\nfor i in range(N):\n print(so... | ['Wrong Answer', 'Accepted'] | ['s759151074', 's477541066'] | [3060.0, 3060.0] | [22.0, 22.0] | [170, 172] |
p03030 | u313578168 | 2,000 | 1,048,576 | You have decided to write a book introducing good restaurants. There are N restaurants that you want to introduce: Restaurant 1, Restaurant 2, ..., Restaurant N. Restaurant i is in city S_i, and your assessment score of that restaurant on a 100-point scale is P_i. No two restaurants have the same score. You want to in... | ['\n#include<algorithm>\nusing namespace std;\n \nint main(void){\n int n;\n cin >> n;\n vector<pair<pair<string,int>,int>> rest(n);\n for(int i = 0;i < n;i++){\n cin >> rest[i].first.first >> rest[i].first.second;\n rest[i].first.second *= -1;\n rest[i].second = i+1;\n }\n \n sor... | ['Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted'] | ['s255045860', 's706651115', 's889225124', 's390129082'] | [2940.0, 2940.0, 2940.0, 3060.0] | [17.0, 16.0, 16.0, 18.0] | [445, 480, 479, 244] |
p03030 | u314050667 | 2,000 | 1,048,576 | You have decided to write a book introducing good restaurants. There are N restaurants that you want to introduce: Restaurant 1, Restaurant 2, ..., Restaurant N. Restaurant i is in city S_i, and your assessment score of that restaurant on a 100-point scale is P_i. No two restaurants have the same score. You want to in... | ['n = int(input())\nbook=[]\nfor i in range(n):\n a,b=input().split()\n temp=[a,int(b),i+1]\n book.append(temp)\n\nbook.sort(key=lambda x:x[0])\nbook.sort(key=lambda x:x[1])\n\nfor j in range[len(book)]:\n print(book[j][3])', 'n = int(input())\nbook=[]\nfor i in range(n):\n a,b=input().split()\n temp=... | ['Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s001113726', 's073684300', 's195674342', 's431780910', 's618585145', 's700807083', 's702511467', 's760917993', 's448092125'] | [3064.0, 3060.0, 3060.0, 3060.0, 3060.0, 3060.0, 3060.0, 3060.0, 3064.0] | [17.0, 17.0, 17.0, 17.0, 17.0, 17.0, 17.0, 17.0, 18.0] | [222, 229, 242, 226, 230, 222, 227, 183, 230] |
p03030 | u315354220 | 2,000 | 1,048,576 | You have decided to write a book introducing good restaurants. There are N restaurants that you want to introduce: Restaurant 1, Restaurant 2, ..., Restaurant N. Restaurant i is in city S_i, and your assessment score of that restaurant on a 100-point scale is P_i. No two restaurants have the same score. You want to in... | ['N = int(input())\n\nxy = []\nfor i in range(N):\n x, y = map(str, input().split())\n y = int(y)\n xy.append([x, y])\n\nsort_xy = sorted(sorted(xy), key=lambda x: x[1], reverse=True)\n\nfor i in range(N):\n for j in range(N):\n if xy[i][0] == sort_xy[j][0]:\n if xy[i][1] == sort_xy[j][1]:... | ['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s069227831', 's143822670', 's232533085', 's841955307', 's989596039', 's798800601'] | [3064.0, 3060.0, 3064.0, 3064.0, 3064.0, 3060.0] | [20.0, 19.0, 20.0, 20.0, 20.0, 17.0] | [351, 266, 360, 362, 345, 209] |
p03030 | u315392164 | 2,000 | 1,048,576 | You have decided to write a book introducing good restaurants. There are N restaurants that you want to introduce: Restaurant 1, Restaurant 2, ..., Restaurant N. Restaurant i is in city S_i, and your assessment score of that restaurant on a 100-point scale is P_i. No two restaurants have the same score. You want to in... | ['n = int(input())\na = []\nfor i in range(n):\n s, p = list(map(int, input().split()))\n a.append((s, -int(p), i))\na.sort()\n\nfor _, _, i in a:\n print(i + 1)\n', 'n = int(input())\na = []\nfor i in range(n):\n s, p = input().split()\n a.append((s, -int(p), i))\na.sort()\n\nfor _, _, i in a:\n prin... | ['Runtime Error', 'Accepted'] | ['s542428073', 's700867072'] | [2940.0, 3060.0] | [18.0, 17.0] | [161, 144] |
p03030 | u316322317 | 2,000 | 1,048,576 | You have decided to write a book introducing good restaurants. There are N restaurants that you want to introduce: Restaurant 1, Restaurant 2, ..., Restaurant N. Restaurant i is in city S_i, and your assessment score of that restaurant on a 100-point scale is P_i. No two restaurants have the same score. You want to in... | ['n=int(input())\nt=[]\nfor i in range(n):\n a=input().split()\n b=[i+1,a[0],(-1)*a[1]]\n t.append(b)\n\nt.sort(key=lambda x:(x[1],x[0]))\nprint(t[0])\n', 'n=int(input())\nt=[]\nfor i in range(n):\n S,P=input().split()\n b=[S,-int(P),i+1]\n t.append(b)\n\nt.sort()\nfor i in t:\n print(i[2])\n'] | ['Wrong Answer', 'Accepted'] | ['s208239464', 's770370742'] | [2940.0, 2940.0] | [19.0, 17.0] | [144, 131] |
p03030 | u316401642 | 2,000 | 1,048,576 | You have decided to write a book introducing good restaurants. There are N restaurants that you want to introduce: Restaurant 1, Restaurant 2, ..., Restaurant N. Restaurant i is in city S_i, and your assessment score of that restaurant on a 100-point scale is P_i. No two restaurants have the same score. You want to in... | ['n = int(input())\nl = []\nfor i in range(n):\n s, p = input().split()\n l.appen([s, -int(p), i + 1])\n\nl.sort()\nfor i in l:\n print(i[2])', 'n = int(input())\nl = []\nfor i in range(n):\n s, p = input().split()\n l.append[(s, -int(p), i + 1])\n\nl.sort()\nfor i in l:\n print(i[2])', 'n = int(input... | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s814364485', 's900173110', 's849453937'] | [2940.0, 2940.0, 3060.0] | [17.0, 17.0, 17.0] | [140, 141, 151] |
p03030 | u317713173 | 2,000 | 1,048,576 | You have decided to write a book introducing good restaurants. There are N restaurants that you want to introduce: Restaurant 1, Restaurant 2, ..., Restaurant N. Restaurant i is in city S_i, and your assessment score of that restaurant on a 100-point scale is P_i. No two restaurants have the same score. You want to in... | ['N = int(input())\nSP = {}\nfor i in range(N):\n line = input().split()\n SP[i] = [line[0], int(line[1])]\n \nans = []\nfor i, index in enumerate(sorted(SP.items(), key= lambda x: (x[1][0], -x[1][1]))):\n ans.append([index, i])\nprint(ans)\n\nfor ls in ans:\n print(ls[0][0] + 1)', 'N = int(input())\nSP ... | ['Wrong Answer', 'Accepted'] | ['s211818668', 's083014097'] | [3064.0, 3064.0] | [18.0, 18.0] | [281, 270] |
p03030 | u318296597 | 2,000 | 1,048,576 | You have decided to write a book introducing good restaurants. There are N restaurants that you want to introduce: Restaurant 1, Restaurant 2, ..., Restaurant N. Restaurant i is in city S_i, and your assessment score of that restaurant on a 100-point scale is P_i. No two restaurants have the same score. You want to in... | ['from operator import itemgetter\nN = int(input())\nSP_1 = [list(input().split()) for i in range(N)]\nfor i in range(N) :\n SP_1[i][1] = int(SP_1[i][1])\nbuf = 0\nSP_2 = SP_1\nSP_1 = sorted(SP_1,key = itemgetter(0))\n# print(SP_1)\nfor i in range(1,N) :\n if SP_1[i][0] != SP_1[i-1][0] :\n print(SP_1[buf:i... | ['Wrong Answer', 'Accepted'] | ['s607259002', 's960384106'] | [3064.0, 3064.0] | [19.0, 19.0] | [601, 602] |
p03030 | u318955153 | 2,000 | 1,048,576 | You have decided to write a book introducing good restaurants. There are N restaurants that you want to introduce: Restaurant 1, Restaurant 2, ..., Restaurant N. Restaurant i is in city S_i, and your assessment score of that restaurant on a 100-point scale is P_i. No two restaurants have the same score. You want to in... | ['from collections import defaultdict\nd = defaultdict(list)\nn = int(input())\nfor i in range(n):\n city, point = input().split()\n d[city].append((int(point), i))\n\nd2 = sorted(d.items())\nfor i in range(len(d2)):\n sorted(d2[i][1])\n for j in range(len(d2[i])):\n print(d2[i][1][j][1] + 1)\n\n', '... | ['Runtime Error', 'Accepted'] | ['s732892867', 's568879853'] | [3316.0, 3316.0] | [21.0, 21.0] | [301, 355] |
p03030 | u320301195 | 2,000 | 1,048,576 | You have decided to write a book introducing good restaurants. There are N restaurants that you want to introduce: Restaurant 1, Restaurant 2, ..., Restaurant N. Restaurant i is in city S_i, and your assessment score of that restaurant on a 100-point scale is P_i. No two restaurants have the same score. You want to in... | ['n = int(input())\nres = list(enumerate(((s[0], int(s[1])) for s in input().split()), 1))\n\nres.sort(key=lambda r: r[1])\n\n[print(r[0]) for r in res]\n', 'n = int(input())\n\nres = []\nfor i in range(n):\n s, s_p = input().split()\n p = int(s_p)\n res.append(((s, -p), i + 1))\n\nres.sort(key=lambda r: r[0])... | ['Runtime Error', 'Accepted'] | ['s639248400', 's772416362'] | [3056.0, 3060.0] | [17.0, 20.0] | [146, 186] |
p03030 | u321605735 | 2,000 | 1,048,576 | You have decided to write a book introducing good restaurants. There are N restaurants that you want to introduce: Restaurant 1, Restaurant 2, ..., Restaurant N. Restaurant i is in city S_i, and your assessment score of that restaurant on a 100-point scale is P_i. No two restaurants have the same score. You want to in... | ['N=int(input())\ndata=[input().split() for i in range(N)]\ndata_name=[]\nfor i in range(N):\n if data[i][0] in data_name:\n continue\n else:\n data_name.append(data[i][0])\ndata_name_sort=sorted(data_name)\ndata_point=[]\nfor i in range(N):\n num=0\n for j in range(len(data_name_sort)):\n ... | ['Wrong Answer', 'Wrong Answer', 'Runtime Error', 'Wrong Answer', 'Wrong Answer', 'Runtime Error', 'Runtime Error', 'Accepted'] | ['s045233786', 's189873891', 's469305833', 's530801670', 's581941223', 's646641022', 's733440420', 's018693338'] | [9232.0, 9112.0, 9192.0, 8980.0, 9192.0, 9136.0, 9232.0, 9240.0] | [24.0, 25.0, 26.0, 31.0, 26.0, 25.0, 24.0, 26.0] | [609, 609, 603, 427, 609, 613, 663, 440] |
p03030 | u322999410 | 2,000 | 1,048,576 | You have decided to write a book introducing good restaurants. There are N restaurants that you want to introduce: Restaurant 1, Restaurant 2, ..., Restaurant N. Restaurant i is in city S_i, and your assessment score of that restaurant on a 100-point scale is P_i. No two restaurants have the same score. You want to in... | ['from operator import itemgetter\nn = int(input())\nl = []\nfor i in range(n):\n pair = input().split()\n l.append([pair[0], pair[1]])\nl2 = l[:]\nprint(l)\n\nsub = sorted(l2, key=itemgetter(1), reverse=True)\n# name sort\nl_sorted = sorted(sub, key=itemgetter(0))\nprint(l_sorted)\nfor i in range(n):\n for j ... | ['Wrong Answer', 'Accepted'] | ['s588214268', 's915084635'] | [3064.0, 3064.0] | [20.0, 19.0] | [391, 370] |
p03030 | u323045245 | 2,000 | 1,048,576 | You have decided to write a book introducing good restaurants. There are N restaurants that you want to introduce: Restaurant 1, Restaurant 2, ..., Restaurant N. Restaurant i is in city S_i, and your assessment score of that restaurant on a 100-point scale is P_i. No two restaurants have the same score. You want to in... | ['from operator import itemgetter\n \nn = int(input())\nl = [list(input().split())+[i+1] for i in range(n)]\n \nl.sort(key = itemgetter(0))\nl = sorted(l, key = lambda x:(x[1]),reverse = True)\nprint(l)', 'n = int(input())\nLists = [list(input().split())+[i+1] for i in range(n)]\nSP = [[s, -int(p), i] for s, p, i in Li... | ['Wrong Answer', 'Accepted'] | ['s237653143', 's184514271'] | [3060.0, 3060.0] | [18.0, 19.0] | [193, 182] |
p03030 | u325282913 | 2,000 | 1,048,576 | You have decided to write a book introducing good restaurants. There are N restaurants that you want to introduce: Restaurant 1, Restaurant 2, ..., Restaurant N. Restaurant i is in city S_i, and your assessment score of that restaurant on a 100-point scale is P_i. No two restaurants have the same score. You want to in... | ['# ABC128-B\n\nimport itemgetter\na = int(input())\nbook = []\nfor i in range(a):\n array = input().split()\n book.append((array[0], int(array[1]) * -1, i))\n\nans = sorted(book, key=itemgetter(0, 1))\n\nfor i in range(a):\n print(ans[i][2] + 1)\n', '# ABC128-B\n\nfrom operator import itemgetter\na = int(inpu... | ['Runtime Error', 'Accepted'] | ['s634731574', 's234646192'] | [2940.0, 3060.0] | [17.0, 18.0] | [271, 285] |
p03030 | u327162583 | 2,000 | 1,048,576 | You have decided to write a book introducing good restaurants. There are N restaurants that you want to introduce: Restaurant 1, Restaurant 2, ..., Restaurant N. Restaurant i is in city S_i, and your assessment score of that restaurant on a 100-point scale is P_i. No two restaurants have the same score. You want to in... | ['N = input()\nN = int(N)\ns = [[ i for i in input().split()] for i in range(N)]\nfor i in range(N):\n s[i][1] = int(s[i][1])\nsorteds = sorted(s, key=lambda x:x[0])\nsorteds.sort(key=lambda x:x[1],reverse = True)\n\nfor j in s:\n onon = 0\n for k in sorteds:\n onon += 1\n if j[1] == k[1]:\n ... | ['Wrong Answer', 'Accepted'] | ['s411077674', 's834038583'] | [3064.0, 3064.0] | [20.0, 17.0] | [323, 265] |
p03030 | u328259252 | 2,000 | 1,048,576 | You have decided to write a book introducing good restaurants. There are N restaurants that you want to introduce: Restaurant 1, Restaurant 2, ..., Restaurant N. Restaurant i is in city S_i, and your assessment score of that restaurant on a 100-point scale is P_i. No two restaurants have the same score. You want to in... | ['N=int(input())\n\nSP = [list(input().split()) for _ in range(N)]\n\nsp=[]\ncount=1\nfor s,p in SP:\n sp.append([s,int(p),count])\n count+=1\n \n#sp.sort(key=lambda x:x[1],reverse=True)\nsp.sort(key=lambda x:(x[0],-x[1]))\n\nfor i in len(sp):\n print(sp[i][2])', 'N=int(input())\n\nSP = [list(input().split(... | ['Runtime Error', 'Accepted'] | ['s839426411', 's937519169'] | [3060.0, 3064.0] | [20.0, 17.0] | [257, 249] |
p03030 | u328755070 | 2,000 | 1,048,576 | You have decided to write a book introducing good restaurants. There are N restaurants that you want to introduce: Restaurant 1, Restaurant 2, ..., Restaurant N. Restaurant i is in city S_i, and your assessment score of that restaurant on a 100-point scale is P_i. No two restaurants have the same score. You want to in... | ['N = int(input())\nA = []\nfor x in range(N):\n s, p = input().split()\n A.sppend([s, -int(p), x+1])\n \nA.sort()\n\nfor i in range(N):\n print(A[i][2])\n \n', 'N = int(input())\nA = []\nfor x in range(N):\n s, p = input().split()\n A.append([s, -int(p), x+1])\n \nA.sort()\n\nfor i in range(N):\n print(A[i][2... | ['Runtime Error', 'Accepted'] | ['s332771154', 's869405373'] | [2940.0, 3060.0] | [17.0, 18.0] | [150, 150] |
p03030 | u329455846 | 2,000 | 1,048,576 | You have decided to write a book introducing good restaurants. There are N restaurants that you want to introduce: Restaurant 1, Restaurant 2, ..., Restaurant N. Restaurant i is in city S_i, and your assessment score of that restaurant on a 100-point scale is P_i. No two restaurants have the same score. You want to in... | ['N = int(input())\nrest = {}\ncities = []\nfor i in range(N):\n k,s = input().split()\n if k not in rest:\n rest[k] = []\n cities.append(k)\n rest[k].append([int(s),i+1])\nprint(sorted(rest))\nfor k in cities:\n rest[k].sort(reverse = True)\n for i in rest[k]:\n print(i[1])', 'N = i... | ['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s312021961', 's318876137', 's399764405', 's429861999', 's920724034', 's379911450'] | [3064.0, 3064.0, 3064.0, 3064.0, 3064.0, 3060.0] | [17.0, 17.0, 18.0, 17.0, 18.0, 18.0] | [296, 310, 310, 310, 317, 290] |
p03030 | u333404917 | 2,000 | 1,048,576 | You have decided to write a book introducing good restaurants. There are N restaurants that you want to introduce: Restaurant 1, Restaurant 2, ..., Restaurant N. Restaurant i is in city S_i, and your assessment score of that restaurant on a 100-point scale is P_i. No two restaurants have the same score. You want to in... | ['n = int(input())\nl = []\nfor i in range(n):\n d = {}\n d["index"] = i+1\n d["city"], d["score"] = input().split()\n l.append(d)\nresults = []\nfor city in citys:\n sorted_scores = sorted([l[i]["score"] for i in range(n) if l[i]["city"] == city], reverse=True)\n for score in sorted_scores:\n ... | ['Runtime Error', 'Accepted'] | ['s402572746', 's157455376'] | [3064.0, 3064.0] | [18.0, 20.0] | [466, 564] |
p03030 | u344030307 | 2,000 | 1,048,576 | You have decided to write a book introducing good restaurants. There are N restaurants that you want to introduce: Restaurant 1, Restaurant 2, ..., Restaurant N. Restaurant i is in city S_i, and your assessment score of that restaurant on a 100-point scale is P_i. No two restaurants have the same score. You want to in... | ['n = int(input())\nguide = [[i+1, list(int(x) if x.isdigit() else x for x in input().split())] for i in range(n)]\nprint(guide) ##\nguide = sorted(guide, key = lambda x:(x[1][0],-x[1][1]))\n\nfor i in range(n):\n print(guide[i][0])', 'n = int(input())\nguide = [[i+1, list(int(x) if x.isdigit() else x for x in input... | ['Wrong Answer', 'Accepted'] | ['s015956499', 's826557283'] | [9188.0, 9124.0] | [30.0, 30.0] | [227, 211] |
p03030 | u344959886 | 2,000 | 1,048,576 | You have decided to write a book introducing good restaurants. There are N restaurants that you want to introduce: Restaurant 1, Restaurant 2, ..., Restaurant N. Restaurant i is in city S_i, and your assessment score of that restaurant on a 100-point scale is P_i. No two restaurants have the same score. You want to in... | ['\nN = int(input().strip())\n\n\nl = []\nfor i in range(N):\n array = list(input().split())\n array.append(i+1)\n l.append(array)\nprint(l) \n\nl.sort(key=lambda x: x[1])\nl.sort(key=lambda x: x[0])\n\nfor i in range(N):\n print(l[i][2])\n\n', '\nN = int(input().strip())\n\n\nl = []\nfor i in range(N):\... | ['Wrong Answer', 'Accepted'] | ['s325821110', 's620852553'] | [3060.0, 3060.0] | [18.0, 17.0] | [261, 289] |
p03030 | u345778634 | 2,000 | 1,048,576 | You have decided to write a book introducing good restaurants. There are N restaurants that you want to introduce: Restaurant 1, Restaurant 2, ..., Restaurant N. Restaurant i is in city S_i, and your assessment score of that restaurant on a 100-point scale is P_i. No two restaurants have the same score. You want to in... | ['N = int(input())\nshops = []\nfor i in range(N):\n S, P = input().split()\n shops.append([S, int(P), i])\nshops.sort(key=1)\nshops.sort()\nfor shop in shops:\n print(shop[2])', 'N = int(input())\nshops = []\nfor i in range(N):\n S, P = input().split()\n shops.append([S, int(P), i+1])\nshops.sort(key=la... | ['Runtime Error', 'Accepted'] | ['s978913514', 's744890584'] | [8920.0, 9120.0] | [22.0, 30.0] | [175, 222] |
p03030 | u346424924 | 2,000 | 1,048,576 | You have decided to write a book introducing good restaurants. There are N restaurants that you want to introduce: Restaurant 1, Restaurant 2, ..., Restaurant N. Restaurant i is in city S_i, and your assessment score of that restaurant on a 100-point scale is P_i. No two restaurants have the same score. You want to in... | ['sp = []\nfor i in range(n):\n s, p = input().split()\n sp.append((s, int(p), i+1))\n\nsp_sort = sorted(sp, key=lambda x: (x[0], -1 * x[1]))\n\nfor i in range(n):\n print(sp_sort[i][2])\n', 'n = int(input())\n\nsp = []\nfor i in range(n):\n s, p = input().split()\n sp.append((s, int(p), i+1))\n\nsp_sort... | ['Runtime Error', 'Accepted'] | ['s861771156', 's695866300'] | [2940.0, 3060.0] | [17.0, 17.0] | [186, 204] |
p03030 | u347545486 | 2,000 | 1,048,576 | You have decided to write a book introducing good restaurants. There are N restaurants that you want to introduce: Restaurant 1, Restaurant 2, ..., Restaurant N. Restaurant i is in city S_i, and your assessment score of that restaurant on a 100-point scale is P_i. No two restaurants have the same score. You want to in... | ['n = int(input())\ndata =[]\nfor i in range(n):\n sity, score = input().split()\n data.append([sity, int(score),i+1])\n \ndata.sort(key=lambda x:x[0], -x[1])\nfor j in range(n):\n print(data[j][2])\n \n\n ', 'n = int(input())\ndata =[]\nfor i in range(n):\n sity, score = input().split()\n data.append([sity, in... | ['Runtime Error', 'Wrong Answer', 'Accepted'] | ['s100812222', 's456203211', 's026422222'] | [2940.0, 3060.0, 3060.0] | [17.0, 18.0, 18.0] | [199, 235, 201] |
p03030 | u347600233 | 2,000 | 1,048,576 | You have decided to write a book introducing good restaurants. There are N restaurants that you want to introduce: Restaurant 1, Restaurant 2, ..., Restaurant N. Restaurant i is in city S_i, and your assessment score of that restaurant on a 100-point scale is P_i. No two restaurants have the same score. You want to in... | ['n = int(input())\nreview = []\nfor i in range(n):\n s, p = input().split()\n review.append([s, int(p), i + 1])\nrev_sorted = sorted(review, key = lambda x: (x[0], x[1]), reverse = (False, True))\nfor i in rev_sorted:\n print(i[2])', 'n = int(input())\nreview = []\nfor i in range(n):\n s, p = input().split... | ['Runtime Error', 'Wrong Answer', 'Accepted'] | ['s263217460', 's531465908', 's841350516'] | [3060.0, 3060.0, 9184.0] | [17.0, 17.0, 26.0] | [232, 296, 168] |
p03030 | u347640436 | 2,000 | 1,048,576 | You have decided to write a book introducing good restaurants. There are N restaurants that you want to introduce: Restaurant 1, Restaurant 2, ..., Restaurant N. Restaurant i is in city S_i, and your assessment score of that restaurant on a 100-point scale is P_i. No two restaurants have the same score. You want to in... | ['from functools import cmp_to_key\ndef cmp(x, y):\n if x[0] < y[0]:\n return -1\n elif x[0] > y[0]:\n return 1\n else:\n return int(y[1]) - int(x[1])\nn = int(input())\nd = [input().split() for _ in range(n)]\nfor i in range(n):\n d[i].append(i + 1)\nd.sort(key = cmp_to_key(cmp))\nfor i in range(n):\nprin... | ['Runtime Error', 'Accepted'] | ['s840212842', 's244696999'] | [3060.0, 3572.0] | [17.0, 23.0] | [315, 317] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.