結果

問題 No.571 3人兄弟(その2)
ユーザー fal_rndfal_rnd
提出日時 2017-10-10 22:51:40
言語 Java21
(openjdk 21)
結果
AC  
実行時間 159 ms / 2,000 ms
コード長 541 bytes
コンパイル時間 2,475 ms
コンパイル使用メモリ 79,528 KB
実行使用メモリ 54,564 KB
最終ジャッジ日時 2024-04-28 15:29:45
合計ジャッジ時間 5,261 ms
ジャッジサーバーID
(参考情報)
judge5 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 145 ms
54,252 KB
testcase_01 AC 146 ms
54,128 KB
testcase_02 AC 146 ms
53,656 KB
testcase_03 AC 145 ms
54,472 KB
testcase_04 AC 149 ms
54,564 KB
testcase_05 AC 147 ms
54,352 KB
testcase_06 AC 145 ms
53,956 KB
testcase_07 AC 145 ms
54,472 KB
testcase_08 AC 143 ms
54,176 KB
testcase_09 AC 144 ms
54,260 KB
testcase_10 AC 144 ms
54,132 KB
testcase_11 AC 146 ms
54,332 KB
testcase_12 AC 149 ms
54,180 KB
testcase_13 AC 159 ms
54,204 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Comparator;
import java.util.Scanner;
import java.util.stream.Stream;

public class Main{
	static Scanner s=new Scanner(System.in);
	static int getInt(){return Integer.parseInt(s.next());}

	public static void main(String[] $){
		int[]h=new int[3];
		int[]w=new int[3];
		h[0]=getInt();
		w[0]=getInt();
		h[1]=getInt();
		w[1]=getInt();
		h[2]=getInt();
		w[2]=getInt();
		Stream.of('A','B','C')
		.sorted(Comparator.<Character>comparingInt(o->-h[o-'A']).thenComparingInt(o->w[o-'A']))
		.forEach(System.out::println);
	}
}
0