結果

問題 No.975 ミスターマックスバリュ
ユーザー wait_sushiwait_sushi
提出日時 2020-01-31 21:24:10
言語 C++14
(gcc 13.2.0 + boost 1.83.0)
結果
AC  
実行時間 36 ms / 2,000 ms
コード長 1,503 bytes
コンパイル時間 1,632 ms
コンパイル使用メモリ 172,672 KB
実行使用メモリ 6,432 KB
最終ジャッジ日時 2023-10-17 08:35:22
合計ジャッジ時間 2,392 ms
ジャッジサーバーID
(参考情報)
judge13 / 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 3 ms
4,348 KB
testcase_07 AC 3 ms
4,348 KB
testcase_08 AC 36 ms
6,432 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;
typedef long long int ll;
typedef vector<ll> vl;
typedef pair<ll, ll> PP;
#define rep(i, n) for(ll i = 0; i < ll(n); i++)
#define all(v) v.begin(), v.end()
#define inputv(v, n)                                                           \
    vl v;                                                                      \
    rep(i, n) {                                                                \
        ll x;                                                                  \
        cin >> x;                                                              \
        v.push_back(x);                                                        \
    }
bool chmin(ll& a, ll& b) { if (b < a) { a = b; return 1; } return 0; }
bool chmax(ll& a, ll& b) { if (b > a) { a = b; return 1; } return 0; }
const ll INF = 999999999999999;
const ll MOD = 1000000007;
const ll MAX_N = 500010;
ll a, b, c, d, e, f, p, t, x, y, z, q, m, n, r, h, k, w, l, ans;
int main() {
    cin >> x >> n >> m;
    set<ll> A, B;
    rep(i, n) {
        cin >> a;
        A.insert(a);
    }

    rep(i, m) {
        cin >> a;
        B.insert(a);
    }

    if (A.count(x) == 1 && B.count(x) == 1) {
        cout << "MrMaxValu"<<endl;
    }
    if (A.count(x) == 1 && B.count(x) == 0) {
        cout << "MrMax"<<endl;
    }
    if (A.count(x) == 0 && B.count(x) == 1) {
        cout << "MaxValu" << endl;
    }
    if (A.count(x) == 0 && B.count(x) == 0) {
        cout << -1 << endl;
    }

}
0