Language: C++

#include <iostream>
#include <algorithm>
#include <numeric>
#include <vector>
using namespace std;
int main()
{
	int n;
	cin >> n;
	vector<string> s(n);
	vector<int> p(n);
	for (int i = 0; i < n; i++) {
		cin >> s[i];
		cin >> p[i];
	}
	vector<int> result(n,0);
	vector<int> result_(n, 0);
	for (int i = 0; i < n; i++) {
		for (int j = 0; j < n; j++) {
			result[i]+= s[i].compare(s[j])*100;
			if (s[i].compare(s[j]) == 0) {
				result[i] += p[j] - p[i];
			}
		}
		cout << result[i]<<endl;
	}
	vector<rsize_t> indices(result.size());
	iota(indices.begin(), indices.end(), 0);

	sort(indices.begin(), indices.end(), [&result](size_t i1, size_t i2) {
		return result[i1] < result[i2];
	});
	for (auto v : indices)
		std::cout << v+1 << endl;



	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:27:16: error: 'rsize_t' was not declared in this scope; did you mean 'ssize_t'?
   27 |         vector<rsize_t> indices(result.size());
      |                ^~~~~~~
      |                ssize_t
a.cc:27:23: error: template argument 1 is invalid
   27 |         vector<rsize_t> indices(result.size());
      |                       ^
a.cc:27:23: error: template argument 2 is invalid
a.cc:28:22: error: request for member 'begin' in 'indices', which is of non-class type 'int'
   28 |         iota(indices.begin(), indices.end(), 0);
      |                      ^~~~~
a.cc:28:39: error: request for member 'end' in 'indices', which is of non-class type 'int'
   28 |         iota(indices.begin(), indices.end(), 0);
      |                                       ^~~
a.cc:30:22: error: request for member 'begin' in 'indices', which is of non-class type 'int'
   30 |         sort(indices.begin(), indices.end(), [&result](size_t i1, size_t i2) {
      |                      ^~~~~
a.cc:30:39: error: request for member 'end' in 'indices', which is of non-class type 'int'
   30 |         sort(indices.begin(), indices.end(), [&result](size_t i1, size_t i2) {
      |                                       ^~~
a.cc:33:23: error: 'begin' was not declared in this scope; did you mean 'std::begin'?
   33 |         for (auto v : indices)
      |                       ^~~~~~~
      |                       std::begin
In file included from /usr/include/c++/14/string:53,
                 from /usr/include/c++/14/bits/locale_classes.h:40,
                 from /usr/include/c++/14/bits/ios_base.h:41,
                 from /usr/include/c++/14/ios:44,
                 from /usr/include/c++/14/ostream:40,
                 from /usr/include/c++/14/iostream:41,
                 from a.cc:1:
/usr/include/c++/14/bits/range_access.h:114:37: note: 'std::begin' declared here
  114 |   template<typename _Tp> const _Tp* begin(const valarray<_Tp>&) noexcept;
      |                                     ^~~~~
a.cc:33:23: error: 'end' was not declared in this scope; did you mean 'std::end'?
   33 |         for (auto v : indices)
      |                       ^~~~~~~
      |                       std::end
/usr/include/c++/14/bits/range_access.h:116:37: note: 'std::end' declared here
  116 |   template<typename _Tp> const _Tp* end(const valarray<_Tp>&) noexcept;
      |                                     ^~~