結果

問題 No.975 ミスターマックスバリュ
ユーザー waterwater
提出日時 2020-03-05 09:47:02
言語 C++14
(gcc 12.3.0 + boost 1.83.0)
結果
AC  
実行時間 19 ms / 2,000 ms
コード長 469 bytes
コンパイル時間 1,730 ms
コンパイル使用メモリ 164,380 KB
実行使用メモリ 6,948 KB
最終ジャッジ日時 2024-04-22 02:08:05
合計ジャッジ時間 2,181 ms
ジャッジサーバーID
(参考情報)
judge1 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
6,816 KB
testcase_01 AC 1 ms
6,940 KB
testcase_02 AC 2 ms
6,940 KB
testcase_03 AC 2 ms
6,944 KB
testcase_04 AC 2 ms
6,940 KB
testcase_05 AC 2 ms
6,940 KB
testcase_06 AC 2 ms
6,948 KB
testcase_07 AC 2 ms
6,944 KB
testcase_08 AC 19 ms
6,944 KB
testcase_09 AC 2 ms
6,940 KB
testcase_10 AC 2 ms
6,940 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
#define INF 990000000
//3
using namespace std;

long long int n,a,b;


int main() {
cin>>n>>a>>b;
int x[a];
int y[b];
for(int i=0;i<a;i++)cin>>x[i];
for(int i=0;i<b;i++)cin>>y[i];

int flag1=0;
int flag2=0;
if(count(x, x+a, n)>=1)flag1++;
if(count(y, y+b, n)>=1)flag2++;

if(flag1+flag2==0){
cout <<-1<<endl;
}else if(flag1+flag2==2){
cout <<"MrMaxValu"<<endl;
}else if(flag1==1){
cout <<"MrMax"<<endl;
}else{
cout <<"MaxValu"<<endl;

}






}
0