結果
| 問題 |
No.975 ミスターマックスバリュ
|
| ユーザー |
|
| 提出日時 | 2020-01-31 21:38:02 |
| 言語 | C++17(clang) (17.0.6 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 6 ms / 2,000 ms |
| コード長 | 661 bytes |
| コンパイル時間 | 566 ms |
| コンパイル使用メモリ | 120,320 KB |
| 実行使用メモリ | 5,248 KB |
| 最終ジャッジ日時 | 2024-11-30 16:17:42 |
| 合計ジャッジ時間 | 1,063 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 9 |
ソースコード
#include <iostream>
void solve() {
int x, n, m;
std::cin >> x >> n >> m;
int ans = 0;
while (n--) {
int a;
std::cin >> a;
if (x == a) ans |= 1;
}
while (m--) {
int b;
std::cin >> b;
if (x == b) ans |= 2;
}
std::cout << (ans == 0 ? "-1"
: ans == 1 ? "MrMax"
: ans == 2 ? "MaxValu"
: "MrMaxValu")
<< std::endl;
}
int main() {
std::cin.tie(nullptr);
std::cout.tie(nullptr);
std::ios::sync_with_stdio(false);
solve();
return 0;
}