結果

問題 No.975 ミスターマックスバリュ
ユーザー nejinejinejineji
提出日時 2020-01-31 21:31:01
言語 C++14
(gcc 13.2.0 + boost 1.83.0)
結果
AC  
実行時間 19 ms / 2,000 ms
コード長 1,137 bytes
コンパイル時間 1,644 ms
コンパイル使用メモリ 167,268 KB
実行使用メモリ 4,348 KB
最終ジャッジ日時 2023-10-17 08:46:29
合計ジャッジ時間 2,189 ms
ジャッジサーバーID
(参考情報)
judge15 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

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

ソースコード

diff #

#include <bits/stdc++.h>
#define REP(i, x, y) for (ll i = x; i <= y; i++)
#define BIT(t) (1ll << t)
#define PER(i, y, x) for (ll i = y; i >= x; i--)
#define vll vector<ll>
#define vvll vector<vector<ll>>
#define pll pair<ll, ll>
#define SIZE(v) ll(v.size())
#define UNIQUE(v) v.erase(unique(v.begin(), v.end()), v.end());
using namespace std;
typedef long long ll;
//        ios::sync_with_stdio(false);
//        cin.tie(nullptr);

int main(){
        ll x,n,m;
        cin >> x >> n >> m;
        bool flag1 = 0;
        bool flag2 = 0;
        REP(i,1,n){
                ll t;
                cin >> t;
                if(t == x){
                        flag1 = 1;
                }
        }
        REP(i,1,m){
                ll t;
                cin >> t;
                if(t == x){
                        flag2 = 1;
                }
        }
        string ans;
        if(flag1 && flag2){
                ans = "MrMaxValu";
        }else if(flag1){
                ans = "MrMax";
        }else if(flag2){
                ans = "MaxValu";
        }else{
                ans = "-1";
        }
        cout << ans << endl;
}
0