結果
| 問題 |
No.11 カードマッチ
|
| コンテスト | |
| ユーザー |
togari_takamoto
|
| 提出日時 | 2015-12-13 07:33:09 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
AC
|
| 実行時間 | 24 ms / 5,000 ms |
| コード長 | 788 bytes |
| コンパイル時間 | 847 ms |
| コンパイル使用メモリ | 97,772 KB |
| 実行使用メモリ | 26,624 KB |
| 最終ジャッジ日時 | 2024-10-11 19:57:39 |
| 合計ジャッジ時間 | 1,661 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 19 |
ソースコード
#include <iostream>
#include <vector>
#include <array>
#include <algorithm>
#include <string>
#include <map>
#include <queue>
#include <iomanip>
#include <numeric>
#include <memory>
#include <limits.h>
#include <set>
#include <cassert>
#include <cmath>
#include <bitset>
#include <functional>
#include <limits>
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
#define REP(i,n) for(ll i=0; i<(n); ++i)
#define TEN(x) ((ll)1e##x)
#define ALL(v) (v).begin(), (v).end()
int main(){
ll w,h,n;
cin >> w >> h >> n;
vector<vector<ll>> wh(w);
set<ll> k_set;
REP(i, n) {
ll s, k;
cin >> s >> k; s--; k--;
wh[s].push_back(k);
k_set.insert(k);
}
ll c = 0;
REP(i, w) c += (wh[i].empty()) ? k_set.size() : h - wh[i].size();
cout << c << endl;
return 0;
}
togari_takamoto