Submission #39233130


Source Code Expand

@OptIn(kotlin.ExperimentalStdlibApi::class)
fun main() {
    val n = readLine()!!.toInt()
    val x = readLine()!!.split(" ").map { it.toInt() }
        .sorted()
        .toMutableList()

    repeat(n) {
        x.removeLast()
    }
    repeat(n) {
        x.removeFirst()
    }

    println(x.sum().toDouble() / (n*3))
}

Submission Info

Submission Time
Task B - Trimmed Mean
User dhirabayashi
Language Kotlin (1.3.71)
Score 200
Code Size 339 Byte
Status AC
Exec Time 137 ms
Memory 40600 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!

Main.kt:1:2: warning: this class can only be used with the compiler argument '-Xopt-in=kotlin.RequiresOptIn'
@OptIn(kotlin.ExperimentalStdlibApi::class)
 ^

Judge Result

Set Name Sample All
Score / Max Score 0 / 0 200 / 200
Status
AC × 2
AC × 23
Set Name Test Cases
Sample example_00.txt, example_01.txt
All example_00.txt, example_01.txt, hand_00.txt, hand_01.txt, hand_02.txt, hand_03.txt, hand_04.txt, hand_05.txt, random_00.txt, 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
Case Name Status Exec Time Memory
example_00.txt AC 123 ms 38784 KiB
example_01.txt AC 110 ms 38756 KiB
hand_00.txt AC 126 ms 40324 KiB
hand_01.txt AC 129 ms 40528 KiB
hand_02.txt AC 131 ms 40492 KiB
hand_03.txt AC 131 ms 40600 KiB
hand_04.txt AC 125 ms 40428 KiB
hand_05.txt AC 124 ms 40452 KiB
random_00.txt AC 118 ms 38668 KiB
random_01.txt AC 120 ms 40368 KiB
random_02.txt AC 131 ms 40588 KiB
random_03.txt AC 127 ms 40528 KiB
random_04.txt AC 118 ms 40564 KiB
random_05.txt AC 118 ms 38768 KiB
random_06.txt AC 114 ms 38984 KiB
random_07.txt AC 108 ms 38812 KiB
random_08.txt AC 109 ms 38668 KiB
random_09.txt AC 106 ms 38708 KiB
random_10.txt AC 126 ms 40572 KiB
random_11.txt AC 130 ms 40420 KiB
random_12.txt AC 137 ms 40476 KiB
random_13.txt AC 128 ms 40496 KiB
random_14.txt AC 128 ms 40452 KiB