結果

問題 No.1338 Giant Class
ユーザー Manuel1024Manuel1024
提出日時 2021-03-21 13:57:31
言語 C++14
(gcc 12.3.0 + boost 1.83.0)
結果
RE  
実行時間 -
コード長 426 bytes
コンパイル時間 597 ms
コンパイル使用メモリ 70,180 KB
実行使用メモリ 806,580 KB
最終ジャッジ日時 2024-05-01 22:52:37
合計ジャッジ時間 7,032 ms
ジャッジサーバーID
(参考情報)
judge4 / judge3
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
6,812 KB
testcase_01 AC 1 ms
6,940 KB
testcase_02 AC 187 ms
6,944 KB
testcase_03 AC 2 ms
6,944 KB
testcase_04 AC 2 ms
6,944 KB
testcase_05 AC 3 ms
6,940 KB
testcase_06 AC 151 ms
37,928 KB
testcase_07 AC 203 ms
38,280 KB
testcase_08 AC 128 ms
14,456 KB
testcase_09 AC 118 ms
6,944 KB
testcase_10 AC 208 ms
14,840 KB
testcase_11 AC 31 ms
33,656 KB
testcase_12 AC 144 ms
6,944 KB
testcase_13 RE -
testcase_14 AC 305 ms
397,996 KB
testcase_15 MLE -
testcase_16 MLE -
testcase_17 -- -
testcase_18 -- -
testcase_19 -- -
testcase_20 -- -
testcase_21 -- -
testcase_22 -- -
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>
#include <vector>
using namespace std;
using ll = long long int;

int main(){
    int h, w, q;
    cin >> h >> w >> q;
    ll ans = (ll)h*w;
    vector<int> canuse(w, h);
    while(q--){
        int y, x;
        cin >> y >> x;
        if(canuse[x-1] > y-1){
            ans -= canuse[x-1];
            ans += y-1;
            canuse[x-1] = y-1;
        }
        cout << ans << endl;
    }
    return 0;
}
0