結果

問題 No.975 ミスターマックスバリュ
ユーザー RubikunRubikun
提出日時 2020-01-31 21:21:40
言語 C++14
(gcc 12.3.0 + boost 1.83.0)
結果
AC  
実行時間 7 ms / 2,000 ms
コード長 653 bytes
コンパイル時間 1,529 ms
コンパイル使用メモリ 166,992 KB
実行使用メモリ 4,348 KB
最終ジャッジ日時 2023-10-17 08:30:32
合計ジャッジ時間 2,113 ms
ジャッジサーバーID
(参考情報)
judge13 / judge11
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
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 2 ms
4,348 KB
testcase_06 AC 2 ms
4,348 KB
testcase_07 AC 2 ms
4,348 KB
testcase_08 AC 7 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;
#define all(x) (x).begin(),(x).end()
const int mod=1000000007,MAX=200005,INF=1<<30;

int main(){
    
    std::ifstream in("text.txt");
    std::cin.rdbuf(in.rdbuf());
    cin.tie(0);
    ios::sync_with_stdio(false);
    
    int X,A,B;cin>>X>>A>>B;
    int cnt=0;
    
    for(int i=0;i<A;i++){
        int a;cin>>a;
        if(a==X) cnt++;
    }
    
    for(int i=0;i<B;i++){
        int a;cin>>a;
        if(a==X) cnt+=2;
    }
    
    if(cnt==0) cout<<-1<<endl;
    if(cnt==1) cout<<"MrMax"<<endl;
    if(cnt==2) cout<<"MaxValu"<<endl;
    if(cnt==3) cout<<"MrMaxValu"<<endl;
}

0