当前位置:网站首页>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;
}
边栏推荐
- Opencv learning log 13 corrosion, expansion, opening and closing operations
- Cost accounting [15]
- [exercise-5] (UVA 839) not so mobile (balance)
- Flink 使用之 CEP
- Perinatal Software Industry Research Report - market status analysis and development prospect forecast
- 【练习-4】(Uva 11988)Broken Keyboard(破损的键盘) ==(链表)
- 渗透测试 ( 8 ) --- Burp Suite Pro 官方文档
- [exercise-9] Zombie's Treasury test
- 差分(一维,二维,三维) 蓝桥杯三体攻击
- The most complete programming language online API document
猜你喜欢
X-Forwarded-For详解、如何获取到客户端IP
信息安全-威胁检测引擎-常见规则引擎底座性能比较
入门C语言基础问答
渗透测试 ( 8 ) --- Burp Suite Pro 官方文档
mysql导入数据库报错 [Err] 1273 – Unknown collation: ‘utf8mb4_0900_ai_ci’
快速转 TypeScript 指南
PySide6 信号、槽
Analysis of protobuf format of real-time barrage and historical barrage at station B
Analyse du format protobuf du rideau en temps réel et du rideau historique de la station B
Record of force deduction and question brushing
随机推荐
Cost accounting [16]
【高老师UML软件建模基础】20级云班课习题答案合集
Research Report on surgical fluid treatment industry - market status analysis and development prospect prediction
STM32 how to use stlink download program: light LED running light (Library version)
Flink 使用之 CEP
差分(一维,二维,三维) 蓝桥杯三体攻击
Shell Scripting
China's salt water membrane market trend report, technological innovation and market forecast
F - Birthday Cake(山东省赛)
【练习-6】(PTA)分而治之
洛谷P1102 A-B数对(二分,map,双指针)
基于web的照片数码冲印网站
渗透测试 ( 5 ) --- 扫描之王 nmap、渗透测试工具实战技巧合集
[exercise-6] (PTA) divide and conquer
信息安全-安全编排自动化与响应 (SOAR) 技术解析
MySQL授予用户指定内容的操作权限
信息安全-威胁检测-NAT日志接入威胁检测平台详细设计
Cost accounting [15]
Ball Dropping
【练习-6】(Uva 725)Division(除法)== 暴力