提出 #36948714


ソースコード 拡げる

#include <bits/stdc++.h>
#include <atcoder/all>
using namespace atcoder;
#define rep(i,n) for (int i = 0; i < (n); ++i)
using namespace std;
using ll = long long;
using P = pair<int,int>;
#define chmax(x,y) x = max(x,y);
#define chmin(x,y) x = min(x,y);
const int di[] = {-1, 0, 1, 0};
const int dj[] = {0, -1, 0, 1};
const int INF = 1001001001;
const ll LINF = 1001002003004005006ll;
const double PI = acos(-1);



int main() {
    int h, w;
    cin >> h >> w;
    vector<string> s(h);
    rep(i,h) cin >> s[i];
    int ans = 0;
    rep(i,h)rep(j,w) if (s[i][j] == '#') ans++;
    cout << ans << endl;
    return 0;
}

提出情報

提出日時
問題 A - Pawn on a Grid
ユーザ taki0711
言語 C++ (GCC 9.2.1)
得点 100
コード長 644 Byte
結果 AC
実行時間 8 ms
メモリ 3572 KiB

ジャッジ結果

セット名 Sample All
得点 / 配点 0 / 0 100 / 100
結果
AC × 3
AC × 12
セット名 テストケース
Sample example_00.txt, example_01.txt, example_02.txt
All example_00.txt, example_01.txt, example_02.txt, hand_00.txt, hand_01.txt, hand_02.txt, random_00.txt, random_01.txt, random_02.txt, random_03.txt, random_04.txt, random_05.txt
ケース名 結果 実行時間 メモリ
example_00.txt AC 8 ms 3560 KiB
example_01.txt AC 2 ms 3572 KiB
example_02.txt AC 2 ms 3372 KiB
hand_00.txt AC 2 ms 3556 KiB
hand_01.txt AC 3 ms 3468 KiB
hand_02.txt AC 1 ms 3564 KiB
random_00.txt AC 2 ms 3488 KiB
random_01.txt AC 2 ms 3496 KiB
random_02.txt AC 2 ms 3492 KiB
random_03.txt AC 3 ms 3572 KiB
random_04.txt AC 2 ms 3568 KiB
random_05.txt AC 2 ms 3412 KiB