結果

問題 No.975 ミスターマックスバリュ
ユーザー KKT89KKT89
提出日時 2020-01-31 21:24:42
言語 C++17
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 9 ms / 2,000 ms
コード長 575 bytes
コンパイル時間 1,259 ms
コンパイル使用メモリ 95,388 KB
最終ジャッジ日時 2025-01-08 20:48:26
ジャッジサーバーID
(参考情報)
judge2 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 9
権限があれば一括ダウンロードができます

ソースコード

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