結果
問題 |
No.11 カードマッチ
|
ユーザー |
|
提出日時 | 2025-05-03 18:08:02 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 2 ms / 5,000 ms |
コード長 | 349 bytes |
コンパイル時間 | 914 ms |
コンパイル使用メモリ | 75,320 KB |
実行使用メモリ | 6,272 KB |
最終ジャッジ日時 | 2025-05-03 18:08:05 |
合計ジャッジ時間 | 2,264 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 19 |
ソースコード
#include<iostream> #include<set> using namespace std; using ll = long long; int main(void){ ll w, h, n; cin >> w >> h >> n; set<int> mark, num; for(int i=0; i<n; i++){ int s, k; cin >> s >> k; mark.insert(s); num.insert(k); } ll ans=h*mark.size()+w*num.size()-(ll)mark.size()*num.size()-n; cout << ans << endl; return 0; }