結果

問題 No.975 ミスターマックスバリュ
ユーザー fal_rndfal_rnd
提出日時 2020-02-04 00:18:36
言語 Java21
(openjdk 21)
結果
AC  
実行時間 405 ms / 2,000 ms
コード長 388 bytes
コンパイル時間 2,553 ms
コンパイル使用メモリ 87,952 KB
実行使用メモリ 62,284 KB
最終ジャッジ日時 2023-10-19 15:52:41
合計ジャッジ時間 5,365 ms
ジャッジサーバーID
(参考情報)
judge13 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 144 ms
57,136 KB
testcase_01 AC 147 ms
57,068 KB
testcase_02 AC 149 ms
57,092 KB
testcase_03 AC 146 ms
57,764 KB
testcase_04 AC 151 ms
57,588 KB
testcase_05 AC 195 ms
57,984 KB
testcase_06 AC 199 ms
58,268 KB
testcase_07 AC 206 ms
58,164 KB
testcase_08 AC 405 ms
62,284 KB
testcase_09 AC 143 ms
57,496 KB
testcase_10 AC 141 ms
57,728 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;

class Main{
	public static void main(String[] $){
		var s=new Scanner(System.in);
		int t=s.nextInt(),n=s.nextInt();
		s.next();

		var a=s.tokens().limit(n).mapToInt(Integer::parseInt).anyMatch(i->i==t)?1:0;
		var b=s.tokens().mapToInt(Integer::parseInt).anyMatch(i->i==t)?2:0;

		String[] q= {"-1","MrMax","MaxValu","MrMaxValu"};
		System.out.println(q[a+b]);
	}
}
0