結果
問題 |
No.975 ミスターマックスバリュ
|
ユーザー |
![]() |
提出日時 | 2020-01-31 21:30:10 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 665 bytes |
コンパイル時間 | 549 ms |
コンパイル使用メモリ | 69,820 KB |
実行使用メモリ | 6,944 KB |
最終ジャッジ日時 | 2024-09-17 07:14:08 |
合計ジャッジ時間 | 1,124 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 1 WA * 1 |
other | AC * 8 WA * 1 |
ソースコード
#include <iostream> #include <vector> using namespace std; int main() { int x, n, m; cin >> x >> n >> m; vector<int> a(n), b(m); bool f = true; for (int i=0; i<n; i++) { int a; cin >> a; if (a == x) { if (f) { cout << "Mr"; f = false; } cout << "Max"; } } for (int i=0; i<m; i++) { int b; cin >> b; if (b == x) { if (f) { cout << "Mr"; f = false; } cout << "Valu"; } } if (f) cout << "-1"; cout << endl; }