#include #include #include #include using namespace std; typedef long long LL; int N,M; int GetWinNum(vector>> &R) { int num=0; set PersonSet; multimap>::iterator mit; for (int j=0;j>N>>M; vector>> R(M); vector maxR(M,0); int i,j; LL r; for (i=0;i>r; if (r>=maxR[j]){ R[j].insert(multimap>::value_type(r,i+1)); maxR[j]=r; } } cout<