結果

問題 No.975 ミスターマックスバリュ
ユーザー KKT89KKT89
提出日時 2020-01-31 21:24:42
言語 C++17
(gcc 13.2.0 + boost 1.83.0)
結果
AC  
実行時間 7 ms / 2,000 ms
コード長 575 bytes
コンパイル時間 955 ms
コンパイル使用メモリ 99,088 KB
実行使用メモリ 4,348 KB
最終ジャッジ日時 2023-10-17 08:36:09
合計ジャッジ時間 1,530 ms
ジャッジサーバーID
(参考情報)
judge13 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

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

ソースコード

diff #

#include <iostream>
#include <vector>
#include <algorithm>
#include <math.h>
#include <set>
#include <map>
using namespace std;
typedef long long int ll;

int main(){
	cin.tie(nullptr);
	ios::sync_with_stdio(false);
	int x,n,m; cin >> x >> n >> m;
	vector<int> a(n),b(m);
	bool bb=0,c=0;
	for(int i=0;i<n;i++){
		cin >> a[i];
		if(a[i]==x)bb=1;
	}
	for(int i=0;i<m;i++){
		cin >> b[i];
		if(b[i]==x)c=1;
	}
	if(bb&&c){
		cout << "MrMaxValu" << endl;
	}
	else if(bb){
		cout << "MrMax" << endl;
	}
	else if(c){
		cout << "MaxValu" << endl;
	}
	else{
		cout << -1 << endl;
	}
}
0