結果

問題 No.975 ミスターマックスバリュ
ユーザー firiexpfiriexp
提出日時 2020-01-31 21:22:12
言語 C++14
(gcc 13.2.0 + boost 1.83.0)
結果
AC  
実行時間 22 ms / 2,000 ms
コード長 896 bytes
コンパイル時間 942 ms
コンパイル使用メモリ 99,404 KB
実行使用メモリ 6,944 KB
最終ジャッジ日時 2024-04-10 02:14:01
合計ジャッジ時間 1,486 ms
ジャッジサーバーID
(参考情報)
judge2 / judge5
このコードへのチャレンジ(β)

テストケース

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

ソースコード

diff #

#include <iostream>
#include <algorithm>
#include <iomanip>
#include <map>
#include <set>
#include <queue>
#include <stack>
#include <numeric>
#include <bitset>
#include <cmath>
#include <limits>

static const int MOD = 1000000007;
using ll = long long;
using u32 = unsigned;
using u64 = unsigned long long;
using namespace std;

template<class T> constexpr T INF = ::numeric_limits<T>::max()/32*15+208;

int main() {
    int x, n, m;
    cin >> x >> n >> m;
    set<int> s, t;
    for (int i = 0; i < n; ++i) {
        int w;
        scanf("%d", &w);
        s.emplace(w);
    }
    for (int i = 0; i < m; ++i) {
        int w;
        scanf("%d", &w);
        t.emplace(w);
    }
    if(s.count(x) && t.count(x)){
        puts("MrMaxValu");
    }else if(s.count(x)){
        puts("MrMax");
    }else if(t.count(x)){
        puts("MaxValu");
    }else {
        puts("-1");
    }
    return 0;
}
0