結果

問題 No.11 カードマッチ
ユーザー kenken714kenken714
提出日時 2019-04-18 20:37:19
言語 C++11
(gcc 11.4.0)
結果
MLE  
実行時間 -
コード長 829 bytes
コンパイル時間 857 ms
コンパイル使用メモリ 90,252 KB
実行使用メモリ 814,944 KB
最終ジャッジ日時 2023-10-23 16:24:00
合計ジャッジ時間 6,018 ms
ジャッジサーバーID
(参考情報)
judge15 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 1 ms
4,348 KB
testcase_01 AC 2 ms
4,348 KB
testcase_02 AC 1 ms
4,348 KB
testcase_03 AC 2 ms
4,348 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 <utility>
#include <algorithm>
#include <map>
#include <set>
#include <vector>
#include <cmath>
#include <cstdlib>
#include <queue>
#include <stack>
#include <iomanip>

using namespace std;

#define REP(i, n) for(ll i = 0;i < n;i++)
#define REPR(i, n) for(ll i = n;i >= 0;i--)
#define FOR(i, m, n) for(ll i = m;i < n;i++)
#define FORR(i, m, n) for(ll i = m;i >= n;i--)
#define REPO(i, n) for(ll i = 1;i <= n;i++)
#define ll long long
#define INF (ll)1 << 60
#define MINF (-1 * INF)
#define ALL(n) n.begin(),n.end()
#define MOD 1000000007
#define P pair<ll, ll>

ll a, b, n, s1[110], s2[110];
map<P,ll> m;
int main() {
	cin >> a >> b >> n;
	REP(i, n)cin >> s1[i] >> s2[i];
	REP(i, n) {
		REPO(j, a)m[P(j, s2[i])]++;
		REPO(j, b)m[P(s1[i], j)];
	}
	cout << m.size() - n << endl;
}



0