結果
問題 | No.975 ミスターマックスバリュ |
ユーザー |
![]() |
提出日時 | 2020-03-30 13:23:09 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 36 ms / 2,000 ms |
コード長 | 487 bytes |
コンパイル時間 | 1,828 ms |
コンパイル使用メモリ | 171,340 KB |
実行使用メモリ | 6,272 KB |
最終ジャッジ日時 | 2024-06-11 20:57:48 |
合計ジャッジ時間 | 2,708 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 9 |
ソースコード
#include <bits/stdc++.h> using namespace std; int main() { int x, n, m, e; cin >> x >> n >> m; set<int> a, b; for (int i = 0; i < n; i++) { cin >> e; a.emplace(e); } for (int i = 0; i < m; i++) { cin >> e; b.emplace(e); } string ans = "-1"; if (a.count(x) and b.count(x)) ans = "MrMaxValu"; else if (a.count(x)) ans = "MrMax"; else if (b.count(x)) ans = "MaxValu"; cout << ans << endl; return 0; }