Submission #40208131


Source Code Expand

fun main() {
    val n = readLine()!!.toInt()
    val s = readLine()!!

    var a = s.first()
    for(i in 1 until n) {
        if(a == s[i]) {
            println("No")
            return
        }

        a = s[i]
    }

    println("Yes")
}

Submission Info

Submission Time
Task A - Alternately
User dhirabayashi
Language Kotlin (1.3.71)
Score 100
Code Size 261 Byte
Status AC
Exec Time 110 ms
Memory 35656 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 100 / 100
Status
AC × 3
AC × 11
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, sample_01.txt, sample_02.txt, sample_03.txt
Case Name Status Exec Time Memory
random_01.txt AC 106 ms 35392 KiB
random_02.txt AC 94 ms 35608 KiB
random_03.txt AC 101 ms 35608 KiB
random_04.txt AC 110 ms 35560 KiB
random_05.txt AC 98 ms 35656 KiB
random_06.txt AC 97 ms 35452 KiB
random_07.txt AC 97 ms 35208 KiB
random_08.txt AC 101 ms 35508 KiB
sample_01.txt AC 100 ms 35480 KiB
sample_02.txt AC 92 ms 35552 KiB
sample_03.txt AC 97 ms 35432 KiB