結果

問題 No.975 ミスターマックスバリュ
ユーザー suminoeno7suminoeno7
提出日時 2023-04-02 22:45:49
言語 C++14
(gcc 12.3.0 + boost 1.83.0)
結果
AC  
実行時間 36 ms / 2,000 ms
コード長 555 bytes
コンパイル時間 678 ms
コンパイル使用メモリ 72,276 KB
実行使用メモリ 6,420 KB
最終ジャッジ日時 2023-10-25 05:13:49
合計ジャッジ時間 1,489 ms
ジャッジサーバーID
(参考情報)
judge14 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
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 2 ms
4,348 KB
testcase_08 AC 36 ms
6,420 KB
testcase_09 AC 2 ms
4,348 KB
testcase_10 AC 2 ms
4,348 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include<iostream>
#include<set>
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
using namespace std;

int main() {
    int x, n, m;
    cin >> x >> n >> m;
    set<int> a;
    set<int> b;
    rep(i, n) {
        int c;
        cin >> c;
        a.insert(c);
    }
    rep(i, m) {
        int c;
        cin >> c;
        b.insert(c);
    }
    if (a.count(x) && b.count(x)) cout << "MrMaxValu" << endl;
    else if (a.count(x)) cout << "MrMax" << endl;
    else if (b.count(x)) cout << "MaxValu" << endl;
    else cout << -1 << endl;
    return 0;
}
0