結果
問題 |
No.975 ミスターマックスバリュ
|
ユーザー |
![]() |
提出日時 | 2020-01-31 21:46:13 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 894 bytes |
コンパイル時間 | 1,542 ms |
コンパイル使用メモリ | 167,724 KB |
実行使用メモリ | 5,376 KB |
最終ジャッジ日時 | 2024-09-17 07:34:44 |
合計ジャッジ時間 | 1,832 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 1 WA * 1 |
other | AC * 1 WA * 8 |
ソースコード
#include<bits/stdc++.h> using namespace std; typedef long long ll; template<class T> inline bool chmin(T& a, T b) {if (a > b) {a = b;return true;}return false;} template<class T> inline bool chmax(T& a, T b) {if (a < b) {a = b;return true;}return false;} //自作関数 template<class T> ll llpow(T x,T n){ll ans=1;while(n--){ans*=x;}return ans;} #define rep(i,n) for(ll i=0;i<(ll)n;i++) #define rep2(i, begin_i, end_i) for (ll i = (ll)begin_i; i < (ll)end_i; i++) long long INF = 1LL<<60; int n; int main(){ int x,m; cin>>x>>n>>m; vector<int> a(n),b(m); rep(i,n)cin>>a[i]; rep(i,m)cin>>b[i]; bool mr,max; rep(i,n)if(a[i]==x){ mr=true; } rep(i,m)if(b[i]==x){ max=true; } if(!mr&&!max)cout<<-1<<endl; else if(mr&&max)cout<<"MrMaxValu"<<endl; else if(mr)cout<<"MrMax"<<endl; else cout<<"MaxValu"<<endl; return 0; }