結果

問題 No.975 ミスターマックスバリュ
ユーザー natoriusan
提出日時 2023-08-06 16:36:19
言語 C++17
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 18 ms / 2,000 ms
コード長 630 bytes
コンパイル時間 1,840 ms
コンパイル使用メモリ 194,864 KB
最終ジャッジ日時 2025-02-15 23:45:13
ジャッジサーバーID
(参考情報)
judge3 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 9
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>

using namespace std;
int main()
{
    int x, n, m;
    cin >> x >> n >> m;

    vector<int> a(n);
    vector<int> b(m);

    for (auto &i: a) {
        cin >> i;
    }

    for (auto &i: b) {
        cin >> i;
    }

    bool max = false;
    bool valu = false;
    if (find(a.begin(), a.end(), x) != a.end())
        max = true;
    if (find(b.begin(), b.end(), x) != b.end())
        valu = true;

    if (max && valu)
        cout << "MrMaxValu" << endl;
    else if (max)
        cout << "MrMax" << endl;
    else if (valu)
        cout << "MaxValu" << endl;
    else
        cout << "-1" << endl;
}
0