Submission #54961


ソースコード

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#include<bits/stdc++.h>
using namespace std;
int i[500][500];
int a,b,c;
int main(){
cin.tie(0);
ios::sync_with_stdio(false);
long long d=0,e=1,f=0;
cin >>a>>b>>c;
string s[500];
for(int n=0;n<a;n++){
cin >>s[n];
}
for(int n=0;n<a;n++){
for(int m=0;m<b;m++){
if(s[n][m]=='#') i[n][m]++;
}
}
for(int n=0;n<a;n++){
for(int m=0;m<b;m++){
int oo=0,op=0;
for(int o=m;o<b;o++){
if(i[n][o]==0) oo++;
else break;
if(oo==c) break;
}
if(oo>=c) d++;
for(int o=n;o<a;o++){
if(i[o][m]==0) op++;
else break;
if(op==c)break;
}
if(op>=c) d++;
}
}
cout <<d<<'\n';
return (0);
}

ステータス

項目 データ
問題 0594 - 休憩スペース (Refreshment Area)
ユーザー名 ei1923
投稿日時 2019-09-17 17:54:07
言語 C++14
状態 Accepted
得点 100
ソースコード長 699 Byte
最大実行時間 25 ms
最大メモリ使用量 708 KB

セット

セット 得点 Cases
1 set1 20 / 20 *t3*1.txt
2 set2 20 / 20 *t3*2.txt
3 set3 20 / 20 *t3*3.txt
4 set4 20 / 20 *t3*4.txt
5 set5 20 / 20 *t3*5.txt

テストケース

ファイル名 状態 実行時間 メモリ使用量 #
2017-yo-t3-in1.txt AC 25 ms 604 KB
1
2017-yo-t3-in2.txt AC 16 ms 664 KB
2
2017-yo-t3-in3.txt AC 23 ms 708 KB
3
2017-yo-t3-in4.txt AC 20 ms 704 KB
4
2017-yo-t3-in5.txt AC 17 ms 612 KB
5