結果
| 問題 | No.975 ミスターマックスバリュ |
| コンテスト | |
| ユーザー |
37zigen
|
| 提出日時 | 2020-01-31 21:37:37 |
| 言語 | Java (openjdk 26.0.2.1 + ACL) |
| 結果 |
AC
不安定
|
| 実行時間 | 327 ms / 2,000 ms |
| + 636µs | |
| コード長 | 980 bytes |
| 記録 | |
| コンパイル時間 | 1,879 ms |
| コンパイル使用メモリ | 85,684 KB |
| 実行使用メモリ | 53,200 KB |
| 最終ジャッジ日時 | 2026-08-29 09:35:23 |
| 合計ジャッジ時間 | 4,145 ms |
|
ジャッジサーバーID (参考情報) |
judge3_0 / judge2_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 9 |
ソースコード
import java.util.*;
import java.io.*;
// This file is a "Hello, world!" in Java language by OpenJDK for wandbox.
class Main
{
public static void main(String[] args)
{
new Main().run();
}
void run(){
Scanner sc=new Scanner(System.in);
HashSet<Integer> m1=new HashSet<>();
HashSet<Integer> m2=new HashSet<>();
int X=sc.nextInt();
int N=sc.nextInt();
int M=sc.nextInt();
for(int i=0;i<N;++i)m1.add(sc.nextInt());
for(int i=0;i<M;++i)m2.add(sc.nextInt());
if(m1.contains(X)&&m2.contains(X)){
System.out.println("MrMaxValu");
}else if(!m1.contains(X)&&!m2.contains(X)){
System.out.println(-1);
}else if(m1.contains(X)){
System.out.println("MrMax");
}else if(m2.contains(X)){
System.out.println("MaxValu");
}else{
throw new AssertionError();
}
}
void tr(Object...o){System.out.println(Arrays.deepToString(o));}
}
// OpenJDK reference:
// http://openjdk.java.net/
// Java language references:
// http://docs.oracle.com/javase
37zigen