結果

問題 No.1338 Giant Class
ユーザー yuuiyuui
提出日時 2021-01-15 21:48:47
言語 C++17
(gcc 12.3.0 + boost 1.83.0)
結果
RE  
実行時間 -
コード長 446 bytes
コンパイル時間 2,138 ms
コンパイル使用メモリ 198,568 KB
実行使用メモリ 814,572 KB
最終ジャッジ日時 2023-08-17 16:44:08
合計ジャッジ時間 7,713 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
4,380 KB
testcase_01 AC 1 ms
4,376 KB
testcase_02 AC 177 ms
4,376 KB
testcase_03 AC 2 ms
4,380 KB
testcase_04 AC 2 ms
4,384 KB
testcase_05 AC 2 ms
4,380 KB
testcase_06 AC 224 ms
72,540 KB
testcase_07 AC 203 ms
72,856 KB
testcase_08 AC 126 ms
25,380 KB
testcase_09 AC 110 ms
9,624 KB
testcase_10 AC 209 ms
25,976 KB
testcase_11 AC 39 ms
63,968 KB
testcase_12 AC 141 ms
4,384 KB
testcase_13 RE -
testcase_14 MLE -
testcase_15 MLE -
testcase_16 -- -
testcase_17 -- -
testcase_18 -- -
testcase_19 -- -
testcase_20 -- -
testcase_21 -- -
testcase_22 -- -
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (n); ++i)
using namespace std;
using ll = long long;

int main() {
    ll H, W, Q;
    cin >> H >> W >> Q;
    vector<ll> minV(W, H);
    ll ans = H * W;
    rep(q, Q) {
        ll y, x;
        cin >> y >> x;
        --y;
        --x;
        if (minV[x] > y) {
            ans -= (minV[x] - y);
            minV[x] = y;
        }
        cout << ans << "\n";
    }

    return 0;
}
0