結果

問題 No.975 ミスターマックスバリュ
ユーザー betrue12
提出日時 2020-01-31 21:23:25
言語 C++17
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 21 ms / 2,000 ms
コード長 510 bytes
コンパイル時間 1,932 ms
コンパイル使用メモリ 193,792 KB
最終ジャッジ日時 2025-01-08 20:47:37
ジャッジサーバーID
(参考情報)
judge5 / 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;
    bool ok1 = false, ok2 = false;
    while(N--){
        int a;
        cin >> a;
        if(a == X) ok1 = true;
    }
    while(M--){
        int a;
        cin >> a;
        if(a == X) ok2 = true;
    }
    string ans = "-1";
    if(ok1 && ok2){
        ans = "MrMaxValu";
    }else if(ok1){
        ans = "MrMax";
    }else if(ok2){
        ans = "MaxValu";
    }
    cout << ans << endl;
    return 0;
}
0