結果

問題 No.975 ミスターマックスバリュ
ユーザー LV3zJigVW57oPGyLV3zJigVW57oPGy
提出日時 2022-11-15 22:06:27
言語 C++11
(gcc 11.4.0)
結果
RE  
実行時間 -
コード長 728 bytes
コンパイル時間 5,176 ms
コンパイル使用メモリ 144,644 KB
実行使用メモリ 4,352 KB
最終ジャッジ日時 2023-10-15 03:18:11
合計ジャッジ時間 4,322 ms
ジャッジサーバーID
(参考情報)
judge13 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

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

ソースコード

diff #

#include <bits/stdc++.h> 
using namespace std;
#include <stdio.h>
#include <iomanip>
#include <iostream>
#include <string>
#include <algorithm>

int main(){
  int number, a, b;
  int count1 = 0;
  int count2 = 0;
  cin >> number >> a >> b;
  vector<int> vecMr(a);
  vector<int> vecMax(b);
  for(int i=0;i<a;i++){
    cin >> vecMr.at(i);
    if(vecMr.at(i)==number){
      count1++;
      break;
    }
  }
  for(int i=0;i<a;i++){
    cin >> vecMax.at(i);
    if(vecMax.at(i)==number){
      count2++;
      break;
    }
  }
  if(count1==0&&count2==0){
    cout << -1;
  }
  else if(count1==1&&count2==0){
    cout << "MrMax";
  }
  else if(count1==0&&count2==1){
    cout << "MaxValu";
  }
  else{
    cout << "MrMaxValu";
  }

}
0