#include #include using namespace std; int n, k; int uni[100000]; vector s, p, u, ans; int hantei(int a, int b){ bool flag = false; if(s[a]uni[b])flag=true; else if(s[a]==s[b] && uni[a]==uni[b] && p[a]>p[b])flag=true; return flag; } vector solve(){ vector ret; for(int i=0; i>n>>k; for(int i=0; i>sIn>>pIn>>uIn; s.push_back(sIn); p.push_back(pIn); u.push_back(uIn); } ans=solve(); for(int i=0; i