結果
問題 |
No.975 ミスターマックスバリュ
|
ユーザー |
![]() |
提出日時 | 2020-03-05 09:47:02 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 19 ms / 2,000 ms |
コード長 | 469 bytes |
コンパイル時間 | 1,452 ms |
コンパイル使用メモリ | 166,920 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-10-14 00:48:16 |
合計ジャッジ時間 | 2,041 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 9 |
ソースコード
#include <bits/stdc++.h> #define INF 990000000 //3 using namespace std; long long int n,a,b; int main() { cin>>n>>a>>b; int x[a]; int y[b]; for(int i=0;i<a;i++)cin>>x[i]; for(int i=0;i<b;i++)cin>>y[i]; int flag1=0; int flag2=0; if(count(x, x+a, n)>=1)flag1++; if(count(y, y+b, n)>=1)flag2++; if(flag1+flag2==0){ cout <<-1<<endl; }else if(flag1+flag2==2){ cout <<"MrMaxValu"<<endl; }else if(flag1==1){ cout <<"MrMax"<<endl; }else{ cout <<"MaxValu"<<endl; } }