Submission #391470

#TimeUsernameProblemLanguageResultExecution timeMemory
391470ElyesChaabouniBold (COCI21_bold)C++14
50 / 50
1 ms312 KiB
#include<bits/stdc++.h> #define eps 1e-9 #define MOD1 998244353 #define MOD2 1000000007 #define INV_2 499122177 #define INF 1000000000 #define PI 3.14159265358979323846 using namespace std; int main() { ios::sync_with_stdio(0);cin.tie(0);cout.tie(0); int n, m; cin >> n >> m; char a[m][n], b[m][n]; for(int i = 0; i <n; i++) for(int j = 0; j < m; j++) b[j][i]='.'; for(int i = 0; i <n; i++) { for(int j = 0; j < m; j++) { cin >> a[j][i]; if(a[j][i]=='#') { b[j][i]='#'; b[j+1][i]='#'; b[j][i+1]='#'; b[j+1][i+1]='#'; } } } for(int i = 0; i <n; i++) { for(int j = 0; j < m; j++) cout << b[j][i]; cout << '\n'; } } //size
#Verdict Execution timeMemoryGrader output
Fetching results...