Submission #00114


ソースコード

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
39
#include<iostream>
#include<algorithm>
#include<string>
using namespace std;
int main()
{
int h,w,yh,yw;
string point[1005];
cin>>h>>w;
cin>>yh>>yw;
for(int i=0;i<yh;i++){
cin>>point[i];
}
int bath=0;
for(int i=0;i<yh;i++){
if(i<yh-1){
for(int j=0;j<yw;j++){
if(point[i][j]=='#')
if(point[i+1][j]=='.'){
point[i][j]='.';
point[i+1][j]='#';
}
}
}
}
int maxh=max(h,yh);
int minh=min(h,yh);
int maxw=max(w,yw);
int minw=min(w,yw);
for(int i=maxh-1;i>=maxh-minh;i--){
for(int j=0;j<maxw;j++){
if(point[i][j]=='#')
bath+=1;
}
}
cout<<bath<<'\n';
return 0;
}

ステータス

項目 データ
問題 0003 - 雛ちゃんとふろー
ユーザー名 ei1841
投稿日時 2018-08-22 12:28:24
言語 C++
状態 Wrong Answer
得点 0
ソースコード長 683 Byte
最大実行時間 35 ms
最大メモリ使用量 1068 KB

セット

セット 得点 Cases
1 ALL 0 / 10 *

テストケース

ファイル名 状態 実行時間 メモリ使用量 #
Input01 WA 22 ms 608 KB
1
Input02 WA 35 ms 1008 KB
1
Input03 WA 21 ms 512 KB
1
Input04 WA 28 ms 564 KB
1
Input05 WA 26 ms 728 KB
1
Input06 WA 27 ms 516 KB
1
Input07 WA 16 ms 532 KB
1
Input08 WA 22 ms 784 KB
1
Input09 WA 22 ms 664 KB
1
Input10 WA 23 ms 544 KB
1
Input11 WA 18 ms 620 KB
1
Input12 WA 32 ms 680 KB
1
Input13 WA 27 ms 1068 KB
1
Input14 WA 26 ms 608 KB
1
Input15 WA 23 ms 864 KB
1
Input16 WA 21 ms 604 KB
1
Input17 WA 28 ms 684 KB
1
Input18 WA 28 ms 632 KB
1
Input19 WA 31 ms 668 KB
1
Input20 WA 17 ms 664 KB
1