結果
| 問題 |
No.571 3人兄弟(その2)
|
| コンテスト | |
| ユーザー |
ohagi_1182
|
| 提出日時 | 2017-10-07 00:19:49 |
| 言語 | Java (openjdk 23) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 2,528 bytes |
| コンパイル時間 | 2,327 ms |
| コンパイル使用メモリ | 77,692 KB |
| 実行使用メモリ | 41,344 KB |
| 最終ジャッジ日時 | 2024-11-17 03:09:33 |
| 合計ジャッジ時間 | 4,672 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 WA * 1 |
| other | AC * 3 WA * 9 |
ソースコード
package yukicoder174;
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int h1 = sc.nextInt(),w1 = sc.nextInt();
int h2 = sc.nextInt(),w2 = sc.nextInt();
int h3 = sc.nextInt(),w3 = sc.nextInt();
if(h1 > h2) {
if(h2 > h3) {
System.out.println("A");
System.out.println("B");
System.out.println("C");
} else if(h2 == h3) {
if(w2 > w3) {
System.out.println("A");
System.out.println("C");
System.out.println("B");
} else {
System.out.println("A");
System.out.println("B");
System.out.println("C");
}
}
} else if(h1 > h3) {
if(h3 > h2) {
System.out.println("A");
System.out.println("C");
System.out.println("B");
} else if(h3 == h2) {
if(w3 > w2) {
System.out.println("A");
System.out.println("B");
System.out.println("C");
} else {
System.out.println("A");
System.out.println("C");
System.out.println("B");
}
}
} else if(h2 > h1) {
if(h1 > h3) {
System.out.println("B");
System.out.println("A");
System.out.println("C");
} else if(h1 == h3) {
if(w1 > w3) {
System.out.println("B");
System.out.println("C");
System.out.println("A");
} else {
System.out.println("B");
System.out.println("A");
System.out.println("C");
}
}
} else if(h2 > h3) {
if(h3 > h1) {
System.out.println("B");
System.out.println("C");
System.out.println("A");
} else if(h3 == h1) {
if(w3 > w1) {
System.out.println("B");
System.out.println("A");
System.out.println("C");
} else {
System.out.println("A");
System.out.println("C");
System.out.println("B");
}
}
} else if(h3 > h1) {
if(h1 > h2) {
System.out.println("C");
System.out.println("A");
System.out.println("B");
} else if(h1 == h2) {
if(w1 > w2) {
System.out.println("C");
System.out.println("B");
System.out.println("A");
} else {
System.out.println("C");
System.out.println("A");
System.out.println("B");
}
}
} else if(h3 > h2) {
if(h2 > h1) {
System.out.println("C");
System.out.println("B");
System.out.println("A");
} else if(h2 == h1) {
if(w2 > w1) {
System.out.println("C");
System.out.println("A");
System.out.println("B");
} else {
System.out.println("C");
System.out.println("B");
System.out.println("A");
}
}
}
}
}
ohagi_1182