Submission #00007


ソースコード

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<iostream>
using namespace std;
int dx[]={1,1,0,-1,-1,-1,0,1};
int dy[]={0,1,1,1,0,-1,-1,-1};
char map[101][101];
int main()
{
int sx,sy,h,w,j;
cin>>h>>w;
for(int i=1; i<=h; i++){
for(j=1; j<=w; j++){
cin>>map[i][j];
if(map[i][j]=='@'){
sx=j;
sy=i;
}
}
}
for(int i=0; i<8; i++){
int nx=sx+dx[i];
int ny=sy+dy[i];
map[ny][nx]='.';
}
for(int i=1; i<=h; i++){
for(j=1; j<=w-1; j++){
cout<<map[i][j];
}
cout<<map[i][j]<<'\n';
}
return 0;
}

ステータス

項目 データ
問題 0001 - 中華ハゲ
ユーザー名 ei1813
投稿日時 2018-08-22 10:04:42
言語 C++
状態 Accepted
得点 10
ソースコード長 551 Byte
最大実行時間 31 ms
最大メモリ使用量 616 KB

セット

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

テストケース

ファイル名 状態 実行時間 メモリ使用量 #
in01.dat AC 23 ms 480 KB
1
in02.dat AC 23 ms 456 KB
1
in03.dat AC 21 ms 432 KB
1
in04.dat AC 19 ms 536 KB
1
in05.dat AC 31 ms 384 KB
1
in06.dat AC 27 ms 616 KB
1