結果
問題 | No.571 3人兄弟(その2) |
ユーザー | Hiroaki Kono |
提出日時 | 2017-10-29 09:39:19 |
言語 | Java21 (openjdk 21) |
結果 |
WA
|
実行時間 | - |
コード長 | 774 bytes |
コンパイル時間 | 3,774 ms |
コンパイル使用メモリ | 80,948 KB |
実行使用メモリ | 54,348 KB |
最終ジャッジ日時 | 2024-05-01 22:02:19 |
合計ジャッジ時間 | 6,630 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge1 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 123 ms
52,916 KB |
testcase_01 | AC | 138 ms
54,140 KB |
testcase_02 | AC | 136 ms
54,140 KB |
testcase_03 | WA | - |
testcase_04 | WA | - |
testcase_05 | AC | 135 ms
54,152 KB |
testcase_06 | AC | 141 ms
54,168 KB |
testcase_07 | AC | 139 ms
54,188 KB |
testcase_08 | WA | - |
testcase_09 | AC | 138 ms
54,324 KB |
testcase_10 | AC | 140 ms
54,348 KB |
testcase_11 | AC | 124 ms
53,080 KB |
testcase_12 | WA | - |
testcase_13 | AC | 122 ms
53,116 KB |
ソースコード
import java.util.LinkedHashMap; import java.util.Map; import java.util.Scanner; public class No571 { public static void main(String[] args) { Scanner s = new Scanner(System.in); LinkedHashMap<String, Integer[]> map = new LinkedHashMap<>(); map.put("A", new Integer[]{s.nextInt(), s.nextInt()}); map.put("B", new Integer[]{s.nextInt(), s.nextInt()}); map.put("C", new Integer[]{s.nextInt(), s.nextInt()}); map.entrySet().stream() .sorted(Map.Entry.comparingByValue((o1, o2) -> { if (o1[0] < o2[0] || o1[0] == o2[0] && o1[1] < o2[1]) { return 1; } return -1; })) .forEach(e -> System.out.println(e.getKey())); } }