結果

問題 No.975 ミスターマックスバリュ
ユーザー shop_oneshop_one
提出日時 2020-01-31 21:22:41
言語 C++11
(gcc 11.4.0)
結果
AC  
実行時間 7 ms / 2,000 ms
コード長 705 bytes
コンパイル時間 2,063 ms
コンパイル使用メモリ 83,572 KB
実行使用メモリ 4,348 KB
最終ジャッジ日時 2023-10-17 08:32:17
合計ジャッジ時間 1,606 ms
ジャッジサーバーID
(参考情報)
judge11 / 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 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 1 ms
4,348 KB
testcase_10 AC 1 ms
4,348 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

// I SELL YOU...! 
#include<iostream>
#include<vector>
#include<algorithm>
#include<functional>
#include<queue>
#include<chrono>
#include<iomanip>
#include<map>
#include<set>
using namespace std;
using ll = long long;
using P = pair<ll,ll>;
void init_io(){
  cin.tie(0);
  ios::sync_with_stdio(false);
  cout << setprecision(10);
}
signed main(){
  init_io();
  ll x,n,m;
  cin >> x >> n >> m;
  bool t=false,u=false;
  vector<ll> a(n),b(m);
  for(int i=0;i<n;i++){
    cin >> a[i];
    if(a[i]==x) t = true;
  }
  for(int i=0;i<m;i++){
    cin >> b[i];
    if(b[i]==x) u = true;
  }
  if(t&&u) cout <<"MrMaxValu\n";
  else if(t) cout <<"MrMax\n";
  else if(u) cout <<"MaxValu\n";
  else cout <<"-1\n";
}
0