結果
| 問題 | No.1395 Less Sweet Alchemy |
| コンテスト | |
| ユーザー |
ks2m
|
| 提出日時 | 2021-02-14 21:22:14 |
| 言語 | Java (openjdk 26.0.2.1) |
| 結果 |
AC
|
| 実行時間 | 60 ms / 2,000 ms |
| + 792µs | |
| コード長 | 529 bytes |
| 記録 | |
| コンパイル時間 | 2,376 ms |
| コンパイル使用メモリ | 83,944 KB |
| 実行使用メモリ | 43,500 KB |
| 最終ジャッジ日時 | 2026-08-23 04:24:12 |
| 合計ジャッジ時間 | 4,471 ms |
|
ジャッジサーバーID (参考情報) |
judge3_0 / judge2_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 12 |
ソースコード
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