답안 #210019

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
210019 2020-03-16T10:47:14 Z apostoldaniel854 Emacs (COCI20_emacs) C++14
50 / 50
5 ms 376 KB
/*
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;
}
# 결과 실행 시간 메모리 Grader output
1 Correct 5 ms 376 KB Output is correct
2 Correct 5 ms 248 KB Output is correct
3 Correct 5 ms 376 KB Output is correct
4 Correct 5 ms 376 KB Output is correct
5 Correct 5 ms 376 KB Output is correct
6 Correct 5 ms 376 KB Output is correct
7 Correct 5 ms 376 KB Output is correct
8 Correct 5 ms 376 KB Output is correct
9 Correct 5 ms 376 KB Output is correct
10 Correct 5 ms 376 KB Output is correct