Language: C++

#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <string.h>
#include <queue>
using namespace std;
typedef unsigned int uint;
typedef long long ll;
typedef pair<int, int> P;
const int c_INF = 111111111;
const int c_mINF = -111111111;
const int c_YET = -1;
const int c_Dx[4] = { 0,0,1,-1 };
const int c_Dy[4] = { 1,-1,0,0 };

char in[120]; pair<pair<string, int>, int> p[110]; int main() { int a; scanf("%d", &a); for (int i = 0; i < a; i++) { int t; scanf("%s%d", in, &t); string tmp = in; p[i] = make_pair(make_pair(in, -t), i); }std::sort(p, p + a); for (int i = 0; i < a; i++)printf("%d\n", p[i].second + 1); }

/*
char name[120];
pair<pair<string, int>, int> info[110];


int main() {
	int N;
	scanf("%d", &N);
	for (int i = 0; i < N; i++) {
		int temp; scanf("%s%d", name, &temp);
		info[i] = make_pair(make_pair(name, -temp), i);
	}

	sort(info, info + N);
	for (int i = 0; i < N; i++)printf("%d\n", info[i].second + 1);

}

*/

/*         提出前の確認事項

・デバッグ用の関数は＜＜コメント化＞＞しているか？
・すべての＜＜入力例＞＞は試したか？
・＜＜限界値分析＞＞はしたか？
・＜＜出力の改行＞＞の有無は確認したか？
　　　　　　　　↓
	 ＜＜提出先＞＞に注意して提出！！
*/

Compiler output:
a.cc:16:25: error: 'string' was not declared in this scope
   16 | char in[120]; pair<pair<string, int>, int> p[110]; int main() { int a; scanf("%d", &a); for (int i = 0; i < a; i++) { int t; scanf("%s%d", in, &t); string tmp = in; p[i] = make_pair(make_pair(in, -t), i); }std::sort(p, p + a); for (int i = 0; i < a; i++)printf("%d\n", p[i].second + 1); }
      |                         ^~~~~~
a.cc:6:1: note: 'std::string' is defined in header '<string>'; this is probably fixable by adding '#include <string>'
    5 | #include <queue>
  +++ |+#include <string>
    6 | using namespace std;
a.cc:16:36: error: template argument 1 is invalid
   16 | char in[120]; pair<pair<string, int>, int> p[110]; int main() { int a; scanf("%d", &a); for (int i = 0; i < a; i++) { int t; scanf("%s%d", in, &t); string tmp = in; p[i] = make_pair(make_pair(in, -t), i); }std::sort(p, p + a); for (int i = 0; i < a; i++)printf("%d\n", p[i].second + 1); }
      |                                    ^
a.cc:16:42: error: template argument 1 is invalid
   16 | char in[120]; pair<pair<string, int>, int> p[110]; int main() { int a; scanf("%d", &a); for (int i = 0; i < a; i++) { int t; scanf("%s%d", in, &t); string tmp = in; p[i] = make_pair(make_pair(in, -t), i); }std::sort(p, p + a); for (int i = 0; i < a; i++)printf("%d\n", p[i].second + 1); }
      |                                          ^
a.cc: In function 'int main()':
a.cc:16:149: error: 'string' was not declared in this scope
   16 | char in[120]; pair<pair<string, int>, int> p[110]; int main() { int a; scanf("%d", &a); for (int i = 0; i < a; i++) { int t; scanf("%s%d", in, &t); string tmp = in; p[i] = make_pair(make_pair(in, -t), i); }std::sort(p, p + a); for (int i = 0; i < a; i++)printf("%d\n", p[i].second + 1); }
      |                                                                                                                                                     ^~~~~~
a.cc:16:149: note: 'std::string' is defined in header '<string>'; this is probably fixable by adding '#include <string>'
a.cc:16:182: error: cannot convert 'std::pair<std::pair<char*, int>, int>' to 'int' in assignment
   16 | char in[120]; pair<pair<string, int>, int> p[110]; int main() { int a; scanf("%d", &a); for (int i = 0; i < a; i++) { int t; scanf("%s%d", in, &t); string tmp = in; p[i] = make_pair(make_pair(in, -t), i); }std::sort(p, p + a); for (int i = 0; i < a; i++)printf("%d\n", p[i].second + 1); }
      |                                                                                                                                                                             ~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~
      |                                                                                                                                                                                      |
      |                                                                                                                                                                                      std::pair<std::pair<char*, int>, int>
a.cc:16:212: error: 'sort' is not a member of 'std'; did you mean 'sqrt'?
   16 | char in[120]; pair<pair<string, int>, int> p[110]; int main() { int a; scanf("%d", &a); for (int i = 0; i < a; i++) { int t; scanf("%s%d", in, &t); string tmp = in; p[i] = make_pair(make_pair(in, -t), i); }std::sort(p, p + a); for (int i = 0; i < a; i++)printf("%d\n", p[i].second + 1); }
      |                                                                                                                                                                                                                    ^~~~
      |                                                                                                                                                                                                                    sqrt
a.cc:16:275: error: request for member 'second' in 'p[i]', which is of non-class type 'int'
   16 | char in[120]; pair<pair<string, int>, int> p[110]; int main() { int a; scanf("%d", &a); for (int i = 0; i < a; i++) { int t; scanf("%s%d", in, &t); string tmp = in; p[i] = make_pair(make_pair(in, -t), i); }std::sort(p, p + a); for (int i = 0; i < a; i++)printf("%d\n", p[i].second + 1); }
      |                                                                                                                                                                                                                                                                                   ^~~~~~