結果

問題 No.1395 Less Sweet Alchemy
ユーザー 👑 箱
提出日時 2021-10-04 23:04:03
言語 Kotlin
(1.9.23)
結果
AC  
実行時間 305 ms / 2,000 ms
コード長 695 bytes
コンパイル時間 15,081 ms
コンパイル使用メモリ 415,100 KB
実行使用メモリ 53,852 KB
最終ジャッジ日時 2023-09-30 05:44:24
合計ジャッジ時間 21,278 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 301 ms
53,596 KB
testcase_01 AC 298 ms
53,804 KB
testcase_02 AC 299 ms
53,724 KB
testcase_03 AC 300 ms
53,584 KB
testcase_04 AC 301 ms
53,800 KB
testcase_05 AC 302 ms
53,644 KB
testcase_06 AC 301 ms
53,636 KB
testcase_07 AC 304 ms
53,852 KB
testcase_08 AC 303 ms
53,712 KB
testcase_09 AC 300 ms
53,704 KB
testcase_10 AC 302 ms
53,760 KB
testcase_11 AC 305 ms
53,636 KB
testcase_12 AC 300 ms
53,664 KB
testcase_13 AC 302 ms
53,780 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.io.PrintWriter
import java.util.*

fun PrintWriter.solve() {
    val n = nextInt()
    val x = nextInt()
    val c = Array(n) { nextInt() }
    println(if (x in c.minOrNull()!!..c.maxOrNull()!!) "Yes" else "No")
}

fun main() {
    val writer = PrintWriter(System.out, false)
    writer.solve()
    writer.flush()
}

// region Scanner
private var st = StringTokenizer("")
private val br = System.`in`.bufferedReader()

fun next(): String {
    while (!st.hasMoreTokens()) st = StringTokenizer(br.readLine())
    return st.nextToken()
}

fun nextInt() = next().toInt()
fun nextLong() = next().toLong()
fun nextLine() = br.readLine()!!
fun nextDouble() = next().toDouble()
// endregion
0