답안 #440594

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
440594 2021-07-02T13:50:06 Z RaadSharar777 Emacs (COCI20_emacs) C++17
20 / 50
1 ms 204 KB
#include<stdio.h>
#include<stdlib.h>
#include<iostream>
#include<vector>
#include<algorithm>
#include<math.h>
#include<string.h>
#include<utility>
using namespace std;
int main(){
	int n,m;
	cin >> n >> m;
	char grid[n+2][m+2];
	memset(grid,0,sizeof grid);
	for (int i = 1; i <= n; i++) {
		string k;
		cin >> k;
		for (int j = 1; j <= m; j++){
			grid[i][j] = k[j-1];
		}
	}
	int sum = 0;
	for(int i = 1; i <= n; i++){
		for(int j = 1; j <= n; j++){
			if(grid[i][j] == '*' && grid[i-1][j]!= '*' && grid[i][j-1]!= '*')
			sum++;
		}
	}
	cout << sum << endl;
}
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 204 KB Output is correct
2 Correct 1 ms 204 KB Output is correct
3 Incorrect 1 ms 204 KB Output isn't correct
4 Incorrect 1 ms 204 KB Output isn't correct
5 Incorrect 0 ms 204 KB Output isn't correct
6 Incorrect 0 ms 204 KB Output isn't correct
7 Correct 1 ms 204 KB Output is correct
8 Correct 1 ms 204 KB Output is correct
9 Incorrect 1 ms 204 KB Output isn't correct
10 Incorrect 1 ms 204 KB Output isn't correct