Submission #00103


ソースコード

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 <iostream>
#include <map>
using namespace std;
int main()
{
int h,w;
int i,j;
char c[105][105];
cin >> h >> w;
for ( i = 0; i < h; i++ ) {
for ( j = 0; j < w; j++ ) {
cin >> c[i][j];
}
}
for ( i = 0; i < h; i++ ) {
for ( j = 0; j < w; j++ ) {
if ( c[i][j] == '@' ) {
c[i-1][j] = '.';
c[i][j+1] = '.';
c[i+1][j] = '.';
c[i][j-1] = '.';
c[i-1][j-1] = '.';
c[i-1][j+1] = '.';
c[i+1][j+1] = '.';
c[i+1][j-1] = '.';
}
}
}
for ( i = 0; i < h; i++ ) {
for ( j = 0; j < w; j++ ) {
if ( j == w-1 ) {
cout << c[i][j] << endl;
} else {
cout << c[i][j];
}
}
}
return 0;
}
// source011.cpp
// 中華ハゲ

ステータス

項目 データ
問題 0001 - 中華ハゲ
ユーザー名 ei1804
投稿日時 2018-08-22 12:13:04
言語 C++
状態 Runtime Error
得点 0
ソースコード長 757 Byte
最大実行時間 141 ms
最大メモリ使用量 644 KB

セット

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

テストケース

ファイル名 状態 実行時間 メモリ使用量 #
in01.dat AC 30 ms 480 KB
1
in02.dat AC 24 ms 472 KB
1
in03.dat AC 19 ms 416 KB
1
in04.dat AC 20 ms 644 KB
1
in05.dat AC 21 ms 488 KB
1
in06.dat RE 141 ms 580 KB
1