結果
| 問題 |
No.975 ミスターマックスバリュ
|
| ユーザー |
himo
|
| 提出日時 | 2020-03-08 19:59:12 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 18 ms / 2,000 ms |
| コード長 | 1,667 bytes |
| コンパイル時間 | 1,587 ms |
| コンパイル使用メモリ | 169,936 KB |
| 実行使用メモリ | 5,248 KB |
| 最終ジャッジ日時 | 2024-11-07 15:52:17 |
| 合計ジャッジ時間 | 2,292 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 9 |
ソースコード
#include<bits/stdc++.h>
using namespace std;
#define ll long long
ll mod =1000000007;
/*"itob" int to "N"base */ template<typename TypeInt> string itob(const TypeInt v, int base){static const char table[] = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ";string ret;static numeric_limits<TypeInt> t;TypeInt n = v;if (t.is_signed) {if (v < 0) n *= -1;}while (n >= base) {ret += table[n%base];n /= base;}ret += table[n];if (t.is_signed) {if (v < 0 && base == 10) ret += '-';}reverse(ret.begin(), ret.end());return ret;}
/*"chmin" a = MAX*/ template<class T> inline bool chmin(T& a, T b) { if (a > b) { a = b; return true; } return false; }
/*"chmax" a = MIN*/ template<class T> inline bool chmax(T& a, T b) { if (a < b) { a = b; return true; } return false; }
/*"ctoi" char to int*/ int ctoi(char c) {return c-'0';}
/*"gcd" MAX*/ int gcd(ll a,ll b){return b?gcd(b,a%b):a;}
/*"lcm" MIN*/ int lcm(ll a,ll b){return a*b/gcd(a,b);}
/*"primecheck"If prime,return true.*/bool primecheck(ll n){if(n < 2) return false;else{for(int i = 2; i * i <= n; i++){if(n % i == 0) return false;}return true;}}
string reverserange(string s,ll a,ll b){reverse(s.begin()+a-1,s.begin()+b); return s;}
int main(){
int x,n,m;
cin >> x >> n >> m;
vector<int>a(n),b(m);
for(int i=0;i<n;i++)cin >> a.at(i);
for(int i=0;i<m;i++)cin>>b.at(i);
if(count(a.begin(),a.end(),x)>=1&&count(b.begin(),b.end(),x)>=1){
cout<<"MrMaxValu"<<endl;
}
else if(count(a.begin(),a.end(),x)>=1){
cout<<"MrMax"<<endl;
}
else if(count(b.begin(),b.end(),x)>=1){
cout<<"MaxValu"<<endl;
}
else cout<<-1<<endl;
}
himo