답안 #923345

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
923345 2024-02-07T06:45:50 Z Isam Bold (COCI21_bold) C++17
50 / 50
1 ms 604 KB
#include<bits/stdc++.h>

using namespace std;

constexpr int sz = 2e5 + 5;

int n, m;
bool h[101][101];
string c;

signed main(){
	ios_base::sync_with_stdio(0), cin.tie(0), cout.tie(0);
	cin >> n >> m;
	for(register int i = 1; i <= n; ++i){
		cin >> c;
		for(register int j = 1; j <= m; ++j){
			if(c[j-1] == '#'){
				h[i][j] = h[i+1][j] = h[i][j+1] = h[i+1][j+1] = true;
			}
		}
	}
	for(register int i = 1; i <= n; ++i){
		for(register int j = 1; j <= m; ++j){
			cout << (h[i][j] ? '#' : '.');
		}
		cout << '\n';
	}
	return 0;
}

Compilation message

bold.cpp: In function 'int main()':
bold.cpp:14:19: warning: ISO C++17 does not allow 'register' storage class specifier [-Wregister]
   14 |  for(register int i = 1; i <= n; ++i){
      |                   ^
bold.cpp:16:20: warning: ISO C++17 does not allow 'register' storage class specifier [-Wregister]
   16 |   for(register int j = 1; j <= m; ++j){
      |                    ^
bold.cpp:22:19: warning: ISO C++17 does not allow 'register' storage class specifier [-Wregister]
   22 |  for(register int i = 1; i <= n; ++i){
      |                   ^
bold.cpp:23:20: warning: ISO C++17 does not allow 'register' storage class specifier [-Wregister]
   23 |   for(register int j = 1; j <= m; ++j){
      |                    ^
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 348 KB Output is correct
2 Correct 0 ms 348 KB Output is correct
3 Correct 0 ms 348 KB Output is correct
4 Correct 1 ms 464 KB Output is correct
5 Correct 1 ms 604 KB Output is correct