Submission #966711

#TimeUsernameProblemLanguageResultExecution timeMemory
966711AliHasanliBold (COCI21_bold)C++17
50 / 50
1 ms604 KiB
#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 (stderr)

bold.cpp: In function 'int main()':
bold.cpp:18:9: warning: this 'for' clause does not guard... [-Wmisleading-indentation]
   18 |         for(int j=0;j<m;j++)
      |         ^~~
bold.cpp:19:54: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'for'
   19 |             if(a[i][j]!='.')cout<<"#";else cout<<".";cout<<endl;}
      |                                                      ^~~~
#Verdict Execution timeMemoryGrader output
Fetching results...