結果
問題 |
No.11 カードマッチ
|
ユーザー |
![]() |
提出日時 | 2017-07-29 18:03:00 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
AC
|
実行時間 | 2 ms / 5,000 ms |
コード長 | 521 bytes |
コンパイル時間 | 1,345 ms |
コンパイル使用メモリ | 163,332 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-10-10 19:36:55 |
合計ジャッジ時間 | 2,238 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 19 |
ソースコード
#include <bits/stdc++.h> #define FOR(i,bg,ed) for(ll i=(bg);i<(ed);i++) #define REP(i,n) FOR(i,0,n) #define MOD 1000000007 //#define int long long using namespace std; typedef long long ll; typedef vector<vector<ll>> mat; const int INF = 1e9; signed main() { int W, H, N; int S, K; cin >> W >> H >> N; set<int> mark, num; REP(i,N) { cin >> S >> K; mark.insert(S); num.insert(K); } cout << H * mark.size() + W * num.size() - mark.size() * num.size() - N << endl; }