結果
問題 | No.11 カードマッチ |
ユーザー | shimashima_k |
提出日時 | 2015-04-27 05:29:54 |
言語 | C++11 (gcc 13.3.0) |
結果 |
AC
|
実行時間 | 2 ms / 5,000 ms |
コード長 | 316 bytes |
コンパイル時間 | 1,347 ms |
コンパイル使用メモリ | 162,936 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-10-11 19:47:53 |
合計ジャッジ時間 | 2,114 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 19 |
ソースコード
#include "bits/stdc++.h"using namespace std;int main() {int w,h,n;cin>>w>>h>>n;set<int> ss,sk;for (int i=0; i<n; i++) {int s,k;cin >> s>>k;ss.insert(s);sk.insert(k);}cout<< ss.size()*h + sk.size()*w - sk.size()*ss.size() -n<< endl;return 0;}