Search is not available for this dataset
name stringlengths 2 112 | description stringlengths 29 13k | source int64 1 7 | difficulty int64 0 25 | solution stringlengths 7 983k | language stringclasses 4
values |
|---|---|---|---|---|---|
p03030 AtCoder Beginner Contest 128 - Guidebook | 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... | 6 | 0 | N = int(input())
A = []
for n in range(N):
s,p = input().split(" ")
A.append([s,-int(p),n+1])
A.sort()
for a in A:
print(a[2]) | PYTHON3 |
p03030 AtCoder Beginner Contest 128 - Guidebook | 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... | 6 | 0 | n=int(input())
sp=[]
for i in range(n):
s,p=map(str,input().split())
sp.append([s,-int(p),i+1])
sp.sort()
for ans in sp:
print(ans[-1]) | PYTHON3 |
p03030 AtCoder Beginner Contest 128 - Guidebook | 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... | 6 | 0 | #include<bits/stdc++.h>
#define For(a,b,c) for(int a=b;a<=c;++a)
using namespace std;
const int N=103;
string S[N];
int P[N],C[N];
bool cmp(int x,int y) {
return S[x]<S[y]||(S[x]==S[y]&&C[x]>C[y]);
}
int main() {
int n;
cin>>n;
For(i,1,n) cin>>S[i]>>C[i],P[i]=i;
sort(P+1,P+1+n,cmp);
For(i,1,n) printf("%d\n",P[i])... | CPP |
p03030 AtCoder Beginner Contest 128 - Guidebook | 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... | 6 | 0 | import java.util.*;
class Main{
public static void main(String[]args){
Scanner sc=new Scanner(System.in);
int n=sc.nextInt();
String[] s=new String[n];
int[] p=new int[n];
int[] ans=new int[n];
for(int i=0;i<n;i++){
s[i]=sc.next();
p[i]=sc.nextInt();
ans[i]=i+1;
}
int... | JAVA |
p03030 AtCoder Beginner Contest 128 - Guidebook | 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... | 6 | 0 | #include <bits/stdc++.h>
using namespace std;
int main(){
string s;
int n,p; cin>>n;
vector<tuple<string,int,int>> v;
for(int i=1;i<=n;i++){cin>>s>>p; v.push_back(make_tuple(s,-p,i));}
sort(v.begin(),v.end());
for(auto& t:v) cout<<get<2>(t)<<endl;
} | CPP |
p03030 AtCoder Beginner Contest 128 - Guidebook | 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... | 6 | 0 | n=int(input())
t=[]
for i in range(n):
x,y=input().split()
b=[x,-int(y),i+1]
t.append(b)
t.sort()
for a in t:
print(a[2]) | PYTHON3 |
p03030 AtCoder Beginner Contest 128 - Guidebook | 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... | 6 | 0 | #include <bits/stdc++.h>
using namespace std;
int main() {
string s;
int n, a;
vector<tuple<string, int, int> > v;
cin >> n;
for (int i = 1; i<=n; ++i) {
cin >> s >> a;
v.emplace_back(s, -a, i);
}
sort(v.begin(), v.end());
for (int i = 0; i<n; ++i) {
cout << get<2>(v[i]) << en... | CPP |
p03030 AtCoder Beginner Contest 128 - Guidebook | 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... | 6 | 0 | N = int(input())
P = [input().split()+[i+1] for i in range(N)]
P.sort(key=lambda x: (x[0], -int(x[1]), x[2]))
for _, _, i in P:
print(i) | PYTHON3 |
p03030 AtCoder Beginner Contest 128 - Guidebook | 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... | 6 | 0 | import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int n = Integer.parseInt(sc.next());
List<Restaurant> list = new ArrayList<>();
for (int i = 0; i < n; i... | JAVA |
p03030 AtCoder Beginner Contest 128 - Guidebook | 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... | 6 | 0 | #include <iostream>
#include <vector>
#include <algorithm>
using namespace std;
int main(){
int n;cin>>n;
vector <pair< pair<string,int>,int> > v(n);
for(int i=0;i<n;i++){
string s;int a;
cin>>s>>a;
v[i]=make_pair(make_pair(s,-a),i);
}
sort(v.begin(),v.end());
for(int i=0;i<n;i++){
cout<<v[i].second+1<<... | CPP |
p03030 AtCoder Beginner Contest 128 - Guidebook | 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... | 6 | 0 | #include <bits/stdc++.h>
using namespace std;
int main() {
int N;
cin >> N;
using tsii=tuple<string,int,int>;
vector<tsii> vec(N);
for(int i=0;i<N;i++){
int P;
string S;
cin >> S >> P;
vec.at(i)=make_tuple(S,100-P,i);
}
sort(vec.begin(),vec.end());
for(tsii i:vec)
cout << get<2>(i)+... | CPP |
p03030 AtCoder Beginner Contest 128 - Guidebook | 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... | 6 | 0 | n = int(input())
a = []
for i in range(n):
s, p = input().split()
a += [(s, -int(p), i + 1)]
a.sort()
{print(t[2]) for t in a} | PYTHON3 |
p03030 AtCoder Beginner Contest 128 - Guidebook | 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... | 6 | 0 | import java.util.*;
public class Main {
public static void main(String[] args) {
Scanner scan = new Scanner(System.in);
int N = scan.nextInt();
scan.nextLine();
String S;
String[] sArray;
String[][] sArray2 = new String[N][2];
Set<String> key = new TreeSet<>();
for (int i = 0; i < N; ... | JAVA |
p03030 AtCoder Beginner Contest 128 - Guidebook | 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... | 6 | 0 | import java.util.*;
public class Main {
public static void main(String[] args) {
final Scanner sc = new Scanner(System.in);
final int n = sc.nextInt();
final Map<String, Map<Integer, Integer>> v = new TreeMap<>();
for (int i = 0; i < n; i++) {
final String s = sc.next... | JAVA |
p03030 AtCoder Beginner Contest 128 - Guidebook | 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... | 6 | 0 | import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import java.util.Scanner;
public class Main implements Comparable<Main> {
int no;
String name;
Main(int no, String name) {
this.no = no;
this.name = name;
}
public int compareTo(Main main) {
int ret = this.name.compareTo(main... | JAVA |
p03030 AtCoder Beginner Contest 128 - Guidebook | 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... | 6 | 0 |
import java.util.Arrays;
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int n = sc.nextInt();
Restaurant[] restAry = new Restaurant[n];
for(int i = 0; i < n; i++){
String s = sc.next();
int p = sc.nextInt();
restAry[i] = ne... | JAVA |
p03030 AtCoder Beginner Contest 128 - Guidebook | 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... | 6 | 0 | n=int(input())
l=[]
for i in range(n):
s,p=input().split()
p=-int(p)
l.append([s,p,i+1])
l.sort()
for i in l:
print(i[-1]) | PYTHON3 |
p03030 AtCoder Beginner Contest 128 - Guidebook | 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... | 6 | 0 | import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import java.util.Scanner;
class Main {
public static void main(String args[]) {
StringBuilder sb = new StringBuilder();
Scanner sc = new Scanner(System.in);
int n = sc.nextInt();
List<rank> l = new ArrayList<>(n);
for (int i = ... | JAVA |
p03030 AtCoder Beginner Contest 128 - Guidebook | 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... | 6 | 0 | #include <bits/stdc++.h>
typedef long long ll;
using namespace std;
int main()
{
string s;
pair<pair<string,ll>,ll> res[105];
ll N,num;
cin>>N;
for(ll i=0;i<N;i++){
cin>>s>>num;
res[i]=make_pair(make_pair(s,-num),i);
}
sort(res,res+N);
for(ll i=0;i<N;i++){
cout<<res[i].second+1<<endl;
}
} | CPP |
p03030 AtCoder Beginner Contest 128 - Guidebook | 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... | 6 | 0 | #include<bits/stdc++.h>
#define ll long long
using namespace std;
struct fck
{
string c;int v,id;
bool operator<(const fck&x)const
{
return c==x.c?(v>x.v):c<x.c;
}
}a[101];
int main()
{
int n,i;cin>>n;
for (i=1;i<=n;i++) cin>>a[i].c,cin>>a[i].v,a[i].id=i;
sort(a+1,a+n+1);for (i=1;i<=n;i++) cout<<a[i].id<<endl;... | CPP |
p03030 AtCoder Beginner Contest 128 - Guidebook | 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... | 6 | 0 | import java.io.InputStream;
import java.io.PrintStream;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Comparator;
import java.util.List;
import java.util.Scanner;
public class Main {
InputStream in = System.in;
PrintStream out = System.out;
public void _main(String[] args) {
Scanner sc = ... | JAVA |
p03030 AtCoder Beginner Contest 128 - Guidebook | 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... | 6 | 0 | n=int(raw_input())
checck = {}
for i in xrange(n):
s,p=map(str,raw_input().split())
p=int(p)
if s in checck:
checck[s].append((p,i))
else:
checck.update({s:[(p,i)]})
check=list(checck)
check=sorted(check)
#print check
for i in check:
l=checck[i]
l=sorted(l)
for j in xrange(le... | PYTHON |
p03030 AtCoder Beginner Contest 128 - Guidebook | 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... | 6 | 0 | #include<bits/stdc++.h>
using namespace std;
int main(){
int n,i;
cin >> n;
vector<pair<string,int>> s(n);
for(i=0; i<n; i++){
cin >> s[i].first >> s[i].second;
s[i].second=(100-s[i].second)*1000+(i+1);
}
sort(s.begin(), s.end());
for(i=0; i<n; i++){
cout << s[i].second%1000 << endl;
}
} | CPP |
p03030 AtCoder Beginner Contest 128 - Guidebook | 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... | 6 | 0 | #include <bits/stdc++.h>
using namespace std;
int main(){
map<string, set<pair<int,int> > > lo;
int n; cin >> n;
for(int i = 0; i < n; i++){
string p; int v;
cin >> p >> v;
lo[p].insert({-v, i});
}
for(auto it : lo){
for(auto ic : it.second){
cout << ic.second + 1 << endl;
}
}
return 0;
}
| CPP |
p03030 AtCoder Beginner Contest 128 - Guidebook | 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... | 6 | 0 | #include "bits/stdc++.h"
using namespace std;
int main() {
int N, P;
string S;
vector<pair<pair<string, int>, int> > PP;
cin >> N;
for (int i = 0; i < N; i++) {
cin >> S >> P;
PP.push_back({ { S, 1000 - P }, i + 1 });
}
sort(PP.begin(), PP.end());
for (int i = 0; i < N; i++) {
cout << PP[i].second << end... | CPP |
p03030 AtCoder Beginner Contest 128 - Guidebook | 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... | 6 | 0 | import java.util.Arrays;
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int n = sc.nextInt();
String[] list = new String[n];
for (int i = 0; i < n; i++) {
list[i] = sc.next() + (1100 - sc.nextI... | JAVA |
p03030 AtCoder Beginner Contest 128 - Guidebook | 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... | 6 | 0 | import java.util.Arrays;
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner scan = new Scanner(System.in);
int n = scan.nextInt();
String[] sp = new String[n];
for (int i = 0; i < n; i++) {
String city = scan.next();
int point = scan.nextInt();
s... | JAVA |
p03030 AtCoder Beginner Contest 128 - Guidebook | 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... | 6 | 0 |
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import java.util.Scanner;
class Restaurant implements Comparable<Restaurant> {
String city;
int point;
int i;
public Restaurant(String city, int point, int i) {
this.city = city;
this.point = point;
this.i = i;
}
public in... | JAVA |
p03030 AtCoder Beginner Contest 128 - Guidebook | 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... | 6 | 0 | n=int(input())
d=[]
for i in range(n):
s,p=input().split()
d.append((s,100-int(p),i+1))
d.sort()
for i in range(n):
print(d[i][2])
| PYTHON3 |
p03030 AtCoder Beginner Contest 128 - Guidebook | 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... | 6 | 0 | #include <bits/stdc++.h>
using namespace std;
int main() {
int N;
cin >>N;
vector<tuple<string,int,int>> a;
for(int i=1;i<=N;i++){
string s;
int p;
cin >> s >> p;
p = -p;
a.push_back(tie(s,p,i));
}
sort(a.begin(),a.end());
for(int i=0;i<N;i++){
cout << get<2>(a[i]) <<endl;
}
}... | CPP |
p03030 AtCoder Beginner Contest 128 - Guidebook | 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... | 6 | 0 | a = range(1, int(input())+1)
b = sorted(a, key=lambda _:[(s, -int(p)) for s, p in[input().split()]])
print(*b) | PYTHON3 |
p03030 AtCoder Beginner Contest 128 - Guidebook | 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... | 6 | 0 | N = int(input())
a = []
for i in range(N):
S, P = input().split()
a.append((S, -int(P), i + 1))
a.sort()
for _, _, i in a:
print(i) | PYTHON3 |
p03030 AtCoder Beginner Contest 128 - Guidebook | 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... | 6 | 0 | #include <bits/stdc++.h>
using namespace std;
int main(){
int N;
cin>>N;
vector<pair<pair<string,int>,int>> A(N);
string S;
int P;
for(int i=0;i<N;i++){
cin>>S;
cin>>P;
A[i]={{S,100-P},i+1};
}
sort(A.begin(),A.end());
for(int i=0;i<N;i++){
cout<<A[i].second<<endl;
}
} | CPP |
p03030 AtCoder Beginner Contest 128 - Guidebook | 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... | 6 | 0 | import java.util.ArrayList;
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int n = Integer.parseInt(sc.next());
String[] city = new String[n];
int[] point = new int[n];
ArrayList<Integer> result = new ArrayList<Integer>();
for... | JAVA |
p03030 AtCoder Beginner Contest 128 - Guidebook | 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... | 6 | 0 | import java.util.*;
public class Main {
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
int a = sc.nextInt();
int [] in = new int [a];
String [] str = new String [a];
int [] b = new int [a];
for(int i=0;i<a;i++){str[i] = sc.next();
... | JAVA |
p03030 AtCoder Beginner Contest 128 - Guidebook | 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... | 6 | 0 | for i in sorted(range(int(input())),key=lambda _:[(s,-int(p))for s,p in[input().split()]]):print(i+1) | PYTHON3 |
p03030 AtCoder Beginner Contest 128 - Guidebook | 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... | 6 | 0 | n = int(input())
a = []
for i in range(n):
s, p = input().split()
a.append([s,-int(p),i])
a.sort()
for i in a:
print(i[-1]+1) | PYTHON3 |
p03030 AtCoder Beginner Contest 128 - Guidebook | 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... | 6 | 0 | n=int(input())
SP=[list(input().split()) +[i] for i in range(n)]
SP.sort(key=lambda x: (x[0],-int(x[1])))
for i ,j ,k in SP:
print(k+1)
| PYTHON3 |
p03030 AtCoder Beginner Contest 128 - Guidebook | 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... | 6 | 0 | import java.util.ArrayList;
import java.util.List;
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int n = Integer.parseInt(sc.next());
List<Restaurant> list = new ArrayList();
for(int i =... | JAVA |
p03030 AtCoder Beginner Contest 128 - Guidebook | 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... | 6 | 0 | #include <bits/stdc++.h>
using namespace std;
int main(){
int N;
cin >> N;
vector<tuple<string, int, int>> a(N);
string c;
int p;
for (int i=0; i<N; i++){
cin >> c >> p;
a.at(i) = make_tuple(c, -p, i+1);
}
sort(a.begin(), a.end());
for (int i=0; i<N; i++){
cout << get<2>(a.at(i)) <<... | CPP |
p03030 AtCoder Beginner Contest 128 - Guidebook | 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... | 6 | 0 | import java.util.PriorityQueue;
import java.util.Scanner;
class MyClass implements Comparable<MyClass>{
String s;int p;
int i;
@Override
public int compareTo( MyClass o ){
return this.s.compareTo(o.s)*100-Integer.compare(this.p,o.p);
}
}
public class Main {
//B Guidebook
public static void main(Stri... | JAVA |
p03030 AtCoder Beginner Contest 128 - Guidebook | 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... | 6 | 0 | import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.Scanner;
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
/**
*
* @author 9080384... | JAVA |
p03030 AtCoder Beginner Contest 128 - Guidebook | 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... | 6 | 0 | n = int(input())
a = []
for i in range(1, n + 1):
s, p = input().split()
a.append((s, -int(p), i))
a.sort()
for i in a:
print(i[2])
| PYTHON3 |
p03030 AtCoder Beginner Contest 128 - Guidebook | 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... | 6 | 0 | #include <bits/stdc++.h>
using namespace std;
int main() {
int N;
cin >> N;
vector<tuple<string, int, int>> p(N);
for(int i=0; i<N; i++){
string a;
int b;
cin >> a >> b;
p.at(i) = make_tuple(a,-b,i+1);
}
sort(p.begin(),p.end());
for(int i=0; i<N; i++){
cout << get<2>(p.at(i)) <<... | CPP |
p03030 AtCoder Beginner Contest 128 - Guidebook | 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... | 6 | 0 | A=[]
p = int(input())
for i in range(p):
j,k = input().split()
A.append([j,-int(k),i+1])
A = sorted(A)
for j,k,l in A:
print(l) | PYTHON3 |
p03030 AtCoder Beginner Contest 128 - Guidebook | 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... | 6 | 0 | n=int(input())
data=[]
for _ in range(n):
s,p=input().split()
data+=[[s,-1*int(p),_+1]]
data.sort()
for eata in data:
print(eata[2])
| PYTHON3 |
p03030 AtCoder Beginner Contest 128 - Guidebook | 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... | 6 | 0 | n=int(input())
A=[]
for i in range(1,n+1):
S,P=input().split()
A.append((S,-int(P),i))
B=sorted(A)
for f in range(n):
print(B[f][2]) | PYTHON3 |
p03030 AtCoder Beginner Contest 128 - Guidebook | 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... | 6 | 0 | _, *sp = open(0).read().split()
for a in sorted([(s, -int(p), i + 1) for i, (s, p) in enumerate(zip(*[iter(sp)] * 2))]):
print(a[2])
| PYTHON3 |
p03030 AtCoder Beginner Contest 128 - Guidebook | 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... | 6 | 0 | #include<bits/stdc++.h>
using namespace std;
pair<pair<string,int>,int> p[110];
int main()
{
int n;
cin>>n;
for(int i=0;i<n;i++)
{
string s;
int x;
cin>>s>>x;
p[i]=make_pair(make_pair(s,-x),i);
}
sort(p,p+n);
for(int i=0;i<n;i++)
cout<<p[i].second+1<<endl;
return 0;
} | CPP |
p03030 AtCoder Beginner Contest 128 - Guidebook | 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... | 6 | 0 | import java.time.Instant;
import java.util.*;
import java.util.function.ToLongFunction;
import java.util.regex.Pattern;
import java.util.stream.Collectors;
public class Main {
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
int N = sc.nextInt();
List<Pair<String, Integer>> SP = new... | JAVA |
p03030 AtCoder Beginner Contest 128 - Guidebook | 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... | 6 | 0 | import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.Comparator;
import java.util.HashMap;
import java.util.List;
import java.util.Scanner;
import java.util.AbstractMap.SimpleEntry;
public class Main {
// static final int modnum = 1e9 + 7;
public static void mai... | JAVA |
p03030 AtCoder Beginner Contest 128 - Guidebook | 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... | 6 | 0 | n = int(input())
l = []
for i in range(n):
a, b = input().split()
l.append((a, -int(b), i + 1))
l.sort()
for e in l:
print(e[2]) | PYTHON3 |
p03030 AtCoder Beginner Contest 128 - Guidebook | 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... | 6 | 0 | #include <bits/stdc++.h>
using namespace std;
int main(){
int n; cin>>n;
vector<pair<pair<string,int>,int>> sp(n);
for(int i=0; i<n; ++i){
string s; int p; cin>>s>>p;
sp[i]=make_pair(make_pair(s,100-p), i+1);
}
sort(sp.begin(),sp.end());
for(int i=0; i<n; ++i)cout<<sp[i].second<<endl;
}
| CPP |
p03030 AtCoder Beginner Contest 128 - Guidebook | 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... | 6 | 0 | import java.util.HashMap;
import java.util.Scanner;
import java.util.SortedSet;
import java.util.TreeSet;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner((System.in));
int n = sc.nextInt();
SortedSet<KeyValuePair> a = new TreeSet<KeyValuePair>();
HashMap<Integer, Integer>... | JAVA |
p03030 AtCoder Beginner Contest 128 - Guidebook | 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... | 6 | 0 | N = int(input())
x=[]
for i in range(N):
s,p = input().split()
p=int(p)
x.append((s,-p,i+1))
x.sort()
for i in range(N):
print(x[i][2]) | PYTHON3 |
p03030 AtCoder Beginner Contest 128 - Guidebook | 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... | 6 | 0 | import java.util.Arrays;
import java.util.Scanner;
class Main {
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
int N = scanner.nextInt();
Obj[] objs = new Obj[N];
for (int i = 0; i < N; i++) {
objs[i] = new Obj(scanner.next(), scanner... | JAVA |
p03030 AtCoder Beginner Contest 128 - Guidebook | 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... | 6 | 0 |
def main():
n = input()
sp = []
for i in xrange(n):
s, p = raw_input().split()
sp.append([s, -int(p), i + 1])
sp.sort()
for _, _, i in sp:
print i
if __name__ == '__main__':
main()
| PYTHON |
p03030 AtCoder Beginner Contest 128 - Guidebook | 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... | 6 | 0 | import java.util.*;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int n = sc.nextInt();
String[] s=new String[n];
for(int i = 0;i<n;i++){
String ss = sc.next();
int num = sc.nextInt();
int num2 = i+1;
//S[i]が同じ文字列だった場合、... | JAVA |
p03030 AtCoder Beginner Contest 128 - Guidebook | 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... | 6 | 0 | import java.util.*;
import java.io.*;
public class Main {
public static void main(String[] moo) throws Exception {
Scanner file = new Scanner(System.in);
int n = file.nextInt();
Moo[] m = new Moo[n];
for (int i = 0; i < n; i++) {
m[i] = new Moo(i + 1, file.next(), file.nextInt());
}
Arrays.sort(... | JAVA |
p03030 AtCoder Beginner Contest 128 - Guidebook | 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... | 6 | 0 | #include <iostream>
#include <bits/stdc++.h>
using namespace std;
int main() {
int n;
cin>>n;
vector<pair<pair<string,int>,int>>v(n);
for (int i=0;i<n;i++)
{
string s;
int p;
cin>>s>>p;
v[i]={{s,-p},i+1};
}
sort(v.begin(),v.end());
for(int i=0;i<n;i++)
cout<<v[i].second<<endl;
... | CPP |
p03030 AtCoder Beginner Contest 128 - Guidebook | 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... | 6 | 0 | import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner in = new Scanner(System.in);
int n = in.nextInt();
List<String> city = new ArrayList<>();
List<String> city_sorted = new ArrayList<>(... | JAVA |
p03030 AtCoder Beginner Contest 128 - Guidebook | 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... | 6 | 0 | import java.util.Arrays;
import java.util.Scanner;
public class Main {
public static void main(String... args) {
// 入力
Scanner sc = new Scanner(System.in);
int n = sc.nextInt();
String[][] s = new String[n][3];
for (int i = 0; i < n; i++) {
s[i][0] = String.valu... | JAVA |
p03030 AtCoder Beginner Contest 128 - Guidebook | 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... | 6 | 0 | //besmellah
#include <bits/stdc++.h>
using namespace std;
set <tuple <string, int, int>> S;
int main(){
ios::sync_with_stdio(false);
cin.tie(0);
int n;
cin >> n;
for (int i = 0; i < n; i++){
string s;
int p;
cin >> s >> p;
S.insert(make_tuple(s, -1 * p, i + 1));
}
for (auto s: S){
cout << get<2>(s) <... | CPP |
p03030 AtCoder Beginner Contest 128 - Guidebook | 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... | 6 | 0 | import java.util.*;
public class Main {
public static void main (String[] args) {
Scanner sc = new Scanner(System.in);
int N = sc.nextInt();
String[] S = new String[N];
for (int i = 0; i < N; i++) {
S[i] = sc.next() + "/" + (1100 - sc.nextInt() + "/" + (i + 1));
}
sc.close();
... | JAVA |
p03030 AtCoder Beginner Contest 128 - Guidebook | 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... | 6 | 0 | import java.util.ArrayList;
import java.util.Arrays;
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int n = sc.nextInt();
ArrayList<String> slist = new ArrayList<>(0);
for (int i = 0; i < n; i++) {
String s = sc.next();
int ... | JAVA |
p03030 AtCoder Beginner Contest 128 - Guidebook | 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... | 6 | 0 | import java.util.*;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int n = Integer.parseInt(sc.next());
List<Res> list = new ArrayList<>();
for (int i = 0; i < n; i++) {
String name = sc.next();
int point =... | JAVA |
p03030 AtCoder Beginner Contest 128 - Guidebook | 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... | 6 | 0 | import java.util.Arrays;
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int n = sc.nextInt();
String[] sp = new String[n];
for (int i = 0; i < n; i++) {
String city = sc.next();
int... | JAVA |
p03030 AtCoder Beginner Contest 128 - Guidebook | 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... | 6 | 0 | N=int(input())
ls=[list(input().split())+[i] for i in range(N)]
ls.sort(key=lambda x:(x[0],-int(x[1])))
for i in range(N):
print(ls[i][2]+1) | PYTHON3 |
p03030 AtCoder Beginner Contest 128 - Guidebook | 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... | 6 | 0 | N = int(input())
l = []
for i in range(N):
s,p = input().split(" ")
l.append([s,-int(p),i+1])
l.sort()
for i in l:
print(i[2]) | PYTHON3 |
p03030 AtCoder Beginner Contest 128 - Guidebook | 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... | 6 | 0 | import java.util.Arrays;
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
int N = scanner.nextInt();
Restaurant[] restaurants = new Restaurant[N];
for (int i = 0; i < N; i++) {
restaurants[i] = new Restaurant(i + 1... | JAVA |
p03030 AtCoder Beginner Contest 128 - Guidebook | 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... | 6 | 0 | [print(x[2])for x in sorted([(s[0],-int(s[1]),i+1)for i,s in enumerate([input().split()for _ in range(int(input()))])])] | PYTHON3 |
p03030 AtCoder Beginner Contest 128 - Guidebook | 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... | 6 | 0 | #include<bits/stdc++.h>
using namespace std;
int main(){
int n,i,p;
string s;
cin>>n;
vector<tuple<string,int,int>> t(n);
for(i=0;i<n;i++){
cin>>s>>p;
t.at(i)=make_tuple(s,-p,i+1);
}
sort(t.begin(),t.end());
for(auto z:t) cout<<get<2>(z)<<endl;
} | CPP |
p03030 AtCoder Beginner Contest 128 - Guidebook | 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... | 6 | 0 | #include <iostream>
#include <map>
using namespace std;
int n;
pair<string,int> sp;
map<pair<string,int>,int> g;
int main(){
cin >> n;
for(int i=1;i<=n;i++){
cin >> sp.first >> sp.second;
sp.second*=-1;
g[sp]=i;
}
for(auto itr:g){
cout << itr.second << endl;
}
} | CPP |
p03030 AtCoder Beginner Contest 128 - Guidebook | 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... | 6 | 0 | // https://atcoder.jp/contests/abc128/tasks/abc128_b
import java.util.Scanner;
import java.util.TreeMap;
import java.util.Collections;
import java.util.ArrayList;
import java.util.Arrays;
class Main{
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
int N = sc.nextInt();... | JAVA |
p03030 AtCoder Beginner Contest 128 - Guidebook | 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... | 6 | 0 | N=int(input())
A=[]
for _ in range(N):
s,n=input().strip().split(" ")
n=int(n)
A+=[(s,-n,_+1)]
A=sorted(A)
for X in A:
print(X[2]) | PYTHON3 |
p03030 AtCoder Beginner Contest 128 - Guidebook | 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... | 6 | 0 | n = int(input())
NSI = [input().split() + [i + 1] for i in range(n)]
NSI.sort(key=lambda x:(x[0], -int(x[1])))
for _, _, i in NSI:
print(i) | PYTHON3 |
p03030 AtCoder Beginner Contest 128 - Guidebook | 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... | 6 | 0 | #include<bits/stdc++.h>
using namespace std;
vector<pair<pair<string,int>,int> >v;
int main()
{
int n;
cin>>n;
for(int i=0;i<n;i++)
{
int x;
string s;
cin>>s>>x;
v.push_back(make_pair(make_pair(s,-x),i+1));
}
sort(v.begin(),v.end());
for(int i=0;i<v.size();i++)
{
cout<<v[i].second<<endl;
}
return 0;... | CPP |
p03030 AtCoder Beginner Contest 128 - Guidebook | 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... | 6 | 0 | #include <bits/stdc++.h>
using namespace std;
int main() {
int n;
cin >>n;
string s;
int p;
pair<pair<string,int>,int>answer[n];
for(int i=0; i<n; i++){
cin >>s >>p;
answer[i]=make_pair(make_pair(s,-p),i+1);
}
sort(answer,answer+n);
for(int i=0; i<n; i++){
cout <<answer[i].second <<e... | CPP |
p03030 AtCoder Beginner Contest 128 - Guidebook | 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... | 6 | 0 | n=int(input())
a=[]
for i in range(n):
s,p=input().split()
a+=[(s,-int(p),i+1)]
a.sort()
for i in range(n):
print(a[i][2]) | PYTHON3 |
p03030 AtCoder Beginner Contest 128 - Guidebook | 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... | 6 | 0 | n=int(input())
d=list(list(input().split())+[i+1] for i in range(n))
d.sort(key=lambda x:(x[0],-int(x[1])))
for v in d:print(v[2]) | PYTHON3 |
p03030 AtCoder Beginner Contest 128 - Guidebook | 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... | 6 | 0 | import java.util.*;
public class Main{
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
int number = sc.nextInt();
String[] info = new String[number];
for(int i = 0; i < number; i++) {
info[i] = sc.next() + "," + (Integer.MAX_VALUE - sc.nextInt()) + "," + (i+1);
}
A... | JAVA |
p03030 AtCoder Beginner Contest 128 - Guidebook | 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... | 6 | 0 | N = int(input())
SP = [input().split()+[i+1] for i in range(N)]
SP = sorted(SP, key=lambda x: (x[0], -int(x[1])))
for i in SP:
print(i[2]) | PYTHON3 |
p03030 AtCoder Beginner Contest 128 - Guidebook | 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... | 6 | 0 | import java.util.ArrayList;
import java.util.Comparator;
import java.util.List;
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
try (Scanner s = new Scanner(System.in)) {
final int N = s.nextInt();
List<Restaurant> list = new ArrayList<Main.Restaurant>(N);
for (int i... | JAVA |
p03030 AtCoder Beginner Contest 128 - Guidebook | 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... | 6 | 0 | import java.util.ArrayList;
import java.util.List;
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int n = sc.nextInt();
List<Guide> guids = new ArrayList<>();
for (int i = 0; i < n; i++) {
Guide g = new Guide();
g.place = s... | JAVA |
p03030 AtCoder Beginner Contest 128 - Guidebook | 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... | 6 | 0 | #include <bits/stdc++.h>
using namespace std;
int main() {
int N;
cin>>N;
pair<pair<string,int>,int>p[1000];
for(int i=0;i<N;i++){
string S;
int T;
cin>>S>>T;
p[i]=make_pair(make_pair(S,-T),i+1);
}
sort(p,p+N);
for(int i=0;i<N;i++){
cout<<p[i].second<< endl;
}
}
| CPP |
p03030 AtCoder Beginner Contest 128 - Guidebook | 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... | 6 | 0 | n = int(input())
sp = []
for i in range(n):
s,p = input().split()
sp.append([s, -int(p), i+1])
sp.sort()
for s,p,i in sp:
print(i) | PYTHON3 |
p03030 AtCoder Beginner Contest 128 - Guidebook | 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... | 6 | 0 | #include <bits/stdc++.h>
using namespace std;
int main() {
int N;
cin >> N;
vector<tuple<string,int,int>> v;
for (int i=0;i<N;i++){
string S;
int P;
cin >> S >> P;
v.push_back(make_tuple(S,100-P,i+1));
}
sort(v.begin(),v.end());
for (int i=0;i<N;i++){
cout << get<2>(v[i]) << endl;
... | CPP |
p03030 AtCoder Beginner Contest 128 - Guidebook | 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... | 6 | 0 | #include <bits/stdc++.h>
using namespace std;
int main(void){
int n;
cin >> n;
map<string, int [110]> a;
for(int i = 0; i < n; ++i){
string s;
int p;
cin >> s >> p;
a[s][p]=i+1;
}
for (auto x : a){
for(int i =105; i >= 0; --i){
if(x.second[i]!=0){
cout << x.second[i] << endl;
}
}
}
retur... | CPP |
p03030 AtCoder Beginner Contest 128 - Guidebook | 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... | 6 | 0 | #include <bits/stdc++.h>
using namespace std;
int main() {
int N;
cin>>N;
vector<tuple<string,int,int>>p;
for(int i=0;i<N;i++){
string s;
int a;
cin>>s>>a;
p.push_back(make_tuple(s, a*(-1), i+1));
}
sort(p.begin(), p.end());
for(int i=0;i<N;i++){
cout<<get<2>(p.at(i))<<endl;
}
} | CPP |
p03030 AtCoder Beginner Contest 128 - Guidebook | 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... | 6 | 0 | import java.util.Comparator;
import java.util.Map;
import java.util.Scanner;
import java.util.TreeMap;
public class Main {
public static void main(final String[] args) {
Scanner sc = new Scanner(System.in);
int N = sc.nextInt();
Map<String, Map<Integer, Integer>> city = new TreeMap<>();
for (int i = 1; i <= ... | JAVA |
p03030 AtCoder Beginner Contest 128 - Guidebook | 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... | 6 | 0 | import java.util.Comparator;
import java.util.Map;
import java.util.Scanner;
import java.util.Set;
import java.util.TreeMap;
import java.util.TreeSet;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int N = sc.nextInt();
String[] town = new String[N];
Set<Stri... | JAVA |
p03030 AtCoder Beginner Contest 128 - Guidebook | 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... | 6 | 0 | #include<bits/stdc++.h>
using namespace std;
int main(){
int n,i;
cin >> n;
vector<tuple<string,int,int>> a;
for(i=1;i<=n;++i){
string s;
int p;
cin >> s >> p;
p=-p;
a.push_back(tie(s,p,i));
}
sort(a.begin(),a.end());
for(i=0;i<n;++i){
cout << get<2>(a[i]) <<endl;
}
return 0;
... | CPP |
p03030 AtCoder Beginner Contest 128 - Guidebook | 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... | 6 | 0 | n = int(input())
a = []
for i in range(n):
s, p = input().split()
a.append((s, -int(p), i))
a.sort()
for _, _, i in a:
print(i + 1) | PYTHON3 |
p03030 AtCoder Beginner Contest 128 - Guidebook | 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... | 6 | 0 | _, *sp = open(0).read().split()
for _, _, a in sorted([(s, -int(p), i + 1) for i, (s, p) in enumerate(zip(*[iter(sp)] * 2))]):
print(a) | PYTHON3 |
p03030 AtCoder Beginner Contest 128 - Guidebook | 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... | 6 | 0 | import java.util.*;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int n = sc.nextInt();
List<Restaurant> restaurants = new ArrayList<>();
for (int i = 0; i < n ; i++) {
Restaurant restaurant = new Restaurant(i+1, sc.next(),sc.nextInt());
... | JAVA |
p03030 AtCoder Beginner Contest 128 - Guidebook | 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... | 6 | 0 | import java.util.Arrays;
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
@SuppressWarnings("resource")
Scanner sc = new Scanner(System.in);
int n = sc.nextInt();
Pair[] pairs = new Pair[n];
for (int i = 0 ; i < n ; i++) {
P... | JAVA |
p03030 AtCoder Beginner Contest 128 - Guidebook | 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... | 6 | 0 | # coding:utf-8
# BBBBBBBBBBB
import math
import re
def main(params):
n = int(params[0])
sp = params[1:]
cnt = 0
ipt = {}
for i in sp:
cnt += 1
s,p = i.split()
p = int(p)
if s in ipt:
ipt[s].append([p,cnt])
else:
ipt[s] = [[p,cnt]]
... | PYTHON |
p03030 AtCoder Beginner Contest 128 - Guidebook | 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... | 6 | 0 | #include<bits/stdc++.h>
using namespace std;
#define ll long long int
int main()
{
ll n,d,a;
string s;
cin>>n;
pair<pair <string,ll>,ll> p[n+1];
for(ll i=0;i<n;i++)
{
cin>>s>>a;
p[i]=make_pair(make_pair(s,-1*a),i+1);
}
sort(p,p+n);
for(ll i=0;i<n;i++)
{
cout<<p[i].second<<endl;
}
return 0;
} | CPP |
p03030 AtCoder Beginner Contest 128 - Guidebook | 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... | 6 | 0 | N=int(input())
a=[]
for i in range(N):
S,P=input().split()
P=int(P)
a.append([S, -P, i+1])
a.sort()
for i in a:
print(i[2]) | PYTHON3 |
p03030 AtCoder Beginner Contest 128 - Guidebook | 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... | 6 | 0 | N=int(input())
a=[]
for i in range(N):
S,P=input().split()
a.append((S,-1*int(P),i+1))
a.sort()
for j in a:
print(j[2]) | PYTHON3 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.