# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
200977 | model_code | Emacs (COCI20_emacs) | C++17 | 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>
using namespace std;
const int MAXN = 1000;
string t[MAXN];
int main() {
int n, m;
cin >> n >> m;
for (int i = 0; i < n; i++) cin >> t[i];
int sol = 0;
for (int i = 0; i < n; i++)
for (int j = 0; j < m; j++)
sol += (i == 0 || t[i - 1][j] == '.') &&
(j == 0 || t[i][j - 1] == '.') &&
t[i][j] == '*';
cout << sol << "\n";
return 0;
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |