提出 #34244294


ソースコード 拡げる

fun readSplit() = readLine()!!.split(' ')
fun yn(b: Boolean) = if (b) "Yes" else "No"

fun main() {
	val (N, P, Q, R) = readSplit().map(String::toLong)
	val A = readSplit().map(String::toLong)
	var sum = 0L
	val B = listOf(0L) + A.map { sum += it; sum }
	val ans = B.any {
		B.binarySearch(it + P) >= 0 && B.binarySearch(it + P + Q) >= 0 && B.binarySearch(it + P + Q + R) >= 0
	}
	println(yn(ans))
}

提出情報

提出日時
問題 D - Iroha and Haiku (New ABC Edition)
ユーザ Raysphere
言語 Kotlin (1.3.71)
得点 400
コード長 413 Byte
結果 AC
実行時間 506 ms
メモリ 72800 KiB

コンパイルエラー

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:5:7: warning: variable 'N' is never used
	val (N, P, Q, R) = readSplit().map(String::toLong)
      ^

ジャッジ結果

セット名 Sample All
得点 / 配点 0 / 0 400 / 400
結果
AC × 3
AC × 25
セット名 テストケース
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, random_22.txt, sample_01.txt, sample_02.txt, sample_03.txt
ケース名 結果 実行時間 メモリ
random_01.txt AC 495 ms 72772 KiB
random_02.txt AC 378 ms 58536 KiB
random_03.txt AC 491 ms 72800 KiB
random_04.txt AC 459 ms 67292 KiB
random_05.txt AC 506 ms 72412 KiB
random_06.txt AC 449 ms 62032 KiB
random_07.txt AC 495 ms 72172 KiB
random_08.txt AC 433 ms 61572 KiB
random_09.txt AC 476 ms 72788 KiB
random_10.txt AC 406 ms 62860 KiB
random_11.txt AC 449 ms 72468 KiB
random_12.txt AC 450 ms 72784 KiB
random_13.txt AC 451 ms 72552 KiB
random_14.txt AC 447 ms 62004 KiB
random_15.txt AC 453 ms 72524 KiB
random_16.txt AC 334 ms 53616 KiB
random_17.txt AC 468 ms 72200 KiB
random_18.txt AC 111 ms 36360 KiB
random_19.txt AC 360 ms 65276 KiB
random_20.txt AC 461 ms 65220 KiB
random_21.txt AC 418 ms 66460 KiB
random_22.txt AC 119 ms 36552 KiB
sample_01.txt AC 114 ms 36292 KiB
sample_02.txt AC 113 ms 36196 KiB
sample_03.txt AC 106 ms 36132 KiB