結果
| 問題 | No.1395 Less Sweet Alchemy |
| コンテスト | |
| ユーザー |
ks2m
|
| 提出日時 | 2021-02-14 21:22:14 |
| 言語 | Java (openjdk 27.0.1.0.3 + ACL) |
| 結果 |
AC
不安定
|
| 実行時間 | 141 ms / 2,000 ms |
| + 80µs | |
| コード長 | 529 bytes |
| 記録 | |
| コンパイル時間 | 1,734 ms |
| コンパイル使用メモリ | 95,700 KB |
| 実行使用メモリ | 48,408 KB |
| 最終ジャッジ日時 | 2026-11-07 19:41:57 |
| 合計ジャッジ時間 | 5,136 ms |
|
ジャッジサーバーID (参考情報) |
judge4_0 / judge2_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 11 |
ソースコード
import java.util.Scanner;
public class Main {
public static void main(String[] args) throws Exception {
Scanner sc = new Scanner(System.in);
int n = sc.nextInt();
int x = sc.nextInt();
int[] c = new int[n];
for (int i = 0; i < n; i++) {
c[i] = sc.nextInt();
}
sc.close();
int min = 100;
int max = 0;
for (int i = 0; i < n; i++) {
min = Math.min(min, c[i]);
max = Math.max(max, c[i]);
}
if (min <= x && x <= max) {
System.out.println("Yes");
} else {
System.out.println("No");
}
}
}
ks2m