Submission #00080


ソースコード

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
40
41
42
43
44
45
46
47
48
49
50
#include<bits/stdc++.h>
using namespace std;
int main(){
cin.tie(0);
ios::sync_with_stdio(false);
int h,w;
int yh,yw;
char yaku[1001][1001];
cin >> h >> w;
cin >> yh >> yw;
for(int i = 0;i < yh;i++){
for(int j = 0;j < yw;j++){
cin >> yaku[i][j];
}
}
for(int i = yh - 1;i >= 0;i--){
for(int j = 0;j < yw;j++){
if(yaku[i][j] == '#'){
for(int x = i;x + 1 < yh && yaku[x + 1][j] == '.';x++){
yaku[x][j] = '.';
yaku[x + 1][j] = '#';
}
}
}
}
for(int i = 0;i < yh;i++){
for(int j = 0;j < yw;j++){
cout << yaku[i][j];
}
cout << endl;
}
int cnt = 0;
for(int i = abs(yh - h);i < yh;i++){
for(int j = 0;j < w;j++){
if(yaku[i][j] == '#'){
cnt ++;
}
}
}
cout << cnt << endl;
return 0;
}

ステータス

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

セット

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

テストケース

ファイル名 状態 実行時間 メモリ使用量 #
Input01 WA 24 ms 1248 KB
1
Input02 WA 53 ms 1696 KB
1
Input03 WA 20 ms 872 KB
1
Input04 WA 35 ms 1160 KB
1
Input05 WA 39 ms 1452 KB
1
Input06 WA 21 ms 1620 KB
1
Input07 WA 32 ms 1924 KB
1
Input08 WA 39 ms 2108 KB
1
Input09 WA 35 ms 2428 KB
1
Input10 WA 25 ms 1720 KB
1
Input11 WA 28 ms 1868 KB
1
Input12 WA 28 ms 2032 KB
1
Input13 WA 43 ms 2324 KB
1
Input14 WA 25 ms 2620 KB
1
Input15 WA 36 ms 2924 KB
1
Input16 WA 23 ms 2976 KB
1
Input17 WA 30 ms 3292 KB
1
Input18 WA 28 ms 2456 KB
1
Input19 WA 28 ms 2736 KB
1
Input20 WA 29 ms 3024 KB
1