CodeForces 688A
2016-07-05 23:46
344 查看
http://acm.hust.edu.cn/vjudge/problem/viewProblem.action?id=407720
CodeForces - 688AOpponents
2 2 10 00Output 2Input 4 1 0100Output 1Input 4 511011111011010111111Output 2SourceCodeforces Round #360 (Div. 2) |
#include<iostream> #include<iomanip> #include<algorithm> #include<istream> #include<ostream> #include<cstring> #include<cstdio> using namespace std; typedef long long ll; char a[110][110]; int b[110]; int main(){ int n,d; while(~scanf("%d%d",&n,&d)){ memset(b,0,sizeof(b)); for(int i=0;i<d;i++){ scanf("%s",&a[i]); } for(int i=0;i<d;i++){ for(int k=0;k<n;k++){ if(a[i][k]==48){ b[i]=1; break; } } }
int maxn=0;//@1for(int i=0;i<d;++i){int cnt=0;for(int j=i;j<d;j++){if(b[j]){cnt++;}else break;}maxn=max(maxn,cnt);}cout<<maxn<<endl;}return 0;}@1:
相关文章推荐
- 第四课:怎么去掉Activity的标题和邮件图标-20160705
- 并查集 hdoj1232 NOIP 2010
- 讲透区块链技术原理
- @ActiveMQ简单介绍以及安装
- 我的手机管家(21) 设置中心
- 从Mysql开始
- 搜索
- 继承和多态的一点小小研究
- 字典
- mybatis实战教程(mybatis in action),mybatis入门到精通
- Eclipse常用快捷键
- UVa 1616 Caravan Robbers (二分+贪心)
- NET Core 1.0
- Debussy与modelsim联仿时 do 文件脚本
- Spark-1.6.0之Application运行信息记录器JobProgressListener
- Spark-1.6.0之Application运行信息记录器JobProgressListener
- Spark-1.6.0之Application运行信息记录器JobProgressListener
- Ubuntu W: GPG error: http://archive.ubuntukey....NO_PUBKEY 8D5A09
- NodeJs系列一:神奇的nodejs
- Android中判断联网状态