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 | u743574271 | 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>\n#include <string>\n\n#include <stdlib.h>\n\nusing namespace std;\nchar in[120];\npair<pair<string, int>, int> p[110];\n\nint main () {\n int N;\n cin >> N;\n for (int i = 0; i< N; i++) {\n int t;\n string tmp;\n cin >> tmp >> t;\n \n p[i]=make_pair(make_pair(tmp,-t),i);\n } ... | ['Runtime Error', 'Accepted'] | ['s072660162', 's781776778'] | [3064.0, 3316.0] | [17.0, 22.0] | [421, 620] |
p03030 | u745223262 | 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())\nr=[]\nfor i in range(n):\n s,p=input().split()\n r.append((s,int(p),i))\n\nl = sorted(r,key=lambda x:(x[0],-x[1]))\nprint(l)\nfor i in range(n):\n print(l[i][2]+1)', 'n = int(input())\nr=[]\nfor i in range(n):\n s,p=input().split()\n r.append((s,int(p)))\n\nr = sorted(r,key=lambda x:(... | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s585650869', 's626110878', 's424774988'] | [3060.0, 3060.0, 3060.0] | [18.0, 18.0, 17.0] | [181, 176, 173] |
p03030 | u746849814 | 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\nisp = []\nfor i in range(1, n+1):\n s, p = input().split()\n isp.append([i, s, int(p)])\n \nisp = sorted(isp, key=lambda x: x[2])\nisp = sorted(isp, key=lambda x: x[1], reverse=True)\nfor i in isp:\n print(i[0])', 'n = int(input())\n\nisp = []\nfor i in range(1, n+1):\n s, p = input... | ['Wrong Answer', 'Accepted'] | ['s661199553', 's607822018'] | [3060.0, 3064.0] | [17.0, 17.0] | [233, 233] |
p03030 | u747184036 | 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 sys\nsys.setrecursionlimit(10 ** 5)\n\n\ndef LI(): return [int(x) for x in sys.stdin.readline().split()]\n\n\ndef LI_(): return [int(x) - 1 for x in sys.stdin.readline().split()]\n\n\ndef LF(): return [float(x) for x in sys.stdin.readline().split()]\n\n\ndef LS(): return sys.stdin.readline().split()\n\n\ndef I... | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s637339744', 's661356920', 's442908317'] | [3064.0, 3064.0, 3060.0] | [17.0, 19.0, 17.0] | [643, 620, 150] |
p03030 | u750257808 | 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 SS,PP = map(str,input().split())\n X.append([int(i+1), SS, int(PP)])\n\nA = sorted(X, key=lambda X:(X[1],-X[2]))\nprint (A)', 'N = int(input())\nX =[]\nfor i in range(N):\n SS,PP = map(str,input().split())\n X.append([int(i+1), SS, int(PP)])\n\nA = sorted(X, key=lambd... | ['Wrong Answer', 'Accepted'] | ['s895806019', 's102661510'] | [3060.0, 3060.0] | [17.0, 19.0] | [164, 194] |
p03030 | u753803401 | 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 = map(str, input().split())\n sp.append([s, int(p), i + 1])\nsp = sorted(sp, key=lambda x: x[1], reverse=True)\nsp = sorted(sp, key=lambda x: x[0])\nprint(sp)\nfor i in sp:\n print(i[2])\n', 'n = int(input())\nsp = []\nfor i in range(n):\n s, p = map(st... | ['Wrong Answer', 'Accepted'] | ['s640834926', 's382789338'] | [3060.0, 3060.0] | [17.0, 18.0] | [240, 230] |
p03030 | u756399469 | 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 sys\ninput = sys.stdin.readline\nn = int(input())\nprint(n)\nb = [list(map(str,input().split())) for p in [0]*n]\nfor i in range(n):\n\tb[i][1] = int(b[i][1])\n\tb[i].append(i+1)\nprint(b)\nb.sort(key=lambda q:(q[0],-q[1]))\nfor k in range(n):\n\tprint(b[k][2])', 'import sys\ninput = sys.stdin.readline\nn = in... | ['Wrong Answer', 'Accepted'] | ['s084669670', 's022084047'] | [3064.0, 3064.0] | [18.0, 17.0] | [254, 239] |
p03030 | u756518877 | 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 -*-\nn=int(input())\nA=[]\nfor i in range(n):\n a=(i+1,)+tuple(input().split())\n A.append(a)\nA.sort(key=lambda x:(-x[1],x[2]),reverse=True)\nfor m in range(n):\n print(A[m][0])', '# -*- coding: utf-8 -*-\nN=int(input())\nrestaurant=[]\nfor i in range(N):\n s,p=input().split()\n re... | ['Runtime Error', 'Accepted'] | ['s399174637', 's093662347'] | [3060.0, 3060.0] | [17.0, 18.0] | [199, 223] |
p03030 | u758953171 | 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... | ["if __name__ == '__main__':\n N = int(input())\n S = []\n P = []\n num = []\n for i in range(N):\n s = input().rstrip().split(' ')\n S.append(s[0])\n P.append(int(s[1]))\n num.append(i+1)\n\n Z = list(zip(S,P,num))\n print(Z)\n\n Z.sort(key=lambda k:k[1],reverse=True... | ['Wrong Answer', 'Accepted'] | ['s975751516', 's047013336'] | [3064.0, 3064.0] | [17.0, 17.0] | [378, 365] |
p03030 | u771167374 | 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 s, p = input().split()\n l.append([s, int(p), i+1])\nl_sorted = sorted(l, key = lambda x: (x[0], -x[1]))\nfor j in range(n):\n print(l_sorted[j][2])', 'n = int(input())\nl = []\nfor i in range():\n s, p = input().split()\n l.append([s, int(p), i])\nl_sort... | ['Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted'] | ['s052074910', 's385035511', 's576942834', 's679696545', 's904940762'] | [3060.0, 3060.0, 3060.0, 3060.0, 3060.0] | [17.0, 17.0, 18.0, 17.0, 18.0] | [197, 187, 197, 191, 197] |
p03030 | u773686010 | 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())\nShop_List=[]\nfor i in range(N):\n Temp_List=list(input().split())\n Temp_List[1]=int(Temp_List[1])\n Temp_List.append(i+1)\n Shop_List.append(Temp_List)\n\n\nShop_List_Sorted = sorted(Shop_List, key=lambda x:(x[0], x[1]))\nfor k in range(N):\n print(Shop_List_Sorted[k][2])\n', '\nN... | ['Wrong Answer', 'Accepted'] | ['s758611869', 's590770367'] | [9160.0, 9044.0] | [23.0, 19.0] | [359, 360] |
p03030 | u775731228 | 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 -*-\nfrom operator import itemgetter\nn = int(input())\nrestList = []\nfor i in range(n):\n city, p = map(str, input().split())\n restList.append([i + 1, city, int(p)])\nrestList.sort(key=itemgetter(1))\n\ncity = restList[0][1]\nsame_list = []\nfor R in restList:\n if R[1] == city:\n ... | ['Wrong Answer', 'Accepted'] | ['s419307379', 's216565214'] | [3064.0, 3064.0] | [18.0, 19.0] | [613, 665] |
p03030 | u776311944 | 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\nfrom collections import OrderedDict\n\nN = int(input())\nli = []\nlipay = []\nlinum = []\ncnt = 1\n\n\ndatalist =[ list(map(str, input().split())) for i in range(N) ]\n\nfor i in range(0,N):\n datalist[i].append(cnt)\n cnt += 1\n\ndatalist.sort(key=lambda x:x[0] or int(x[1]))\n# print(datalist)\n... | ['Wrong Answer', 'Accepted'] | ['s575648832', 's618903480'] | [3316.0, 3060.0] | [20.0, 18.0] | [403, 278] |
p03030 | u777028980 | 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())\nhoge=[]\nfor i in range(n):\n a,b=map(str,input().split())\n c=int(b)\n hoge.append([a,c,i+1])\nhoge=sorted(hoge,key=lambda x:(x[1]),reverse=True)\nhoge=sorted(hoge,key=lambda x:(x[0]),reverse=False)\n\nprint(hoge)\nfor i in range(n):\n print(hoge[i][2])', 'n=int(input())\nhoge=[]\nfor i in range(... | ['Wrong Answer', 'Accepted'] | ['s467367713', 's587544798'] | [3064.0, 3060.0] | [18.0, 17.0] | [263, 250] |
p03030 | u777283665 | 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\nlis = []\n\nfor i in range(n):\n s, p = input().split()\n lis.append([i+1, s, p])\n \nlis.sort(key=lambda x: x[1])\n\nnames =[]\n\nfor i in lis:\n if i[1] not in names:\n names.append(i[1])\n \nscore = 100000\n\n\nfor name in names:\n for l in lis:\n if name in ... | ['Wrong Answer', 'Accepted'] | ['s459408943', 's877415304'] | [3064.0, 3064.0] | [19.0, 19.0] | [418, 474] |
p03030 | u778700306 | 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\n\n\ndef cmp(xx,yy):\n x = xx[1]\n y = yy[1]\n print(x,y)\n print(x[0],x[1],y[0],y[1])\n if x[0] != y[0]:\n return -1 if x[0] < y[0] else 1\n return -1 if int(x[1]) > int(y[1]) else 1\n\nn = int(input())\nitems = [input().split() for _ in range(n)]\nitems = li... | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s622016700', 's774099721', 's155120980'] | [3812.0, 3812.0, 3060.0] | [25.0, 25.0, 18.0] | [407, 407, 155] |
p03030 | u779602548 | 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# -*- coding: utf-8 -*-\n\nn = int(input())\ns = []\nfor i in range(n):\n s.append(list(input().split()))\n\ns2=sorted(s,key=lambda x: (x[1]),reverse = True)\ns2=sorted(s2,key=lambda x: (x[0]))\nprint(s2)\nfor i in s2:\n for j in range(n):\n if i==s[j]:\n print(j+1)', '\n# -*- coding: utf-8 ... | ['Wrong Answer', 'Accepted'] | ['s451208258', 's864149946'] | [3064.0, 3060.0] | [18.0, 19.0] | [313, 326] |
p03030 | u779728630 | 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\nL = []\n\nfor i in range(N):\n S, P = input().split()\n P = int(P)\n L.append([S, P])\n \nn_s = ""\nn_p = -1\n\nfor i in range(N):\n t_s = "Z"\n t_p = -1\n v = -1\n for j in range(N):\n if t_s > L[i][0] and L[i][0] > n_s:\n t_s = L[i][0]\n t_p = L[i][1]\n v = i\n elif ... | ['Wrong Answer', 'Accepted'] | ['s040564125', 's145912745'] | [3064.0, 9028.0] | [20.0, 30.0] | [415, 166] |
p03030 | u780675733 | 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 Resturant_number in range(N):\n tmp = [Resturant_number]\n tmp += input().split()\n tmp[2] = int(tmp[2])\n L.append(tmp)\nL.sort(reverse=True, key=lambda x:x[1])\n\nfor _ in range(len(L)):\n print(L.pop()[0])', 'N = int(input())\nL = []\nfor Resturant_number in range(1, N+... | ['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s637056566', 's833863541', 's880385666', 's864667456'] | [3060.0, 3064.0, 3060.0, 3060.0] | [17.0, 17.0, 18.0, 18.0] | [243, 248, 248, 256] |
p03030 | u780962115 | 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... | ['print(1)', 'N,que=int(input()),[]\nfor i in range(N):\n s,p=list(input().split())\n que.append((s,int(p),i+1))\nque.sort()\nfor x in que:\n print(x[-1])', 'N,que=int(input()),[]\nfor i in range(N):\n s,p=list(input().split())\n que.append((s,-int(p),i+1))\nque.sort()\nfor x in que:\n print(x[-1])'] | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s284161124', 's916856624', 's208786629'] | [2940.0, 9052.0, 9084.0] | [17.0, 29.0, 22.0] | [8, 143, 144] |
p03030 | u785220618 | 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... | ['print(*sorted(range(1,int(input())+1),key=lambda _:[(s,-int(p))for s,p in input().split()]))', 'n = int(input())\nSP = []\nfor i in range(n):\n s, p = input().split()\n SP.append([s, int(p), i+1])\nSP.sort(key=lambda x: (x[0], -x[1]))\nfor _, _, i in SP:\n print(i)\n'] | ['Runtime Error', 'Accepted'] | ['s863120068', 's998907097'] | [3052.0, 3060.0] | [17.0, 17.0] | [92, 172] |
p03030 | u785578220 | 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... | ['\na = int(input())\nl = []\nfor i in range(a):\n ta,tb = map(int,input().split())\n l.append([ta,tb,i+1])\nl.sort()\nfor i, j , k in l:\n print(k)\n\n', '\na = int(input())\nl = []\nfor i in range(a):\n ta,tb = map(str,input().split())\n l.append([ta,-int(tb),i+1])\nl.sort()\nfor i, j , k in l:\n pr... | ['Runtime Error', 'Accepted'] | ['s080033548', 's694252136'] | [2940.0, 3060.0] | [17.0, 18.0] | [149, 155] |
p03030 | u788137651 | 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 sys\ninput = sys.stdin.readline\ninf = float(\'inf\')\nmod = 10**9+7\n\n\ndef INT_(n): return int(n)-1\n\n\ndef MI(): return map(int, input().split())\n\n\ndef MF(): return map(float, input().split())\n\n\ndef MI_(): return map(INT_, input().split())\n\n\ndef LI(): return list(MI())\n\n\ndef LI_(): return [int... | ['Wrong Answer', 'Accepted'] | ['s375836862', 's948400832'] | [3192.0, 3064.0] | [18.0, 18.0] | [1245, 960] |
p03030 | u788734639 | 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\nimport numpy as np\n\nN = input()\nN = int(N)\na_np = np.ones((N,1))\na_pd = pd.DataFrame(a_np,columns=['A'])\na_pd['B']=None\na_pd['C']=None\nfor i in range(0,N):\n S, P = map(str, input().split())\n P = int(P)\n a_pd.loc[i,:] = [i,S,P]\n #print(i,S,P)\nb_pd = a_pd.sort_values(['B','... | ['Runtime Error', 'Accepted'] | ['s832999008', 's748713732'] | [3064.0, 12500.0] | [17.0, 148.0] | [439, 228] |
p03030 | u791527495 | 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 = []\nfor i in range(N):\n S,P = input().split()\n inrest = [ i + 1 , str(S) , int(P)]\n rest.append(inrest)\n\nrest = sorted(rest , key = lambda x:x[2] , reverse = True)\nrest = sorted(rest , key = lambda x:x[1])\n\nfor i in range(N):\n print(lest[i][0])', 'N = int(input())\nrest = []\nfor... | ['Runtime Error', 'Accepted'] | ['s204562899', 's827706837'] | [3060.0, 3064.0] | [18.0, 17.0] | [271, 271] |
p03030 | u792217717 | 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())\nSs, Ps = [ [], [] ]\nfor i in range(N):\n s, p = input().split(" ")\n Ss.append(s)\n Ps.append(int(p))\nrests = list(zip(range(1, N+1), Ss, Ps))\nrests.sort(key=lambda x: (x[1], -x[2]))\nprint(rests)\nprint(\'\\n\'.join([str(i) for i,_,_ in rests]))\n', 'N = int(input())\nSs, Ps = [ [], [] ... | ['Wrong Answer', 'Accepted'] | ['s342655346', 's972057031'] | [3060.0, 3060.0] | [17.0, 17.0] | [265, 252] |
p03030 | u796563423 | 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())\nrec=[]\nfor i in range(n):\n a,b=input().split()\n rec.append([a,int(b),i+1])\nrec.sort()\nfor i in rec:\n print(i[2])', 'n=int(input())\nrec=[]\nfor i in range(n):\n a,b=input().split()\n rec.append([a,int(b),i+1])\nrec=sorted(rec, reverse=True, key=lambda x: x[1]) \nrec=sorted(rec, ke... | ['Wrong Answer', 'Accepted'] | ['s201661818', 's360812228'] | [9120.0, 9076.0] | [26.0, 25.0] | [136, 213] |
p03030 | u796789068 | 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())\ninfo=[input().split() for i in range(N)] \n#print(info)\nfrom operator import itemgetter\ndic1={}\nfor i in range(len(info)):\n dic1[i+1]=info[i]\n#print(dic1)\ninfo1=sorted(info,key=lambda x:int(x[1]),reverse=True)\ninfo2=sorted(info1,key=itemgetter(0))\nprint(info2)\nfor i in info2:\n for key,... | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s122984044', 's764476217', 's951177757'] | [3060.0, 3060.0, 3060.0] | [19.0, 18.0, 20.0] | [382, 277, 383] |
p03030 | u800058906 | 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(input().split())\n\nspoint=sorted(s,key=lambda x:x[1], reverse=True)\nscity=sorted(spoint,key=lambda x:x[0])\nprint(scity) ', 'n=int(input())\nans=[]\nfor i in range(n):\n s,p=input().split()\n ans.append([s,int(p),i+1])\n\nanspoint=sorted(ans,key=lambda x:x[... | ['Wrong Answer', 'Accepted'] | ['s724843015', 's277686456'] | [9132.0, 9120.0] | [23.0, 23.0] | [169, 227] |
p03030 | u801512570 | 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 _ in range(N):\n tmp = input().split()\n L.append((tmp[0],int(tmp[1])))\n\nL.sort(key=lambda x:x[0])\nL.sort(reverse=True, key=lambda x:x[1])\n\nfor i in L:\n print(i[1])', 'N = int(input())\nL=[]\nfor i in range(N):\n tmp = input().split()\n L.append((tmp[0],int(tmp[1]),i+1... | ['Wrong Answer', 'Accepted'] | ['s121472520', 's083785171'] | [3060.0, 3060.0] | [18.0, 18.0] | [197, 205] |
p03030 | u802977614 | 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_origin=[input().split() for i in range(n)]\nfor i in range(n):\n data_origin[i][1] = int(data_origin[i][1])\ndata = sorted(data_origin, key=lambda x:x[1],reverse=True)\ndata = sorted(data, key=lambda x:x[0])\nprint(data)\nfor i in data:\n print(1+data_origin.index(i))', 'n=int(input())\ndata_or... | ['Wrong Answer', 'Accepted'] | ['s113614047', 's873531577'] | [3064.0, 3064.0] | [18.0, 18.0] | [283, 271] |
p03030 | u803617136 | 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\nn = int(input())\nrestaurants = defaultdict(list)\nfor i in range(n):\n s, p = input().split()\n p = int(p)\n restaurants[s].append([p, i])\n\nans = [''] * n\ncnt = 0\nfor k, v in sorted(restaurants.items(), key=lambda x: x[0]):\n for p, i in sorted(v, key=lambda x: -x... | ['Wrong Answer', 'Accepted'] | ['s793415788', 's570198386'] | [3316.0, 3316.0] | [21.0, 21.0] | [378, 319] |
p03030 | u809457879 | 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 l.append(list(input().split()))\n l[i][1]=int(l[i][1])\nl1=sorted(l,key=lambda x:x[1],reverse=True)\nl2=sorted(l,key=lambda x:x[0])\nfor i in range(N):\n print(l.index(l2[i])+1)', 'N=int(input())\nl=[]\nfor i in range(N):\n l.append(list(input().split()))\n l[i][1]=int(... | ['Wrong Answer', 'Accepted'] | ['s567962065', 's465332827'] | [3060.0, 3060.0] | [18.0, 18.0] | [215, 216] |
p03030 | u809819902 | 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 = []\nfor i in range(n):\n s,p=map(str, input().split())\n res += [(s,int(p))]\nres1=res\nres.sort(key=lambda x:(x[0],-x[1]))\nfor i in range(n):\n print(res1.index(res[i])+1)\n\n', 'n=int(input())\nres = []\nfor i in range(n):\n s,p=map(str, input().split())\n res += [(s,int(p))]\n... | ['Wrong Answer', 'Accepted'] | ['s398842961', 's966070582'] | [9108.0, 9184.0] | [29.0, 28.0] | [198, 207] |
p03030 | u811512248 | 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 = []\nfor i in range(N):\n si, pi = input().split()\n pi = int(pi)\n li +=[ [i, si, pi]]\nli.sort(key=lambda x:x[2], reverse=True)\nli.sort(key=lambda x:x[1], reverse=False)\nfor j in li:\n print(j[0])', 'N = int(input())\nli = []\nfor i in range(N):\n si, pi = input().split()\n ... | ['Wrong Answer', 'Accepted'] | ['s071141997', 's227359311'] | [3064.0, 3060.0] | [17.0, 18.0] | [225, 227] |
p03030 | u814265211 | 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\nS, P = [], []\nt = []\nfor i in range(N):\n s, p = input().split()\n S.append(s), P.append(int(p))\n t.append((s, int(p)))\n\nss = list(set(S))\nss.sort()\n\na = []\nb = []\nfor i in ss:\n for s, p in t:\n if i == s:\n a.append(p)\n b.extend(sorted(a, reverse=True)... | ['Wrong Answer', 'Accepted'] | ['s186885675', 's927193955'] | [3064.0, 3064.0] | [19.0, 20.0] | [449, 431] |
p03030 | u815797488 | 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 a,b = input().split()\n l.append((a,-int(b),i+1))\n print(l)\nl.sort()\nfor a,b,k in l:\n print(k)', 'N = int(input())\nl = []\nfor i in range(N):\n a,b = input().split()\n l.append((a,-int(b),i+1))\nl.sort()\nfor a,b,k in l:\n print(k)'] | ['Wrong Answer', 'Accepted'] | ['s755282741', 's705394403'] | [3060.0, 3060.0] | [22.0, 17.0] | [149, 136] |
p03030 | u823044869 | 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\nsList = []\nfor i in range(n):\n sList.append(list(input().split())+[i+1])\n sList[i][1] = -1*int(sList[i][1])\nsList.sort()\n\nprint(sList)\nfor i in sList:\n print(i[2])\n', 'n = int(input())\n\nsList = []\nfor i in range(n):\n sList.append(list(input().split())+[i+1])\n sList[i][1] = -1*in... | ['Wrong Answer', 'Accepted'] | ['s187363158', 's604326116'] | [3060.0, 3060.0] | [18.0, 17.0] | [185, 172] |
p03030 | u823587639 | 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 = input()\nlist = []\n\nfor i in range(n):\n print("str: ")\n sp = input().split()\n s = str(sp[0])\n p = int(sp[1])\n\n #s, p = sp[0], int(sp[1])\n list.append([i+1, s, p])\n"""\nlist.append([1, "test2", 3])\nlist.append([2, "test3", 1])\nlist.append([3, "test1", 5])\nlist.append([4, "test1", 4... | ['Runtime Error', 'Wrong Answer', 'Wrong Answer', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted'] | ['s109539162', 's149224796', 's191833190', 's510931293', 's594992411', 's712393318', 's758834046', 's881510240', 's228897581'] | [3060.0, 3060.0, 3060.0, 3060.0, 2940.0, 2940.0, 2940.0, 2940.0, 3060.0] | [17.0, 18.0, 17.0, 18.0, 18.0, 17.0, 17.0, 17.0, 17.0] | [377, 382, 208, 344, 197, 202, 192, 195, 209] |
p03030 | u824326335 | 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 =[]\nl =[]\nans = []\ncount = 1\nfor i in range(n):\n s1,p = map(str,input().split())\n p1 = int(p)\n l.append(s1)\n s.append(list([s1,p1]))\nl = sorted(list(set(l)))\nfor i in l:\n t =[]\n index_num = [n for n, v in enumerate(s) if v[0] == i]\n for k in index_num:\n t.a... | ['Wrong Answer', 'Accepted'] | ['s066959584', 's642634579'] | [3064.0, 3064.0] | [18.0, 19.0] | [490, 413] |
p03030 | u824958582 | 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\ndef solve():\n n = input()\n s = []\n p = []\n m = defaultdict(list)\n mm = {}\n for i in range(0, int(n)):\n si, pi = map(str, input().split())\n s.append(si)\n p.append(int(pi))\n m[si].append(int(pi))\n mm[int(pi)] = i + 1\n ... | ['Wrong Answer', 'Accepted'] | ['s618542584', 's248966231'] | [3316.0, 3316.0] | [21.0, 20.0] | [581, 536] |
p03030 | u825440127 | 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())\nlist1 = []\nfor i in range(n):\n s,p = input().split()\n p = int(p)\n list1.append([s, p, i+1])\nlist1.sort()\nfor i in list1:\n print[i[2]]\n', 'n = int(input())\nlist1 = []\nfor i in range(n):\n s,p = input().split()\n p = int(p)\n list1.append([s, p, i+1])\nlist1.sort(reverse... | ['Runtime Error', 'Wrong Answer', 'Runtime Error', 'Wrong Answer', 'Accepted'] | ['s013475632', 's050132007', 's163835315', 's882047219', 's728568134'] | [2940.0, 2940.0, 2940.0, 2940.0, 3060.0] | [17.0, 17.0, 18.0, 17.0, 17.0] | [163, 175, 162, 163, 164] |
p03030 | u825981710 | 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 SP.append(input().split())\n SP[i][1] = int(SP[i][1])\n SP[i].append(i)\n print(SP)\n\nSP = sorted(SP, key=lambda x:(x[0],-x[1]))\n\nfor j in range(N):\n print(SP[j][2]+1)\n', 'N=int(input())\n\nSP=[]\nfor i in range(N):\n SP.append(input().split())\n ... | ['Wrong Answer', 'Accepted'] | ['s728829786', 's286350779'] | [3060.0, 3060.0] | [21.0, 17.0] | [221, 222] |
p03030 | u826986938 | 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 sys import stdin\nfrom collections import defaultdict\nfrom collections import OrderedDict\n\nN = int(input())\nlines = stdin.readlines()\n\ndic = defaultdict(dict)\n\nfor i, line in enumerate(lines):\n line = line.strip().split()\n dic[line[0]][i+1] = int(line[1])\n\n\n# print(i,":",dic[i])\n\nsorted(d... | ['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s144128071', 's646769415', 's767910114', 's724629183'] | [3316.0, 3316.0, 3316.0, 3316.0] | [22.0, 21.0, 21.0, 21.0] | [517, 338, 458, 489] |
p03030 | u828036666 | 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 Guide():\n N = int(input())\n lst = []\n for i in range(1, N + 1):\n city, score = input().split()\n lst.append([city, int(score), i])\n sorted_lst = sorted(lst, key=lambda x:(x[0], x[1]))\n\n for l in sorted_lst:\n print(l[2])\n\n\nGuide()\n', 'def Guide():\n N = int(input(... | ['Wrong Answer', 'Accepted'] | ['s816550218', 's394971379'] | [3060.0, 3060.0] | [17.0, 17.0] | [269, 270] |
p03030 | u829249049 | 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())\nlistA=[[] for i in range(N)]\nlistANS=[]\nfor i in range(N):\n S,P=input().split()\n listA[i]+=[S,int(P),i+1]\nlistA.sort()\nfor i in range(1,N):\n before=0\n if listA[i-1][0]!=listA[i][0] or i==N-1:\n listN=listA[before:i+1]\n listN.sort(key=itemgetter(1),re... | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s266722999', 's788403849', 's256633353'] | [3064.0, 3064.0, 3060.0] | [19.0, 18.0, 17.0] | [391, 497, 148] |
p03030 | u829369995 | 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\n\na = int(input())\nb = []\nfor i in range(a):\n c = input().split()\n b.append((c[0], int(c[1]), i+1))\ns = sorted(b, key=itemgetter(0))\nsorted(s, key=itemgetter(1), reverse=True)\nfor i in s:\n print(i[-1])\n\n', 'from operator import itemgetter, attrgetter\n\n... | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s060654967', 's260087686', 's427161916'] | [3060.0, 3060.0, 3060.0] | [18.0, 18.0, 19.0] | [255, 260, 295] |
p03030 | u830054172 | 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, = [input().split() for i in range(n)]\n\nfor i in range(n):\n a[i].append(i+1)\n\na_point = sorted(a, key = lambda x: int(x[1]), reverse = True)\nprint(a_point)\na_name = sorted(a_point, key = lambda x: x[0])\nprint(a_name)\nans = []\n\nfor i in a_name:\n print(i[2])', 'n = int(input())\na... | ['Wrong Answer', 'Accepted'] | ['s070025820', 's645260916'] | [3064.0, 3188.0] | [18.0, 18.0] | [282, 218] |
p03030 | u832409298 | 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 sys\ndef LI(): return [int(x) for x in sys.stdin.readline().split()]\ndef II(): return int(sys.stdin.readline())\ndef LS(): return sys.stdin.readline().split()\nsys.setrecursionlimit(10**7)\nINF = 10 ** 18\nMOD = 10 ** 9 + 7\ndef LI_(): return [int(x) - 1 for x in sys.stdin.readline().split()]\ndef LF(): retur... | ['Wrong Answer', 'Accepted'] | ['s396823604', 's105753694'] | [3064.0, 3064.0] | [18.0, 17.0] | [712, 698] |
p03030 | u836939578 | 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\nL = [[] for _ in range(N)]\n\nfor i in range(N):\n a, b = input().split()\n b = int(b)\n L[i].append(a)\n L[i].append(b)\n\n\nsort_L = sorted(L)\n\nfor i in range(N-1):\n for j in range(i+1, N):\n if sort_L[i][0] == sort_L[j][0]:\n if sort_L[i][1] <= sort_L[j][1]:\... | ['Wrong Answer', 'Accepted'] | ['s074475915', 's069511720'] | [3064.0, 3060.0] | [21.0, 17.0] | [474, 221] |
p03030 | u838299083 | 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 sys import stdin\nfrom copy import deepcopy\n\n\nn = int(stdin.readline().rstrip())\ndata = [stdin.readline().rstrip().split() for _ in range(n)]\nfor i, list in enumerate(data):\n list[1] = int(list[1])\n list.append(i+1)\n\nsortdata = sorted(data, key=lambda x: (x[0], -x[1]))\nprint(sortdata)\n\nfor i, l... | ['Wrong Answer', 'Accepted'] | ['s142319693', 's235307227'] | [3444.0, 3444.0] | [25.0, 22.0] | [352, 336] |
p03030 | u838959206 | 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\ns = [0]*n\np = [0]*n\n\nlist_2d = [[] for _ in range(n)]\n\nfor i in range(n):\n s, p = input().split()\n list_2d[i].append(s)\n list_2d[i].append(p)\nlist_2d_sorted = sorted(list_2d, key = lambda x: (x[0],x[1]))\nfor i in range(n):\n print(list_2d.index(list_2d_sorted[i])+1)', 'n = in... | ['Wrong Answer', 'Accepted'] | ['s508067362', 's882087926'] | [3064.0, 3060.0] | [17.0, 18.0] | [295, 279] |
p03030 | u842388336 | 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 numpy as np\n\nn = int(input())\nnum_list = [i for i in range(n)]\ncity_list = []\npoint_list = []\n\nfor _ in range(n):\n temp = input().split()\n city_list.append(temp[0])\n point_list.append(int(temp[1]))\n \ncity_set = list(set(city_list))\ncity_set.sort()\n\nans=[]\nfor name in city_set:\n temp = lis... | ['Wrong Answer', 'Accepted'] | ['s647059311', 's275245265'] | [12244.0, 12244.0] | [154.0, 161.0] | [703, 701] |
p03030 | u844123804 | 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... | ["count = int(input())\n\nsonomama = []\ncity = {}\nfor i in range(count):\n score = input().split()\n sonomama.append(' '.join(score))\n if score[0] not in city:\n city[score[0]] = []\n city[score[0]].append(score[1])\n\ncity = sorted(city.items())\nprint(city)\n\nfor item in city:\n holder = sor... | ['Wrong Answer', 'Accepted'] | ['s613021763', 's278268552'] | [3064.0, 3064.0] | [19.0, 18.0] | [437, 421] |
p03030 | u845148770 | 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())\nSP = []\nfor i in range(N):\n s, p = input().split()\n p = int(p)\n SP.append((s, -n, i))\nSP.sort()\n\nfor s, n, i in SP:\n print(i+1)\n', '\nN = int(input())\nSP = []\nfor i in range(N):\n s, n = input().split()\n n = int(n)\n SP.append((s, -n, i))\nSP.sort()\n\nfor s, n, i ... | ['Runtime Error', 'Accepted'] | ['s661644463', 's567948046'] | [2940.0, 2940.0] | [17.0, 20.0] | [158, 158] |
p03030 | u847861620 | 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())\nguide = []\nfor i in range(N):\n lst = input().split(' ')\n guide.append([i+1,lst[0],int(lst[1])])\nguide = sorted(guide, key=itemgetter(2),reverse=True)\nguide = sorted(guide, key=itemgetter(1))\n\nprint(guide)\n", "from operator import itemgetter\nN = int(input()... | ['Wrong Answer', 'Accepted'] | ['s151469988', 's839018719'] | [3060.0, 3060.0] | [18.0, 18.0] | [256, 282] |
p03030 | u848336553 | 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())\nrestraunt = [[] for i in range(n)]\nfor i in range(n):\n s, p = input().split()\n p = int(p)\n restraunt[i] = [i, s, p]\nrestraunt.sort(key = lambda restraunt: (restraunt[1], restraunt[2]), reverse = True)\nfor i in range(n):\n print(restraunt[i][0])', 'n = int(input())\nrestraunt = [[] ... | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s028305920', 's667092345', 's984323819'] | [3060.0, 3060.0, 3064.0] | [17.0, 17.0, 18.0] | [272, 243, 259] |
p03030 | u852058690 | 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())\ninp = [input() for i in range(N)]\n\nimport numpy as np\n\ns_list = []\np_list = []\n#sp_list = []\nfor i in inp:\n s_list.append(i.split()[0])\n p_list.append(int(i.split()[1]))\n #sp_list.append(i.split())\nsp_list = []\nfor i in range(N):\n sp_list.append([s_list[i],p_list[i]])\n\n\ns... | ['Runtime Error', 'Wrong Answer', 'Accepted'] | ['s047784769', 's095272595', 's867162222'] | [12496.0, 12504.0, 12504.0] | [149.0, 151.0, 150.0] | [638, 608, 613] |
p03030 | u852068828 | 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 = []\n[SP.append(input().split()) for i in range(N)]\nfor i in range(N):\n SP[i][1] = int(SP[i][1])\nSP.sort(reverse=True)\nSP.sort(key=lambda x: x[0])\nprint(SP)', 'N = int(input())\nSP = []\n\n\n[SP.append(input().split() + [i])for i in range(N)]\n\n\nfor i in range(N):\n SP[i][1] = int(S... | ['Wrong Answer', 'Accepted'] | ['s719096920', 's436171275'] | [3060.0, 3064.0] | [17.0, 18.0] | [179, 220] |
p03030 | u853478922 | 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())\nl=list()#empty list\n\nfor i in range(1,N+1):\n tempS,tempP = input().split()\n l.append([tempS,-int(tempP),i])\n\nsortedList = sorted(l,key=lambda item:(item[0],item[1]))\n\nprint(sortedList)\nfor i in range(1,N+1):\n print(sortedList[i-1][2])\n', 'N = int(input())\nl=list()#empty list\n... | ['Wrong Answer', 'Accepted'] | ['s764511178', 's796595212'] | [3060.0, 3060.0] | [18.0, 17.0] | [262, 243] |
p03030 | u856775981 | 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\nss = dict()\nsss = dict()\nfor i in range(N):\n s, p = input().split()\n sss[s, p] = i + 1\n if s in ss:\n ss[s] = ss[s] + ',' + p\n else:\n ss[s] = p\n\nprint(ss)\nss_sorted = sorted(ss.items())\n\nfor tmp_ss in ss_sorted:\n s = tmp_ss[0]\n ps = list(map(int, tmp_s... | ['Wrong Answer', 'Runtime Error', 'Accepted'] | ['s756012950', 's884890849', 's749641988'] | [9216.0, 3060.0, 3060.0] | [23.0, 18.0, 18.0] | [392, 203, 204] |
p03030 | u863397945 | 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.append([s,int(p),i+1])\n\nl = sorted(l,key = lambda x:x[1],reverse=True)\nl = sorted(l,key = lambda x:x[0])\n\nfor i in range(N):\n print(l[2])', 'N = int(input())\nl = []\nfor i in range(N):\n s,p = input().split()\n l.append([s,... | ['Runtime Error', 'Accepted'] | ['s981915794', 's555111768'] | [9108.0, 9132.0] | [26.0, 32.0] | [215, 218] |
p03030 | u863442865 | 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\nd = [input().split() + [i+1] for i in range(N)]\nd = sorted(d, key=lambda x:x[1], reverse=True)\nd = sorted(d, key=lambda x:x[0], reverse=False)\nfor s in d:\n print(s[-1])', 'n = int(input())\n\nd = [input().split() + [i+1] for i in range(n)]\nd = sorted(d, key=lambda x:int(x[1]), reverse=True... | ['Runtime Error', 'Accepted'] | ['s653768896', 's797386015'] | [3060.0, 3060.0] | [17.0, 18.0] | [189, 194] |
p03030 | u863980266 | 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... | ['\nimport numpy\n\nN = int(input())\n\nscores = {}\nindexes = {}\nfor i in range(N):\n s, p = input().split()\n p = int(p)\n if s in scores:\n scores[s].append(p)\n indexes[s].append(i)\n else:\n scores[s] = [p]\n indexes[s] = [i]\n\nprint(scores)\nprint(indexes)\n\n\n\n# N = 6\... | ['Wrong Answer', 'Accepted'] | ['s413723320', 's646809718'] | [13220.0, 12424.0] | [161.0, 147.0] | [547, 551] |
p03030 | u866769581 | 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... | ['#b.py\nn = int(input())\nlis = [list(input().split())+[x] for x in range(n)]\nlis = sorted(lis,key=lambda x:x[0])\nnow = lis[0][0]\nans_lis = []\nsublis = []\nfor x in lis:\n if x[0] == now:\n sublis.append(x)\n else:\n now = x[0]\n sublis = sorted(sublis,key=lambda x:int(x[1]),reverse=True... | ['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Runtime Error', 'Accepted'] | ['s272838127', 's679102615', 's722447321', 's881112470', 's164701517'] | [3064.0, 3064.0, 3064.0, 3064.0, 3064.0] | [17.0, 18.0, 17.0, 18.0, 18.0] | [629, 614, 578, 446, 589] |
p03030 | u867005447 | 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())\nsp = []\nfor i in range(n):\n row = input().split()\n row[1] = - int(row[1])\n row.append(i+1)\n sp.append(row)\n\nsp.sort(key=itemgetter(0, 1))\nfor index in sp:\n print(index[2])\nprint(sp)\n\n', 'from operator import itemgetter\n\nn = int(input())... | ['Wrong Answer', 'Accepted'] | ['s660596058', 's340175280'] | [3060.0, 3060.0] | [18.0, 18.0] | [248, 238] |
p03030 | u867069435 | 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\ndata = dict()\n\nfor i in range(1, n + 1):\n city, score = input().split()\n data[city] = [int(score), i]\n\nfor key in sorted(data.keys()):\n for _, num in sorted(data[key], key=lambda x: -x[0]):\n print(num)', 'n = int(input())\n\ndata = dict()\n\nfor i in range(1, n + 1):\n city, score... | ['Runtime Error', 'Accepted'] | ['s965077340', 's832215308'] | [3060.0, 3064.0] | [18.0, 18.0] | [225, 291] |
p03030 | u868136545 | 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 functools as f\n\ndef to_num(a, b):\n if a > b:\n return 1\n if b > a:\n return -1\n return 0\n\ndef cmp(a, b):\n if (a[0] == b[0]):\n return to_num(b[1], a[1])\n return to_num(a[0], b[0])\n\nn = int(input())\nA = []\nfor i in range(n):\n a, b = input().split()\n A.app... | ['Wrong Answer', 'Accepted'] | ['s336503220', 's565577583'] | [3572.0, 3572.0] | [23.0, 23.0] | [491, 422] |
p03030 | u868344991 | 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=[100]*N\nP=[100]*N\nfor num in range(N):\n S[num]=input().split()\n S[num].append(num+1)\n S[num][1]=int(S[num][1])\nprint(S)\nS.sort()\nflag=0\nflag2=0\nwhile(flag==0):\n flag2=0\n for num in range(0,N-1):\n if(S[num][0]==S[num+1][0]):\n if(S[num][1]<S[num+1][1... | ['Wrong Answer', 'Accepted'] | ['s990334581', 's584826803'] | [3064.0, 3064.0] | [20.0, 20.0] | [479, 464] |
p03030 | u870062840 | 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\ndef input_list(num,args):\n for i in range(num):\n S,P = input().split()\n args.append([S,P])\n\ndef sort_list(*args):\n tmp=sorted(args,key=itemgetter(1),reverse=1)\n dict_sorted=sorted(tmp,key=itemgetter(0))\n\n return dict_sorted\n\n\n\ndef main():\n ... | ['Wrong Answer', 'Runtime Error', 'Accepted'] | ['s603073681', 's830201349', 's793650911'] | [3064.0, 3064.0, 3188.0] | [19.0, 17.0, 20.0] | [1340, 1253, 1669] |
p03030 | u875377810 | 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 a=input().split()\n a[1]=int(a[1])\n s.append(a)\ns.sort(key=lambda x:(x[0],-x[1]))\nprint(s)', 'n=int(input())\ns=[]\nfor i in range(n):\n a=input().split()\n a[1]=int(a[1])\n a.append(i)\n s.append(a)\ns.sort(key=lambda x:(x[0],-x[1]))\nfor i in range(... | ['Wrong Answer', 'Accepted'] | ['s613376566', 's243500838'] | [2940.0, 3060.0] | [17.0, 17.0] | [138, 185] |
p03030 | u884323674 | 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_dict = {}\ncity_list = []\nfor i in range(N):\n city, score = input().split()\n if city not in city_list:\n city_list.append(city)\n rest_dict[city] = [[score, i]]\n else:\n rest_dict[city].append([score, i])\n\ncoty_list = sorted(city_list)\nfor city in city_list:... | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s182765468', 's988832888', 's435327724'] | [3060.0, 3064.0, 3064.0] | [18.0, 18.0, 18.0] | [438, 422, 448] |
p03030 | u885630173 | 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 numpy as np\nN = int(input())\nname_list = []\nscore_list = []\nscore_list_new = []\nfor i in range(N):\n name, score = map(str,input().split())\n name_list.append(name)\n score_list.append(int(score))\nindex_name = np.argsort(name_list)\nfor i in range (len(score_list)):\n score_list_new.append(score_lis... | ['Runtime Error', 'Accepted'] | ['s090976159', 's209283559'] | [3064.0, 12496.0] | [17.0, 150.0] | [622, 333] |
p03030 | u886142147 | 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 = [input().split() for _ in range(n)]\nans = list(range(1, n + 1))\n\nfor i in range(n):\n j = i\n while j > 0:\n if T[j][0] < T[j - 1][0]:\n T[j], T[j - 1] = T[j - 1], T[j]\n ans[j], ans[j - 1] = ans[j - 1], ans[j]\n j = j - 1\n else:\n ... | ['Wrong Answer', 'Accepted'] | ['s238550241', 's240492991'] | [3064.0, 3064.0] | [20.0, 19.0] | [596, 622] |
p03030 | u887207211 | 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()+[0] for _ in range(N)]\nr = []\nfor x, y, z in SP:\n r.append([x, int(y), z])\n\nsortV = sorted(r, key = lambda x: -x[1])\nsortK = sorted(sortV, key = lambda x: x[0])\n\ng = 1\nfor i in range(N):\n sortK[i][2] = g\n g += 1\n\nfor c in r:\n print(c[2])', 'N = int(input())\nS... | ['Wrong Answer', 'Accepted'] | ['s744392645', 's761233278'] | [3064.0, 3064.0] | [18.0, 19.0] | [280, 238] |
p03030 | u887924592 | 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\ns = {}\nfor i in range(n):\n a, b=input().split()\n if a in s:\n s[a].append((i+1, int(b)))\n else:\n s[a]=[(i+1, int(b))]\n\nprint(s)\nfor key in sorted(s):\n for i, score in sorted(s[key], key=lambda t:~t[1]):\n print(i)\n', 'n = int(input())\n\ns = {}\nfor i in ... | ['Wrong Answer', 'Accepted'] | ['s458432160', 's028575454'] | [3060.0, 3060.0] | [18.0, 18.0] | [263, 254] |
p03030 | u888933875 | 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 i in range(n)]\ntmp_l = sorted(l, key=lambda x: x[1],reverse=True)\nans=sorted(tmp_l,key=lambda x: x[0])\nfor i in range(n):\n print(1+ans.index(ans[i]))', 'n=int(input())\nl=[input().split() for i in range(n)]\ntmp=sorted(l, key=lambda x: x[1],reverse=True)\ntmp=sorted(tmp,key=... | ['Wrong Answer', 'Runtime Error', 'Accepted'] | ['s449357800', 's915242851', 's154295794'] | [9144.0, 9184.0, 9096.0] | [27.0, 28.0, 29.0] | [187, 225, 237] |
p03030 | u891218252 | 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_list = list()\nfor i in range(n):\n input_ = input().split()\n input_[1] = int(input_[1])\n input_.append(i + 1)\n s_p_list.append(input_)\n\n\ns_p_list.sort(key=lambda x: (x[0], -x[1]))\n\nprint(s_p_list)\n\nfor s, p, i in s_p_list:\n print(i)\n', 'n = int(input())\ns_p_list = li... | ['Wrong Answer', 'Accepted'] | ['s938669919', 's060330889'] | [3060.0, 3060.0] | [18.0, 20.0] | [268, 270] |
p03030 | u893063840 | 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())\nr = []\nfor i in range(n):\n city, score = map(str, input().split())\n score = int(score)\n r.append((city, score, i+1))\n\nr.sort(key=lambda x: x[1], reverse=True)\nprint(r)\nr.sort(key=lambda x: x[0])\nprint(r)\n\nfor x in r:\n print(x[2])\n', 'n = int(input())\nr = []\nfor i in range(... | ['Wrong Answer', 'Accepted'] | ['s530023256', 's493130948'] | [3060.0, 3060.0] | [20.0, 18.0] | [259, 241] |
p03030 | u898999125 | 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 = [[0, 0, 0] for i in range(n)]\nfor i in range(n):\n sp[i][0], sp[i][1] = list(map(str, input().split()))\n sp[i][1] = int(sp[i][1])\n sp[i][2] = i+1\nsp.sort()\nprint(sp)\n\nc=1\nfor i in range(n-1):\n if sp[i][0] == sp[i+1][0]:\n c+=1\n i+=1\n else:\n for j in range(c):\n pr... | ['Wrong Answer', 'Accepted'] | ['s638089337', 's747524854'] | [3064.0, 3064.0] | [18.0, 18.0] | [366, 356] |
p03030 | u904804404 | 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 = [(lambda x, v: (x, -int(v)))(*input().split()) for i in range(N)]\ns2 = s.copy()\n\ns.sort()\n\nprint(s)\nfor i in s:\n print(s2.index(i)+1)\n', 'N = int(input())\ns = [(lambda x, v: (x, -int(v)))(*input().split()) for i in range(N)]\ns2 = s.copy()\n\ns.sort()\nfor i in s:\n print(s2.index... | ['Wrong Answer', 'Accepted'] | ['s617565468', 's034053347'] | [3060.0, 3060.0] | [17.0, 17.0] | [158, 148] |
p03030 | u905268546 | 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())\nR = []\nfor i in range(N):\n s, p = input().split()\n R.append((s, -int(p), i))\n\nR.sort()\nprint(R)\nfor i in R:\n print(i[2] + 1)\n', 'N = int(input())\nR = []\nfor i in range(N):\n s, p = input().split()\n R.append((s, -int(p), i))\n\nR.sort()\nfor i in R:\n print(i[2] + 1)\n'] | ['Wrong Answer', 'Accepted'] | ['s953382967', 's993224652'] | [3060.0, 3060.0] | [17.0, 17.0] | [151, 142] |
p03030 | u907223098 | 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=[]\nb=[i+1 for i in range(n)]\nfor i in range(n):\n m,l=(j for j in input().split())\n a.append([m,l])\nfor i in range(n):\n for j in range(n-1):\n if a[j+1][0]<a[j][0] or (a[j+1][0]==a[j][0] and a[j][1]<a[j+1][1]):\n c=a[j]\n a[j]=a[j+1]\n a[j+1... | ['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Runtime Error', 'Runtime Error', 'Accepted'] | ['s069668646', 's266387317', 's394077594', 's511901191', 's637182830', 's279002676'] | [3064.0, 3064.0, 3064.0, 3064.0, 2940.0, 3064.0] | [24.0, 24.0, 23.0, 17.0, 17.0, 23.0] | [464, 422, 418, 449, 414, 428] |
p03030 | u910830417 | 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\nN = int(input())\n\nmy_list = []\n\nfor i in range(N):\n t, c = input().split()\n my_list.append((t, int(c), i+1))\n\ndef cmp(a, b):\n if a == b: return 0\n return -1 if a < b else 1\n\nmy_list.sort(key=cmp_to_key(lambda x, y: cmp(x[0], y[0]) or cmp(x[1], y[1])))\n\nfor m... | ['Wrong Answer', 'Accepted'] | ['s666005582', 's037264986'] | [3572.0, 3572.0] | [26.0, 23.0] | [333, 332] |
p03030 | u912179452 | 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 = []\nname = []\nfor i in range(N):\n x = list(input().split())\n x = [x[0], int(x[1]), int(i)]\n name.append(x[0])\n SP.append(x)\n\n\n# sort on secondary key\ns = sorted(SP, key=lambda x: (x[0], x[1]),reverse=True)\n# now sort on primary key, descending\n\n\nfor i in range(N):\n ... | ['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s409374133', 's674944182', 's769590138', 's515580517'] | [3064.0, 3060.0, 3064.0, 3060.0] | [17.0, 17.0, 18.0, 18.0] | [370, 251, 357, 246] |
p03030 | u920204936 | 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 = [[i for i in input().split()] for j in range(N)]\nfor i in range(N):\n data[i].append(i+1)\nsort_data = sorted(data)\nprint(sort_data)\nstart = sort_data[0][0]\nnum = [sort_data[0][2]]\nfor i in range(1,N):\n if sort_data[i][0] == start:\n num.append(sort_data[i][2])\n else:\n... | ['Wrong Answer', 'Accepted'] | ['s135127392', 's897368986'] | [3064.0, 3064.0] | [18.0, 17.0] | [497, 516] |
p03030 | u921773161 | 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 = [0 for i in range(N)]\nfor i in range(N):\n A[i] = list(map(int,input().split()))\n\nA.sort()\nfor i in range(N):\n print(A[i])', 'N = int(input())\nA = [0 for i in range(N)]\nfor i in range(N):\n A[i] = list(map(str,input().split()))\n\nA.sort()\nfor i in range(N):\n print(A[i])', '... | ['Runtime Error', 'Wrong Answer', 'Wrong Answer', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Wrong Answer', 'Runtime Error', 'Accepted'] | ['s077776745', 's248005356', 's377552626', 's384211707', 's430529779', 's490185817', 's651260600', 's705442299', 's910911621', 's612458906'] | [2940.0, 3060.0, 3060.0, 2940.0, 3064.0, 2940.0, 2940.0, 3188.0, 2940.0, 3064.0] | [17.0, 18.0, 17.0, 17.0, 18.0, 17.0, 17.0, 19.0, 17.0, 18.0] | [148, 148, 223, 120, 270, 117, 56, 270, 123, 326] |
p03030 | u923105140 | 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 = [list(input().split()) for _ in range(n)]\nfor i in range(len(sp)):\n sp[i][1] = int(sp[i][1])\nd = sorted(sp, key=lambda x:(x[0],-x[1]))\nfor i in range(len(sp)):\n print(sp.index(d[i]))', 'n = int(input())\nsp = [list(map(int, input().split())) for _ in range(n)]\n\nsorted(sp, key=lambd... | ['Wrong Answer', 'Runtime Error', 'Runtime Error', 'Accepted'] | ['s278781028', 's285880078', 's615142283', 's103745957'] | [3060.0, 3060.0, 3060.0, 3060.0] | [18.0, 18.0, 18.0, 18.0] | [210, 154, 167, 212] |
p03030 | u925567828 | 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\nlst = [list(input().split())+[i+1] for i in range(n)]\n\n\nlst2 = sorted(lst, key=lambda x:(x[0],int(x[1])))\nfor p in range(n):\n print(lst[p][2])', 'n = int(input())\nlst = [list(input().split())+[i+1] for i in range(n)]\n\n#print(lst)\n\nlst = sorted(lst, key= lambda x:(x[0],-int(x[1])))\npr... | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s468645059', 's820631530', 's667106428'] | [3060.0, 3060.0, 3060.0] | [18.0, 17.0, 17.0] | [254, 186, 163] |
p03030 | u925712467 | 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())\nlist1 = [(input() + " " + str(i+1)).split() for i in range(N)]\n \nlist1 = [a for a in lis]\n \nlist1.sort(key=lambda a: int(a[1]), reverse=True)\nlist1.sort(key=lambda a: a[0])\n \n \nfor i in list1:\n print(i[2])\n', 'N = int(input())\nlis = [(input() + " " + str(i+1)).split() for i in range(N)... | ['Runtime Error', 'Wrong Answer', 'Runtime Error', 'Accepted'] | ['s433967156', 's796724890', 's804698637', 's788386845'] | [9064.0, 9128.0, 8880.0, 9172.0] | [20.0, 28.0, 27.0, 26.0] | [226, 201, 216, 156] |
p03030 | u926080943 | 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... | ['package main\n\nimport (\n\t"fmt"\n\t"sort"\n\t"strconv"\n)\n\ntype Restaurant struct {\n\tS string\n\tP int\n\tIdx int\n}\n\nfunc solve() {\n\tvar ts string\n\tvar N int\n\tfmt.Scan(&N)\n\n\tvar restaurants []Restaurant\n\tfor i := 0; i < N; i++ {\n\t\tvar s string\n\t\tfmt.Scan(&s, &ts)\n\t\tp, _ := strconv.Atoi(s)... | ['Runtime Error', 'Accepted'] | ['s913189233', 's261054682'] | [2940.0, 3064.0] | [17.0, 17.0] | [618, 236] |
p03030 | u926393759 | 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 numpy as np\nN = int(input())\na = []\nfor i in range(N):\n S, P = input().split()\n a.append((S, 100-P, i+1))\na.sort()\nfor i in a:\n print(i[2])\n\n ', 'import numpy as np\nN = int(input())\na = []\nfor i in range(N):\n S, P = input().split()\n a.append((S, 100-int(P), i+1))\na.sort()\nfor i in a:\n ... | ['Runtime Error', 'Accepted'] | ['s151471353', 's688561999'] | [12504.0, 12504.0] | [150.0, 148.0] | [153, 158] |
p03030 | u931489673 | 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 n in range(N):\n S.append(input())\nd={}\nfor s in S:\n s=s.split(" ")\n c=s[0]\n n=s[1]\n if c not in d:\n d[c]=[]\n d[c].append(n)\nd_sorted=sorted(d.items(), key=lambda x:x[0])\nfor k in d_sorted:\n for p in k[1]:\n key = k[0] + " " + p\n prin... | ['Wrong Answer', 'Accepted'] | ['s084127325', 's658279090'] | [3064.0, 3064.0] | [17.0, 18.0] | [320, 359] |
p03030 | u932868243 | 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())\nlists=[list(input().split()) for x in range(n)]\nfor x in range(n):\n lists[x].append(x+1)\nlists.sort(key=lambda x:x[1] reverse=True)\nlists.sort(key=lambda x:x[0])\nfor x in range(n):\n print(lists[x][2])\n ', 'n=int(input())\nlists=[list(input().split()) for x in range(n)]\nfor y in ran... | ['Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted'] | ['s002142637', 's190317664', 's195763080', 's201422622', 's707236764', 's854561978', 's307449621'] | [2940.0, 2940.0, 2940.0, 3060.0, 3060.0, 3060.0, 3060.0] | [17.0, 17.0, 17.0, 17.0, 18.0, 18.0, 17.0] | [229, 217, 217, 184, 247, 199, 180] |
p03030 | u934259576 | 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().strip())\n\nlist = [input().strip().split() for i in range(N)]\n\nfrom operator import itemgetter\nsort1 = sorted(list, key=itemgetter(1), reverse=True)\nsort2 = sorted(sort1, key=itemgetter(0))\n\nfor i in range(N):\n print(sort2.index(list[i]) + 1)', 'N = int(input().strip())\n\nlist = [input() f... | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s156287307', 's275919930', 's724895965'] | [3060.0, 3060.0, 3060.0] | [18.0, 17.0, 18.0] | [260, 271, 268] |
p03030 | u934868410 | 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())\ncitynames = set()\ncitydict = dict()\n\nfor i in range(n):\n s,p = input().split()\n citynames.add(s)\n if not s in citydict:\n citydict[s] = [(int(p), i)]\n else:\n citydict[s].append((int(p), i))\n\nfor name in sorted(citynames):\n for point in sorted(citydict[name], reverse=True):\n ... | ['Wrong Answer', 'Accepted'] | ['s271620229', 's860009358'] | [3064.0, 3064.0] | [18.0, 18.0] | [320, 322] |
p03030 | u939757770 | 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=[]\n\nfor i in range(n):\n s,p = input().split()\n p = int(p)\n d.append([s,p,i])\n\nd.sort()\nfor i in range(n):\n print(int(d[i][2])+1)', 'import numpy as np\n\nn = int(input())\nd=[]\n\nfor i in range(n):\n s,p = input().split()\n p = int(p)\n d.append([s,p,i])\n\nd.sort()\... | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s529292099', 's812424859', 's110734683'] | [3060.0, 12248.0, 3060.0] | [17.0, 148.0, 17.0] | [159, 179, 190] |
p03030 | u940096920 | 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.append([s, int(p), i])\nl.sort(key=lambda x:(x[0], -x[1]))\n_ = [print(a[2]) for a in l]", "N = int(input())\nl = []\nfor i in range(N):\n s, p = input().split(' ')\n l.append([s, int(p), i+1])\nl.sort(key=lambda x:(x[0], -x[1]))... | ['Wrong Answer', 'Accepted'] | ['s608983396', 's298193503'] | [3060.0, 2940.0] | [17.0, 17.0] | [165, 168] |
p03030 | u940622864 | 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=[[]*3 for ii in range(n)]\nfor ii in range(n):\n s=input().split()\n a[ii][0]=s[0]\n a[ii][1]=-int(s[1])\n a[ii][2]=ii\na.sort()\nfor ii in range(n):\n print(a[ii][2]+1)', 'n=int(input())\na=[[""]*3 for ii in range(n)]\nfor ii in range(n):\n s=input().split()\n #print(s)\n a[ii][0]=s[0]\n a... | ['Runtime Error', 'Accepted'] | ['s231726961', 's595441166'] | [3060.0, 3064.0] | [17.0, 18.0] | [183, 200] |
p03030 | u941284420 | 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 numpy as np\nN = int(input())\nSP = [list((list(map(str,input().split())),i)) for i in range(N)]\n\nS=[""]*N\nfor i,x in enumerate(SP):\n SP[i] = x[0][0],int(x[0][1]),x[1]\n S[i]= x[0][0]\n\nSP = sorted(SP)\ns_ = np.unique(np.array(S))\nflag=1\n\nwhile flag:\n for s in s_:\n swap_count=0\n same_s_coun... | ['Wrong Answer', 'Accepted'] | ['s724401945', 's612794280'] | [12436.0, 3060.0] | [151.0, 17.0] | [691, 163] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.