結果
| 問題 |
No.11 カードマッチ
|
| コンテスト | |
| ユーザー |
Zu_rin
|
| 提出日時 | 2020-04-30 00:46:33 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 3 ms / 5,000 ms |
| コード長 | 662 bytes |
| コンパイル時間 | 791 ms |
| コンパイル使用メモリ | 83,592 KB |
| 実行使用メモリ | 5,248 KB |
| 最終ジャッジ日時 | 2024-11-30 17:47:20 |
| 合計ジャッジ時間 | 1,436 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 19 |
ソースコード
#include <iostream>
#include <vector>
#include <string>
#include <list>
#include <queue>
#include <map>
#include <algorithm>
#define rep(i, n) for(i = 0; i < (n); i++)
#define chmax(x, y) x = max(x, y)
#define chmin(x, y) x = min(x, y)
#define MOD 1000000007
#define PI 3.14159265358979323846
#define INF 1 << 30
using namespace std;
typedef long long ll;
typedef pair<int, int> pp;
int main(void) {
int num, i, m, n;
ll w, h, ans = 0;
cin >> w >> h >> num;
map<int, char> a, b;
rep(i, num) {
cin >> m >> n;
a[m], b[n];
}
ans = (ll)a.size() * h + (ll)b.size() * w;
ans -= (ll)a.size() * (ll)b.size();
ans -= num;
cout << ans << "\n";
return 0;
}
Zu_rin