#include typedef long long ll; #define INF 1000000000 #define MOD 1000000007 using namespace std; int main(void){ int n; cin>>n; mapmp; for(int i=0;i>no>>m>>s; for(int i=0;i>tag; if(mp[tag]){ mp[tag]+=s; }else{ mp[tag]=s; } } } vector>v; for(auto it=mp.begin();it!=mp.end();it++){ v.push_back({-it->second,it->first}); } sort(v.begin(),v.end()); int num=min(10,(int)v.size()); for(int i=0;i