Submission #1192025

#TimeUsernameProblemLanguageResultExecution timeMemory
1192025SmuggingSpunBold (COCI21_bold)C++20
50 / 50
0 ms328 KiB
#include<bits/stdc++.h> #define taskname "A" using namespace std; int main(){ ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0); if(fopen(taskname".inp", "r")){ freopen(taskname".inp", "r", stdin); } int n, m; cin >> n >> m; vector<vector<char>>a(n + 1, vector<char>(m + 1)); for(int i = 0; i < n; i++){ for(int j = 0; j < m; j++){ cin >> a[i][j]; } } for(int i = n - 1; i > -1; i--){ for(int j = m - 1; j > -1; j--){ if(a[i][j] == '#'){ a[i][j + 1] = a[i + 1][j] = a[i + 1][j + 1] = '#'; } } } for(int i = 0; i < n; i++){ for(int j = 0; j < m; j++){ cout << a[i][j]; } cout << "\n"; } }

Compilation message (stderr)

bold.cpp: In function 'int main()':
bold.cpp:7:24: warning: ignoring return value of 'FILE* freopen(const char*, const char*, FILE*)' declared with attribute 'warn_unused_result' [-Wunused-result]
    7 |                 freopen(taskname".inp", "r", stdin);
      |                 ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~
#Verdict Execution timeMemoryGrader output
Fetching results...