結果
| 問題 |
No.11 カードマッチ
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2018-11-24 14:51:55 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 3 ms / 5,000 ms |
| コード長 | 379 bytes |
| コンパイル時間 | 1,836 ms |
| コンパイル使用メモリ | 172,576 KB |
| 実行使用メモリ | 5,248 KB |
| 最終ジャッジ日時 | 2024-12-24 19:19:29 |
| 合計ジャッジ時間 | 2,670 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 19 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
int main(){
ios::sync_with_stdio(false);
cin.tie(0);
long long w, h, n; cin >> w >> h >> n;
set<long long> suit, num;
for(int i = 0; i < n; i++) {
int t, s; cin >> t >> s;
suit.insert(t);
num.insert(s);
}
cout << suit.size() * h + num.size() * w - suit.size() * num.size() - n << endl;
return 0;
}