Submission #210019

#TimeUsernameProblemLanguageResultExecution timeMemory
210019apostoldaniel854Emacs (COCI20_emacs)C++14
50 / 50
5 ms376 KiB
/*
Problem: https://oj.uz/problem/view/COCI20_emacs
*/


#include <bits/stdc++.h>

using namespace std;


typedef long long ll;
#define pb push_back
#define dbg(x) cerr << #x << " " << x << "\n"

const int N = 100;

char a[1 + N][1 + N];

int main() {
    ios::sync_with_stdio (false);
    cin.tie (0); cout.tie (0);

    int n, m;
    cin >> n >> m;
    int ans = 0;
    for (int i = 1; i <= n; i++) {
        for (int j = 1; j <= m; j++) {
            cin >> a[i][j];
            if (a[i - 1][j] != '*' && a[i][j - 1] != '*' && a[i][j] == '*')
                ans++;
        }
    }
    cout << ans << "\n";

    return 0;
}
#Verdict Execution timeMemoryGrader output
Fetching results...