結果

問題 No.11 カードマッチ
ユーザー sekiya9311sekiya9311
提出日時 2016-06-16 15:18:32
言語 C++14
(gcc 12.3.0 + boost 1.83.0)
結果
MLE  
実行時間 -
コード長 1,384 bytes
コンパイル時間 1,155 ms
コンパイル使用メモリ 117,440 KB
実行使用メモリ 814,720 KB
最終ジャッジ日時 2024-04-17 22:51:17
合計ジャッジ時間 6,263 ms
ジャッジサーバーID
(参考情報)
judge5 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
5,248 KB
testcase_01 AC 2 ms
5,376 KB
testcase_02 AC 2 ms
5,376 KB
testcase_03 AC 2 ms
5,376 KB
testcase_04 MLE -
testcase_05 -- -
testcase_06 -- -
testcase_07 -- -
testcase_08 -- -
testcase_09 -- -
testcase_10 -- -
testcase_11 -- -
testcase_12 -- -
testcase_13 -- -
testcase_14 -- -
testcase_15 -- -
testcase_16 -- -
testcase_17 -- -
testcase_18 -- -
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>
#include <string>
#include <queue>
#include <stack>
#include <algorithm>
#include <list>
#include <vector>
#include <complex>
#include <utility>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <cmath>
#include <bitset>
#include <ctime>
#include <map>
#include <unordered_map>
#include <set>
#include <unordered_set>
#include <cassert>
#include <cstddef>
#include <iomanip>
#include <numeric>
#include <tuple>
#include <random>

#define REP(i,n) for(long (i)=0;(i)<(n);(i)++)
#define FOR(i,a,b) for(long (i)=(a);(i)<(b);(i)++)
#define RREP(i,a) for(long (i)=(a)-1;(i)>=0;(i)--)
#define FORR(i,a,b) for(long (i)=(a)-1;(i)>=(b);(i)--)
#define MOD 1000000007
#define PI acos(-1.0)
#define DEBUG(C) cout<<C<<endl;
#define PII pair<int,int>
#define PLL pair<long,long>
#define ALL(a) (a).begin(),(a).end()
#define SORT(a) sort((a).begin(),(a).end())
#define RSORT(a) sort((a).begin(),(a).end(),greater<int>())
#define MP(a,b) make_pair(a,b)

typedef long long LL;
typedef unsigned long long ULL;

using namespace std;

int main(void){
	long W,H,N; cin>>W>>H>>N;
	set<pair<long,long> > m;
	vector<long> S(N),K(N);
	REP(i,N){
		cin>>S[i]>>K[i];
		m.insert(MP(S[i],K[i]));
	}
	REP(i,N){
		FOR(j,1,W+1){
			m.insert(MP(j,K[i]));
		}
		REP(j,H){
			m.insert(MP(S[i],j));
		}
	}
	cout<<m.size()-N<<endl;
	//for(auto i:m) cout<<i.first<<" "<<i.second<<endl;
}
0