結果

問題 No.975 ミスターマックスバリュ
ユーザー musuchikamusuchika
提出日時 2020-01-31 21:54:52
言語 C++14
(gcc 13.2.0 + boost 1.83.0)
結果
AC  
実行時間 16 ms / 2,000 ms
コード長 875 bytes
コンパイル時間 1,704 ms
コンパイル使用メモリ 169,140 KB
実行使用メモリ 4,348 KB
最終ジャッジ日時 2023-10-17 09:34:11
合計ジャッジ時間 2,178 ms
ジャッジサーバーID
(参考情報)
judge11 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
4,348 KB
testcase_01 AC 1 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 2 ms
4,348 KB
testcase_07 AC 3 ms
4,348 KB
testcase_08 AC 16 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>
using namespace std;
typedef  long long ll;
template<class T> inline bool chmin(T& a, T b) {if (a > b) {a = b;return true;}return false;}
template<class T> inline bool chmax(T& a, T b) {if (a < b) {a = b;return true;}return false;}
//自作関数
template<class T> ll llpow(T x,T n){ll ans=1;while(n--){ans*=x;}return ans;}

#define rep(i,n) for(ll i=0;i<(ll)n;i++)
#define rep2(i, begin_i, end_i) for (ll i = (ll)begin_i; i < (ll)end_i; i++)

long long INF = 1LL<<60;
int n;
int main(){
    int x,m;
    cin>>x>>n>>m;
    vector<int> a(n),b(m);
    rep(i,n)cin>>a[i];
    rep(i,m)cin>>b[i];
    bool mr=false,max=false;
    rep(i,n)if(a[i]==x)mr=true;
    rep(i,m)if(b[i]==x)max=true;

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


0