結果
| 問題 | No.11 カードマッチ |
| コンテスト | |
| ユーザー |
cocolleague
|
| 提出日時 | 2017-01-29 01:43:04 |
| 言語 | C++11 (gcc 15.3.0 + boost 1.92.0) |
| 結果 |
AC
不安定
|
| 実行時間 | 1 ms / 5,000 ms |
| + 308µs | |
| コード長 | 349 bytes |
| 記録 | |
| コンパイル時間 | 913 ms |
| コンパイル使用メモリ | 182,916 KB |
| 実行使用メモリ | 9,864 KB |
| 最終ジャッジ日時 | 2026-10-06 19:49:42 |
| 合計ジャッジ時間 | 2,882 ms |
|
ジャッジサーバーID (参考情報) |
judge3_0 / judge2_1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 19 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
int main(void){
long long W,H;
cin >> W >> H;
int N;
cin >> N;
set<int> mw,mh;
for(int i=0;i<N;i++){
int w,h;
cin >> w >> h;
mw.insert(w);
mh.insert(h);
}
long long ans = 0;
ans = W * mh.size() + H * mw.size() - mw.size() * mh.size() - N;
cout << ans << endl;
}
cocolleague