結果
問題 |
No.11 カードマッチ
|
ユーザー |
|
提出日時 | 2021-03-14 01:17:05 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 2 ms / 5,000 ms |
コード長 | 350 bytes |
コンパイル時間 | 1,835 ms |
コンパイル使用メモリ | 196,836 KB |
最終ジャッジ日時 | 2025-01-19 16:14:37 |
ジャッジサーバーID (参考情報) |
judge2 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 19 |
ソースコード
#include<bits/stdc++.h> using namespace std; int main(){ int w,h,n; cin >> w >> h >> n; set<int> mark,number; for(int i=0;i < n;i++){ int a,b; cin >> a >> b; mark.insert(a); number.insert(b); } int ans = w*h - n - (w-mark.size())*(h-number.size()); cout << ans << endl; return 0; }