結果
| 問題 |
No.564 背の順
|
| コンテスト | |
| ユーザー |
sudo_yum
|
| 提出日時 | 2018-05-25 16:11:43 |
| 言語 | Java (openjdk 23) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 576 bytes |
| コンパイル時間 | 2,080 ms |
| コンパイル使用メモリ | 75,520 KB |
| 実行使用メモリ | 41,912 KB |
| 最終ジャッジ日時 | 2024-06-28 18:00:32 |
| 合計ジャッジ時間 | 3,852 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 WA * 2 |
| other | AC * 2 WA * 7 |
ソースコード
import java.util.*;
public class Main{
static StringBuilder sb = new StringBuilder("");
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int H1 =sc.nextInt();
int N =sc.nextInt();
int n = (N-1);
int[] H = new int[N];
for (int i=0;i<n ;i++ ) {
H[i] = sc.nextInt();
}
Arrays.sort(H);
if (H1>H[0]) {
System.out.println("1st");
}else if(H1>H[1]){
System.out.println("2nd");
}else if (H1>H[2]) {
System.out.println("3rd");
}else{
System.out.println("4th");
}
}
}
sudo_yum