当前位置:网站首页>Determine the Photo Position
Determine the Photo Position
2022-07-06 16:02:00 【It's Xiao Zhang, ZSY】
Determine the Photo Position
link :https://ac.nowcoder.com/acm/contest/11166/D
source : Cattle from

Input :
5 3
00000
01110
01110
01110
00000
222
Output
6
Input
3 2
101
010
101
22
Output
0
Input
3 1
101
010
101
2
Output
4
#include <iostream>
#include <cstdio>
#include <algorithm>
#include <math.h>
#include <string.h>
using namespace std;
char c[2001][2001];
int main()
{
int n,m;
cin>>n>>m;
int ans=0;
int sum=0;
for(int i=1;i<=n;i++)
{
sum=0;
for(int j=1;j<=n;j++)
{
cin>>c[i][j];
if(c[i][j]=='0')
sum++;
else
sum=0;
if(sum>=m)
ans++;
}
// cout<<ans;
}
cin>>m;
cout<<ans<<endl;
return 0;
}
边栏推荐
- 【练习-9】Zombie’s Treasure Chest
- CS zero foundation introductory learning record
- Information security - Analysis of security orchestration automation and response (soar) technology
- [exercise-7] crossover answers
- 【高老师UML软件建模基础】20级云班课习题答案合集
- Cost accounting [16]
- VS2019初步使用
- Matlab comprehensive exercise: application in signal and system
- 区间和------离散化
- 渗透测试 ( 2 ) --- 渗透测试系统、靶机、GoogleHacking、kali工具
猜你喜欢

Penetration test (3) -- Metasploit framework (MSF)

Penetration test (8) -- official document of burp Suite Pro

Borg Maze (BFS+最小生成树)(解题报告)

Penetration test (1) -- necessary tools, navigation

【练习-7】Crossword Answers

C语言数组的概念

B - 代码派对(女生赛)

Essai de pénétration (1) - - outils nécessaires, navigation

【高老师UML软件建模基础】20级云班课习题答案合集

D - Function(HDU - 6546)女生赛
随机推荐
[exercise-7] (UVA 10976) fractions again?! (fraction split)
【练习-7】(Uva 10976)Fractions Again?!(分数拆分)
Opencv learning log 18 Canny operator
JS调用摄像头
[exercise -10] unread messages
【练习-9】Zombie’s Treasure Chest
CEP used by Flink
Determine the Photo Position
信息安全-威胁检测引擎-常见规则引擎底座性能比较
渗透测试 ( 5 ) --- 扫描之王 nmap、渗透测试工具实战技巧合集
Cost accounting [16]
Cost accounting [19]
动态规划前路径问题优化方式
Borg Maze (BFS+最小生成树)(解题报告)
F - Birthday Cake(山东省赛)
1010 things that college students majoring in it must do before graduation
frida hook so层、protobuf 数据解析
Opencv learning log 19 skin grinding
TCP的三次握手与四次挥手
C 基本语法