結果
問題 | No.975 ミスターマックスバリュ |
ユーザー |
![]() |
提出日時 | 2020-01-31 21:21:40 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 7 ms / 2,000 ms |
コード長 | 653 bytes |
コンパイル時間 | 1,522 ms |
コンパイル使用メモリ | 166,636 KB |
実行使用メモリ | 6,948 KB |
最終ジャッジ日時 | 2024-09-17 06:59:34 |
合計ジャッジ時間 | 2,093 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge6 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 9 |
ソースコード
#include <bits/stdc++.h> using namespace std; typedef long long ll; #define all(x) (x).begin(),(x).end() const int mod=1000000007,MAX=200005,INF=1<<30; int main(){ std::ifstream in("text.txt"); std::cin.rdbuf(in.rdbuf()); cin.tie(0); ios::sync_with_stdio(false); int X,A,B;cin>>X>>A>>B; int cnt=0; for(int i=0;i<A;i++){ int a;cin>>a; if(a==X) cnt++; } for(int i=0;i<B;i++){ int a;cin>>a; if(a==X) cnt+=2; } if(cnt==0) cout<<-1<<endl; if(cnt==1) cout<<"MrMax"<<endl; if(cnt==2) cout<<"MaxValu"<<endl; if(cnt==3) cout<<"MrMaxValu"<<endl; }