結果

問題 No.571 3人兄弟(その2)
コンテスト
ユーザー fal_rnd
提出日時 2017-10-10 22:51:40
言語 Java
(openjdk 26.0.2.1 + ACL)
コンパイル:
javac -J-Duser.language=en -encoding UTF8 -cp /opt/aclib/ac_library.jar _filename_
実行:
java -ea -Xmx700m -Xss256M -DONLINE_JUDGE=true -cp .:/opt/aclib/ac_library.jar _class_
結果
AC  
実行時間 63 ms / 2,000 ms
+ 429µs
コード長 541 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 1,468 ms
コンパイル使用メモリ 90,236 KB
実行使用メモリ 46,064 KB
最終ジャッジ日時 2026-09-25 07:05:03
合計ジャッジ時間 3,687 ms
ジャッジサーバーID
(参考情報)
judge4_0 / judge1_0
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 12
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

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