結果

問題 No.975 ミスターマックスバリュ
ユーザー yuji9511yuji9511
提出日時 2020-01-31 21:22:06
言語 C++14
(gcc 12.3.0 + boost 1.83.0)
結果
AC  
実行時間 27 ms / 2,000 ms
コード長 923 bytes
コンパイル時間 1,732 ms
コンパイル使用メモリ 174,416 KB
実行使用メモリ 7,880 KB
最終ジャッジ日時 2023-10-17 08:31:33
合計ジャッジ時間 2,241 ms
ジャッジサーバーID
(参考情報)
judge11 / judge14
このコードへのチャレンジ(β)

テストケース

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

ソースコード

diff #

/*** author: yuji9511 ***/
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using lpair = pair<ll, ll>;
const ll MOD = 1e9+7;
const ll INF = 1e18;
#define rep(i,m,n) for(ll i=(m);i<(n);i++)
#define rrep(i,m,n) for(ll i=(m);i>=(n);i--)
#define printa(x,n) for(ll i=0;i<n;i++){cout<<(x[i])<<" \n"[i==n-1];};
void print() {}
template <class H,class... T>
void print(H&& h, T&&... t){cout<<h<<" \n"[sizeof...(t)==0];print(forward<T>(t)...);}

int main(){
    cin.tie(0);
    ios::sync_with_stdio(false);
    ll X,N,M;
    cin >> X >> N >> M;
    ll A[100010], B[100010];
    rep(i,0,N) cin >> A[i];
    rep(i,0,M) cin >> B[i];
    map<ll,ll> ma,mb;
    rep(i,0,N) ma[A[i]]++;
    rep(i,0,M) mb[B[i]]++;
    if(ma[X] > 0 && mb[X] > 0){
        print("MrMaxValu");
    }else if(ma[X] > 0){
        print("MrMax");
    }else if(mb[X] > 0){
        print("MaxValu");
    }else{
        print("-1");
    }
    

}
0