結果
| 問題 | No.11 カードマッチ |
| コンテスト | |
| ユーザー |
rsk0315
|
| 提出日時 | 2019-07-03 18:40:30 |
| 言語 | C++17 (gcc 15.2.0 + boost 1.89.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 5,000 ms |
| コード長 | 470 bytes |
| 記録 | |
| コンパイル時間 | 576 ms |
| コンパイル使用メモリ | 74,624 KB |
| 実行使用メモリ | 6,400 KB |
| 最終ジャッジ日時 | 2026-06-07 13:09:25 |
| 合計ジャッジ時間 | 2,508 ms |
|
ジャッジサーバーID (参考情報) |
judge1_1 / judge2_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 19 |
ソースコード
#include <cstdio>
#include <cstdint>
#include <vector>
#include <set>
#include <algorithm>
int main() {
intmax_t W, H, N;
scanf("%jd %jd %jd", &W, &H, &N);
std::set<intmax_t> w, h;
for (int i = 0; i < N; ++i) {
int wi, hi;
scanf("%d %d", &wi, &hi);
w.insert(wi);
h.insert(hi);
}
intmax_t w0 = w.size();
intmax_t h0 = h.size();
intmax_t res = 0;
res += h0 * W;
res += H * w0;
res -= h0 * w0;
res -= N;
printf("%jd\n", res);
}
rsk0315