結果
問題 |
No.11 カードマッチ
|
ユーザー |
|
提出日時 | 2015-06-05 15:54:41 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
AC
|
実行時間 | 2 ms / 5,000 ms |
コード長 | 396 bytes |
コンパイル時間 | 773 ms |
コンパイル使用メモリ | 64,248 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-10-11 19:49:36 |
合計ジャッジ時間 | 1,304 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 19 |
ソースコード
#include <algorithm> #include <iostream> #include <set> #define REP(i,s,n) for(int i=(int)(s);i<(int)(n);i++) using namespace std; typedef long long int ll; int main(void){ ll w,h,n; cin >> w >> h >> n; set<int> suit, num; REP (i, 0, n) { int s,t; cin >> s >> t; suit.insert(s); num.insert(t); } cout << w * h - (w - suit.size()) * (h - num.size()) - n << endl; }