結果

問題 No.975 ミスターマックスバリュ
ユーザー tonegawatonegawa
提出日時 2020-02-01 00:06:31
言語 C++14
(gcc 12.3.0 + boost 1.83.0)
結果
AC  
実行時間 18 ms / 2,000 ms
コード長 1,044 bytes
コンパイル時間 2,463 ms
コンパイル使用メモリ 93,212 KB
実行使用メモリ 4,348 KB
最終ジャッジ日時 2023-10-17 13:59:49
合計ジャッジ時間 1,763 ms
ジャッジサーバーID
(参考情報)
judge14 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
4,348 KB
testcase_01 AC 1 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 18 ms
4,348 KB
testcase_09 AC 2 ms
4,348 KB
testcase_10 AC 2 ms
4,348 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>
#include <string>
#include <vector>
#include <deque>
#include <queue>
#include <algorithm>
#include <set>
#include <map>
#include <bitset>
#include <cmath>
#include <functional>
#include <iomanip>
#define vll vector<ll>
#define vvv vector<vvl>
#define vvi vector<vector<int> >
#define vvl vector<vector<ll> >
#define vv(a, b, c, d) vector<vector<d> >(a, vector<d>(b, c))
#define vvvl(a, b, c, d) vector<vvl>(a, vvl(b, vll (c, d)));
#define rep(c, a, b) for(ll c=a;c<b;c++)
#define re(c, b) for(ll c=0;c<b;c++)
#define all(obj) (obj).begin(), (obj).end()
typedef long long int ll;
typedef long double ld;
using namespace std;

int main(int argc, char const *argv[]) {
  ll t, x, n, m;std::cin >> x >> n >> m;
  bool a=false, b = false;
  re(i, n){
    std::cin >> t;
    if(t==x) a = true;
  }
  re(i, m){
    std::cin >> t;
    if(t==x) b = true;
  }
  if(a&&!b) std::cout << "MrMax" << '\n';
  if(a&&b) std::cout << "MrMaxValu" << '\n';
  if(!a&&b) std::cout << "MaxValu" << '\n';
  if(!a&&!b) std::cout << "-1" << '\n';
}
0