Submission #00047


ソースコード

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#include<bits/stdc++.h>
using namespace std;
int main(){
int h,w;
cin>>h>>w;
string mp[h];
int a=-3,b=-3;
for(int i=0;i<h;++i){
cin>>mp[i];
for(int j=0;j<mp[i].size();++j){
if(mp[i][j]=='@'){
a=i; b=j;
}
}
}
for(int i=a-1;i<a+2;++i){
for(int j=b-1;j<b+2;++j){
if((i!=a || j!=b) && i>=0 && i<h && j>=0 && j<w)mp[i][j]='.';
}
}
for(int i=0;i<h;++i) cout<<mp[i]<<endl;
return 0;
}

ステータス

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

セット

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

テストケース

ファイル名 状態 実行時間 メモリ使用量 #
in01.dat AC 22 ms 480 KB
1
in02.dat AC 20 ms 708 KB
1
in03.dat AC 18 ms 560 KB
1
in04.dat AC 17 ms 532 KB
1
in05.dat AC 21 ms 368 KB
1
in06.dat AC 20 ms 348 KB
1