結果
問題 | No.975 ミスターマックスバリュ |
ユーザー |
|
提出日時 | 2020-07-13 19:24:27 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 18 ms / 2,000 ms |
コード長 | 606 bytes |
コンパイル時間 | 584 ms |
コンパイル使用メモリ | 68,352 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-11-07 23:44:53 |
合計ジャッジ時間 | 1,296 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 9 |
ソースコード
#include <iostream> #include <vector> #include <algorithm> #include <string> using namespace std; int main() { int X, N, M; cin >> X >> N >> M; int flg = 0; int temp = 0; for (int i = 0; i < N; i++) { cin >> temp; if (temp == X) { flg = 1; } } for (int i = 0; i < M; i++) { cin >> temp; if (temp == X) { if (flg == 0) { flg = 2; } else { flg = 3; } } } if (flg == 1) { cout << "MrMax" << endl; } else if (flg == 2) { cout << "MaxValu" << endl; } else if (flg == 3) { cout << "MrMaxValu" << endl; } else { cout << -1 << endl; } return 0; }