結果
問題 |
No.11 カードマッチ
|
ユーザー |
|
提出日時 | 2020-04-10 19:30:28 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 3 ms / 5,000 ms |
コード長 | 507 bytes |
コンパイル時間 | 918 ms |
コンパイル使用メモリ | 74,476 KB |
最終ジャッジ日時 | 2025-01-09 15:44:46 |
ジャッジサーバーID (参考情報) |
judge5 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 19 |
ソースコード
#include <iostream> #include <set> using lint = long long; void solve() { lint w, h; std::cin >> w >> h; int n; std::cin >> n; std::set<int> xs, ys; for (int i = 0; i < n; ++i) { int x, y; std::cin >> x >> y; xs.insert(x); ys.insert(y); } std::cout << w * h - (w - xs.size()) * (h - ys.size()) - n << std::endl; } int main() { std::cin.tie(nullptr); std::ios::sync_with_stdio(false); solve(); return 0; }