#include using namespace std; int main(){ int n; cin >> n; map m; for(int i=0; i> img >> num >> point; for(int i=0; i> s; m[s] += point; } } vector> v; for(auto p :m) v.push_back(make_pair(-p.second, p.first)); sort(v.rbegin(), v.rend()); int loop = min(10, (int)v.size()); for(int i=0; i