結果

問題 No.975 ミスターマックスバリュ
ユーザー koba-e964koba-e964
提出日時 2020-02-27 02:01:49
言語 C++17
(gcc 12.3.0 + boost 1.83.0)
結果
AC  
実行時間 25 ms / 2,000 ms
コード長 1,094 bytes
コンパイル時間 1,219 ms
コンパイル使用メモリ 128,780 KB
実行使用メモリ 6,272 KB
最終ジャッジ日時 2024-04-21 16:44:13
合計ジャッジ時間 1,796 ms
ジャッジサーバーID
(参考情報)
judge1 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
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 AC 2 ms
5,376 KB
testcase_05 AC 2 ms
5,376 KB
testcase_06 AC 2 ms
5,376 KB
testcase_07 AC 2 ms
5,376 KB
testcase_08 AC 25 ms
6,272 KB
testcase_09 AC 2 ms
5,376 KB
testcase_10 AC 2 ms
5,376 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <algorithm>
#include <cassert>
#include <cctype>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <ctime>
#include <deque>
#include <functional>
#include <iomanip>
#include <iostream>
#include <list>
#include <map>
#include <queue>
#include <random>
#include <set>
#include <sstream>
#include <string>
#include <utility>
#include <vector>

#define REP(i,s,n) for(int i=(int)(s);i<(int)(n);i++)
#define DEBUGP(val) cerr << #val << "=" << val << "\n"

using namespace std;
typedef long long int ll;
typedef vector<int> VI;
typedef vector<ll> VL;
typedef pair<int, int> PI;
const ll mod = 1e9 + 7;



int main(void) {
  ios::sync_with_stdio(false);
  cin.tie(0);
  int x, n, m;
  cin >> x >> n >> m;
  set<int> a, b;
  REP(i, 0, n) {
    int v; cin >> v;
    a.insert(v);
  }
  REP(i, 0, m) {
    int v; cin >> v;
    b.insert(v);
  }
  int ty = a.count(x) * 2 + b.count(x);
  if (ty == 0) {
    cout << -1 << endl;
  } else if (ty == 1) {
    cout << "MaxValu" << endl;
  } else if (ty == 2) {
    cout << "MrMax" << endl;
  } else {
    cout << "MrMaxValu" << endl;
  }
}
0