結果

問題 No.975 ミスターマックスバリュ
ユーザー chacoder1chacoder1
提出日時 2020-01-31 21:30:42
言語 C++14
(gcc 12.3.0 + boost 1.83.0)
結果
AC  
実行時間 18 ms / 2,000 ms
コード長 647 bytes
コンパイル時間 1,585 ms
コンパイル使用メモリ 167,196 KB
実行使用メモリ 4,348 KB
最終ジャッジ日時 2023-10-17 08:46:19
合計ジャッジ時間 2,268 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 3 ms
4,348 KB
testcase_07 AC 2 ms
4,348 KB
testcase_08 AC 18 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;

int main(){
  int X,N,M;
  cin>>X>>N>>M;
  int n[N];
  int m[M];
  int flaga=0;
  int flagb=0;
  for(int i=0;i<N;i++){
    cin>>n[i];
    if(n[i]==X){
      flaga=1;
      break;
  }
  }
  for(int j=0;j<M;j++){
    cin>>m[j];
    if(m[j]==X){
      flagb=1;
      break;
    }
  }
  if((flaga==0)&&(flagb==0)){
    cout<<-1<<endl;
    return 0;
  }
    
  if((flaga==1)&&(flagb==0)){
    cout<<"MrMax"<<endl;
    return 0;
  }
    
  if((flaga==0)&&(flagb==1)){
    cout<<"MaxValu"<<endl;
    return 0;
  }
  if((flaga==1)&&(flagb==1)){
    cout<<"MrMaxValu"<<endl;
    return 0;
  }
    return 0;
}
0