結果

問題 No.1338 Giant Class
ユーザー トッティ
提出日時 2021-01-15 21:56:21
言語 C++17(clang)
(17.0.6 + boost 1.87.0)
結果
RE  
実行時間 -
コード長 399 bytes
コンパイル時間 1,788 ms
コンパイル使用メモリ 119,808 KB
実行使用メモリ 817,408 KB
最終ジャッジ日時 2024-11-26 14:27:56
合計ジャッジ時間 8,840 ms
ジャッジサーバーID
(参考情報)
judge5 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 11 RE * 7 MLE * 3
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>
#include <vector>

int main() {
  int64_t height, width, nq;
  std::cin >> height >> width >> nq;

  std::vector<int64_t> min(width, height);
  size_t now = width * height;
  int64_t h, w;
  for (size_t i = 0; i < nq; i++) {
    std::cin >> h >> w;
    h--;
    w--;
    if (min[w] > h) {
      now -= min[w] - h;
      min[w] = h;
    }
    std::cout << now << std::endl;
  }
}
0