/* * @FileName: D:\代码与算法\2017训练比赛\百度之星\1002-pro.cpp * @Author: Pic * @Date: 2017-08-06 09:31:11 * @Last Modified time: 2017-08-06 09:34:31 */ #include #include #include #include #include using namespace std; int sum[3000+30]; int main(){ int n,m; while(~scanf("%d%d",&n,&m)){ memset(sum,0,sizeof(sum)); int u,v,w; for(int i=0;i