Submission #56034
ソースコード
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 | #include <bits/stdc++.h> using namespace std; int main(){ int n,m,d,c=0,b=0; char a[1000][1000]; cin>>n>>m>>d; for ( int i=0;i<n;i++){ for ( int j=0;j<m;j++){ cin>>a[i][j]; } } for ( int i=0;i<n;i++){ for ( int j=0;j<m;j++){ for ( int k=0;k<d;k++){ if (a[i][j+k]== '.' ) c++; } if (c==d) b++; c=0; for ( int k=0;k<d;k++) if (a[i+k][j]== '.' ) c++; if (c==d) b++; c=0; } } cout<<b<<endl; return (0); } |
ステータス
項目 | データ |
---|---|
問題 | 0594 - 休憩スペース (Refreshment Area) |
ユーザー名 | r1910 |
投稿日時 | 2019-11-01 18:37:34 |
言語 | C++14 |
状態 | Accepted |
得点 | 100 |
ソースコード長 | 505 Byte |
最大実行時間 | 25 ms |
最大メモリ使用量 | 648 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 | 21 ms | 568 KB |
2
|
||||
2017-yo-t3-in3.txt | AC | 17 ms | 520 KB |
3
|
||||
2017-yo-t3-in4.txt | AC | 24 ms | 648 KB |
4
|
||||
2017-yo-t3-in5.txt | AC | 20 ms | 648 KB |
5
|