Submission #40286458


Source Code Expand

fun main() {
    val (n, x) = readLine()!!.split(" ").map { it.toInt() }
    val a = readLine()!!.split(" ").map { it.toInt() }
        .sorted()

    for(i in 0 until n) {
        val aj = a[i] - x

        if(a.binarySearch(aj) >= 0) {
            println("Yes")
            return
        }
    }
    println("No")
}

Submission Info

Submission Time
Task C - Gap Existence
User dhirabayashi
Language Kotlin (1.3.71)
Score 300
Code Size 335 Byte
Status AC
Exec Time 811 ms
Memory 65016 KiB

Compile Error

warning: ATTENTION!
This build uses unsafe internal compiler arguments:

-XXLanguage:+InlineClasses

This mode is not recommended for production use,
as no stability/compatibility guarantees are given on
compiler or generated code. Use it at your own risk!

Judge Result

Set Name Sample All
Score / Max Score 0 / 0 300 / 300
Status
AC × 3
AC × 24
Set Name Test Cases
Sample sample_01.txt, sample_02.txt, sample_03.txt
All random_01.txt, random_02.txt, random_03.txt, random_04.txt, random_05.txt, random_06.txt, random_07.txt, random_08.txt, random_09.txt, random_10.txt, random_11.txt, random_12.txt, random_13.txt, random_14.txt, random_15.txt, random_16.txt, random_17.txt, random_18.txt, random_19.txt, random_20.txt, random_21.txt, sample_01.txt, sample_02.txt, sample_03.txt
Case Name Status Exec Time Memory
random_01.txt AC 121 ms 38928 KiB
random_02.txt AC 111 ms 38780 KiB
random_03.txt AC 766 ms 64608 KiB
random_04.txt AC 736 ms 64568 KiB
random_05.txt AC 761 ms 64424 KiB
random_06.txt AC 780 ms 64528 KiB
random_07.txt AC 781 ms 64304 KiB
random_08.txt AC 811 ms 64668 KiB
random_09.txt AC 785 ms 64768 KiB
random_10.txt AC 804 ms 64700 KiB
random_11.txt AC 741 ms 64620 KiB
random_12.txt AC 758 ms 64808 KiB
random_13.txt AC 783 ms 64488 KiB
random_14.txt AC 783 ms 64344 KiB
random_15.txt AC 788 ms 64712 KiB
random_16.txt AC 783 ms 65016 KiB
random_17.txt AC 765 ms 64636 KiB
random_18.txt AC 794 ms 64724 KiB
random_19.txt AC 758 ms 64752 KiB
random_20.txt AC 774 ms 64560 KiB
random_21.txt AC 778 ms 64596 KiB
sample_01.txt AC 114 ms 38652 KiB
sample_02.txt AC 109 ms 38672 KiB
sample_03.txt AC 114 ms 38784 KiB