Submission #5654179


Source Code Expand

Copy
#include <iostream>
#include <string>
#include <algorithm>
#include <utility>
#include <vector>

using namespace std;

int main(){
  int N;
  cin >> N;

  vector<pair<pair<string, int>, int>> p(N);

  string S;
  int P;
  for (int i = 0; i < N; ++i) {
    cin >> S >> P;
    p[i] = make_pair(make_pair(S, -P), i);
  }

  sort(p.begin(), p.end());
  for (auto e: p) cout << e.second + 1 << endl;

  return 0;
}

Submission Info

Submission Time
Task B - Guidebook
User aximov
Language C++14 (GCC 5.4.1)
Score 200
Code Size 434 Byte
Status
Exec Time 1 ms
Memory 256 KB

Test Cases

Set Name Score / Max Score Test Cases
Sample 0 / 0 01.txt, 02.txt
All 200 / 200 01.txt, 02.txt, 11.txt, 12.txt, 13.txt, 14.txt, 15.txt
Case Name Status Exec Time Memory
01.txt 1 ms 256 KB
02.txt 1 ms 256 KB
11.txt 1 ms 256 KB
12.txt 1 ms 256 KB
13.txt 1 ms 256 KB
14.txt 1 ms 256 KB
15.txt 1 ms 256 KB