結果

問題 No.975 ミスターマックスバリュ
ユーザー utouto97utouto97
提出日時 2020-02-05 21:58:58
言語 C++11
(gcc 11.4.0)
結果
AC  
実行時間 19 ms / 2,000 ms
コード長 895 bytes
コンパイル時間 1,428 ms
コンパイル使用メモリ 161,820 KB
実行使用メモリ 4,372 KB
最終ジャッジ日時 2023-10-24 10:53:26
合計ジャッジ時間 2,439 ms
ジャッジサーバーID
(参考情報)
judge11 / judge14
このコードへのチャレンジ(β)

テストケース

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

ソースコード

diff #

#include <bits/stdc++.h>
using namespace std;

#define int long long
#define rep(i, l, r) for (int i = (int)(l); i < (int)(r); i++)
#define all(x) (x).begin(), (x).end()
#define sz(x) ((int)x.size())
template <class T> bool chmax(T &a, T b) {
  if (a < b) {
    a = b;
    return 1;
  }
  return 0;
}
template <class T> bool chmin(T &a, T b) {
  if (a > b) {
    a = b;
    return 1;
  }
  return 0;
}

/*
 */

using vi = vector<int>;
using vvi = vector<vi>;
using P = pair<int, int>;

signed main() {
  int x, n, m;
  cin >> x >> n >> m;
  vi a(n), b(m);
  bool t = false, u = false;
  rep(i, 0, n) {
    cin >> a[i];
    if (a[i] == x)
      t = true;
  }
  rep(i, 0, m) {
    cin >> b[i];
    if (b[i] == x)
      u = true;
  }

  if(t and u) cout << "MrMaxValu" << endl;
  else if(t) cout << "MrMax" << endl;
  else if(u) cout << "MaxValu" << endl;
  else cout << -1 << endl;

  return 0;
}
0