問題一覧 > 通常問題

No.975 Mister Max Valu

レベル : / AI推定難易度 : 115 / 実行時間制限 : 1ケース 2.000秒 / メモリ制限 : 512 MB / 標準ジャッジ問題
タグ : (AC するまで非表示) / 解いたユーザー数 510
作問者 : Apoi / テスター : りあん
お気に入りにしたユーザー ProblemId : 3212 / 自分の提出
問題文最終更新日: 2020-01-31 21:41:02
This statement was translated by AI (claude-opus-5-5, effort medium) and may contain errors or differ in nuance from the original. The original statement takes precedence. Back to the original
yukicoder contest 235 (順位表) の他の問題:

Problem Statement

In the country where Apoi lives, the state manages products by assigning the same number to identical products.

Now, this country has two kinds of stores, Mister Max and MaxValu, but Apoi cannot tell the difference between Mister Max and MaxValu.

The item $X$ that Apoi wants and the lists of products sold at Mister Max and MaxValu are given as described below.

If the item Apoi wants is available only at Mister Max, output "MrMax"; if it is available only at MaxValu, output "MaxValu".

Otherwise, if it is available at both, output "MrMaxValu", and if it is available at neither, output "-1".

Input

$X$ $N$ $M$
$A_1\ A_2\ \dots\ A_N$
$B_1\ B_2\ \dots\ B_M$

The first line contains the number $X$ of the product Apoi wants, the number $N$ of products sold at Mister Max, and the number $M$ of products sold at MaxValu, separated by single-byte spaces.

The second line contains the list of the numbers of the $N$ products sold at Mister Max, separated by single-byte spaces. The $A_i$ are pairwise distinct.

The third line contains the list of the numbers of the $M$ products sold at MaxValu, separated by single-byte spaces. The $B_i$ are pairwise distinct.

$1\le X,N,M,A_i,B_j \le 10^5 \ (1 \le i \le N, 1 \le j \le M)$

Disclaimer

This problem has no connection whatsoever with either Mister Max or MaxValu.

Output

If the item Apoi wants is available only at Mister Max, output "MrMax"; if it is available only at MaxValu, output "MaxValu".

Otherwise, if it is available at both, output "MrMaxValu", and if it is available at neither, output "-1".

Print a newline at the end.

Sample

Sample 1
Input
114 5 8
1 3 4 9 12
2 3 11 18 114 514 364 1919
Output
MaxValu

Product 114 is on MaxValu's product list, so output "MaxValu".

Sample 2
Input
2525 1 1
2525
2525
Output
MrMaxValu

Both are specialty stores for product 2525, so output "MrMaxValu".

提出するには、Twitter 、GitHub、 Googleもしくは右上の雲マークをクリックしてアカウントを作成してください。