# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
966711 | 2024-04-20T08:46:48 Z | AliHasanli | Bold (COCI21_bold) | C++17 | 1 ms | 604 KB |
#include <iostream> using namespace std; int main() { int n,m; cin>>n>>m; char a[n][m]; for(int i=0;i<n;i++) for(int j=0;j<m;j++) cin>>a[i][j]; for(int i=0;i<n-1;i++) for(int j=0;j<m-1;j++) { if(a[i][j]=='#' && a[i+1][j]=='.')a[i+1][j]='?'; if(a[i][j]=='#' && a[i+1][j+1]=='.')a[i+1][j+1]='?'; if(a[i][j]=='#' && a[i][j+1]=='.')a[i][j+1]='?';} for(int i=0;i<n;i++){ for(int j=0;j<m;j++) if(a[i][j]!='.')cout<<"#";else cout<<".";cout<<endl;} return 0; }
Compilation message
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 0 ms | 344 KB | Output is correct |
2 | Correct | 1 ms | 348 KB | Output is correct |
3 | Correct | 0 ms | 348 KB | Output is correct |
4 | Correct | 0 ms | 348 KB | Output is correct |
5 | Correct | 1 ms | 604 KB | Output is correct |