Submission #40225710


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 334 Byte
Status AC
Exec Time 837 ms
Memory 65124 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 128 ms 38784 KiB
random_02.txt AC 108 ms 38556 KiB
random_03.txt AC 771 ms 64768 KiB
random_04.txt AC 824 ms 64984 KiB
random_05.txt AC 753 ms 64516 KiB
random_06.txt AC 808 ms 64624 KiB
random_07.txt AC 831 ms 64984 KiB
random_08.txt AC 825 ms 64556 KiB
random_09.txt AC 787 ms 64700 KiB
random_10.txt AC 792 ms 64928 KiB
random_11.txt AC 825 ms 64896 KiB
random_12.txt AC 761 ms 64932 KiB
random_13.txt AC 724 ms 64492 KiB
random_14.txt AC 783 ms 64724 KiB
random_15.txt AC 800 ms 65124 KiB
random_16.txt AC 808 ms 64700 KiB
random_17.txt AC 755 ms 64704 KiB
random_18.txt AC 775 ms 64848 KiB
random_19.txt AC 763 ms 64456 KiB
random_20.txt AC 768 ms 64608 KiB
random_21.txt AC 837 ms 64908 KiB
sample_01.txt AC 114 ms 38616 KiB
sample_02.txt AC 115 ms 38760 KiB
sample_03.txt AC 119 ms 38700 KiB