結果

問題 No.975 ミスターマックスバリュ
ユーザー set0gut1set0gut1
提出日時 2020-01-31 21:22:04
言語 C++14
(gcc 12.3.0 + boost 1.83.0)
結果
AC  
実行時間 7 ms / 2,000 ms
コード長 840 bytes
コンパイル時間 738 ms
コンパイル使用メモリ 83,632 KB
実行使用メモリ 4,348 KB
最終ジャッジ日時 2023-10-17 08:31:31
合計ジャッジ時間 1,399 ms
ジャッジサーバーID
(参考情報)
judge15 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
4,348 KB
testcase_01 AC 2 ms
4,348 KB
testcase_02 AC 2 ms
4,348 KB
testcase_03 AC 2 ms
4,348 KB
testcase_04 AC 2 ms
4,348 KB
testcase_05 AC 2 ms
4,348 KB
testcase_06 AC 2 ms
4,348 KB
testcase_07 AC 2 ms
4,348 KB
testcase_08 AC 7 ms
4,348 KB
testcase_09 AC 2 ms
4,348 KB
testcase_10 AC 2 ms
4,348 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <algorithm>
#include <bitset>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <string>
#include <unordered_map>
#include <unordered_set>
#include <vector>
#define MOD (1000000007l)
#define ll long long
#define rep(i, n) for (ll i = 0; i < (n); i++)

using namespace std;

void solve() {
  ll X, N, M;
  cin >> X >> N >> M;

  ll state = 0;
  rep (i, N) { ll tmp; cin >> tmp; if (tmp == X) state += 1; }
  rep (i, M) { ll tmp; cin >> tmp; if (tmp == X) state += 2; }

  if (state == 0) cout << -1 << endl;
  else if (state == 1) cout << "MrMax" << endl;
  else if (state == 2) cout << "MaxValu" << endl;
  else if (state == 3) cout << "MrMaxValu" << endl;
}

int main(void) {
  cin.tie(0);
  ios::sync_with_stdio(false);
  cout.precision(12);
  cout << fixed;
  solve();
  return 0;
}
0