Submission #1245201

#TimeUsernameProblemLanguageResultExecution timeMemory
1245201huydayyBold (COCI21_bold)C++20
50 / 50
0 ms328 KiB
#include <bits/stdc++.h> #define TASK "coci2021_r6_bold" #define int long long #define fi first #define se second #define pb push_back #define ii pair<int, int> #define vi vector<int> #define vvi vector<vi> #define vii vector<ii> #define reset(f, x) memset(f, x, sizeof(f)) #define all(x) x.begin(), x.end() #define FOR(i, a, b) for (int i = (a), _b = (b); i <= _b; ++i) #define FORD(i, b, a) for (int i = (b), _a = (a); i >= _a; --i) #define FORV(v, H) for (auto &v: H) #define __builtin_popcount __builtin_popcountll #define BIT(mask, i) (mask & (1ll << (i))) #define MASK(i) (1ll << (i)) #define ONBIT(mask, i) (mask (1ll << (i))) #define OFFBIT(mask, i) (mask &~ (1ll << (i))) #define mid(l,r) ((l + r) >> 1) #define left(id) (id << 1) #define right(id) ((id << 1) | 1) #define TIME (1.0*clock()/CLOCKS_PER_SEC) using namespace std; const int oo = 1e18; const int MOD = 1e9 + 7; const int MAXN = 105; int N, M; char A[MAXN][MAXN], B[MAXN][MAXN]; main(){ ios_base::sync_with_stdio(0); cin.tie(0); cin >> N >> M; FOR(i, 1, N){ FOR(j, 1, M){ cin >> A[i][j]; B[i][j] = '.'; } } FOR(i, 1, N){ FOR(j, 1, M){ if (A[i][j] == '#'){ B[i][j] = '#'; B[i + 1][j] = '#'; B[i][j + 1] = '#'; B[i + 1][j + 1] = '#'; } } } FOR(i, 1, N){ FOR(j, 1, M){ cout << B[i][j]; } cout << '\n'; } return 0; }

Compilation message (stderr)

bold.cpp:35:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
   35 | main(){
      | ^~~~
#Verdict Execution timeMemoryGrader output
Fetching results...