# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
201012 | dolphingarlic | Emacs (COCI20_emacs) | C++14 | 5 ms | 380 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include <bits/stdc++.h>
#define FOR(i, x, y) for (int i = x; i < y; i++)
typedef long long ll;
using namespace std;
char grid[101][101];
int main() {
iostream::sync_with_stdio(false);
cin.tie(0);
int n, m, ans = 0;
cin >> n >> m;
FOR(i, 1, n + 1) FOR(j, 1, m + 1) {
cin >> grid[i][j];
if (grid[i][j] == '*' && grid[i - 1][j] != '*' && grid[i][j - 1] != '*') ans++;
}
cout << ans;
return 0;
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |