結果

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

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
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 <bits/stdc++.h>
using namespace std;
using ll = long long;
using PII = pair<ll, ll>;
#define FOR(i, a, n) for (ll i = (ll)a; i < (ll)n; ++i)
#define REP(i, n) FOR(i, 0, n)
#define ALL(x) x.begin(), x.end()
template<typename T> void chmin(T &a, const T &b) { a = min(a, b); }
template<typename T> void chmax(T &a, const T &b) { a = max(a, b); }
struct FastIO {FastIO() { cin.tie(0); ios::sync_with_stdio(0); }}fastiofastio;
#ifdef DEBUG_ 
#include "../program_contest_library/memo/dump.hpp"
#else
#define dump(...)
#endif
const ll INF = 1LL<<60;

int main(void) {
    ll x, n, m;
    cin >> x >> n >> m;
    vector<ll> a(n), b(m);
    REP(i, n) cin >> a[i];
    REP(i, m) cin >> b[i];

    bool flag1 = false, flag2 = false;
    REP(i, n) if(a[i] == x) flag1 = true;
    REP(i, m) if(b[i] == x) flag2 = true;

    if(flag1 && flag2) cout << "MrMaxValu" << endl;
    else if(flag1) cout << "MrMax" << endl;
    else if(flag2) cout << "MaxValu" << endl;
    else cout << -1 << endl;
 
    return 0;
}
0