Submission #40286512


Source Code Expand

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

    val set = a.toSet()

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

        if(aj in set) {
            println("Yes")
            return
        }
    }
    println("No")
}

Submission Info

Submission Time
Task C - Gap Existence
User dhirabayashi
Language Kotlin (1.3.71)
Score 300
Code Size 329 Byte
Status AC
Exec Time 697 ms
Memory 80524 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 108 ms 36452 KiB
random_02.txt AC 97 ms 36260 KiB
random_03.txt AC 500 ms 72824 KiB
random_04.txt AC 493 ms 73224 KiB
random_05.txt AC 469 ms 72952 KiB
random_06.txt AC 500 ms 73268 KiB
random_07.txt AC 492 ms 72864 KiB
random_08.txt AC 471 ms 72988 KiB
random_09.txt AC 481 ms 73276 KiB
random_10.txt AC 495 ms 73128 KiB
random_11.txt AC 541 ms 72948 KiB
random_12.txt AC 697 ms 80524 KiB
random_13.txt AC 463 ms 72856 KiB
random_14.txt AC 484 ms 73024 KiB
random_15.txt AC 502 ms 73356 KiB
random_16.txt AC 473 ms 73092 KiB
random_17.txt AC 508 ms 73092 KiB
random_18.txt AC 486 ms 73052 KiB
random_19.txt AC 492 ms 72916 KiB
random_20.txt AC 483 ms 73108 KiB
random_21.txt AC 497 ms 73240 KiB
sample_01.txt AC 101 ms 36344 KiB
sample_02.txt AC 103 ms 36640 KiB
sample_03.txt AC 103 ms 36584 KiB