Submission #500563

# Submission time Handle Problem Language Result Execution time Memory
500563 2021-12-31T11:22:40 Z noNickman Emacs (COCI20_emacs) C++14
25 / 50
1 ms 300 KB
#include <bits/stdc++.h>
using namespace std;
int main(){
	int n,m;
	cin >> n >> m;
	char a[n][m];
	int ans=0;
	if(n == 1){
		for(int i=0;i<n;i++){
			for(int j=0;j<m;j++){
				cin >> a[i][j];
				
				
			}
		}
		for(int i=0;i<n;i++){
			for(int j=0;j<m;j++){
				if(a[i][j] == '*' && a[i][j+1] != '*') ans++;	
			}
		}
		cout << ans << '\n';
	}
	else{
		for(int i=0;i<n;i++){
			for(int j=0;j<m;j++){
				cin >> a[i][j];
				if(a[i][j] == '*') ans++; 
				
			}
		}
		cout << ans << '\n';
	}
	
}	
# Verdict Execution time Memory Grader output
1 Correct 1 ms 292 KB Output is correct
2 Incorrect 1 ms 204 KB Output isn't correct
3 Correct 1 ms 204 KB Output is correct
4 Correct 0 ms 204 KB Output is correct
5 Correct 0 ms 204 KB Output is correct
6 Correct 0 ms 204 KB Output is correct
7 Incorrect 1 ms 204 KB Output isn't correct
8 Incorrect 1 ms 204 KB Output isn't correct
9 Incorrect 1 ms 300 KB Output isn't correct
10 Incorrect 1 ms 204 KB Output isn't correct