题解 AT25 【プログラミングコンテスト】

这应该是一道atcoder的试机题,具体的历史故事我不清楚(看原题翻译好像是什么大赛,了解后我会补充的),只是知道这题水得应该没人会看题解。

#include<bits/stdc++.h>
//#define BL 暴力
using namespace std;
int a[10010][10010],se[10010],maxx=-10234567;
int main(){
	int n,m;
	cin>>n>>m;
	for(int i=1;i<=n;i++)
		for(int j=1;j<=m;j++){
			cin>>a[i][j];//BL存储
			if(a[i][j]==1)se[i]++;//BL累加
			if(se[i]>maxx)maxx=se[i];//BL求解
		}
	cout<<maxx<<endl;//BL输出
}
原文地址:https://www.cnblogs.com/Douglas-Zhou/p/AT25.html