#include using namespace std; int main() { int n,m; cin>>n>>m; vector> score(n, vector(n)); for(int i=0; i>i1>>i2>>s; score[i1][i2]=s; } vector c(n); int ans=0; for(int i=0; i