結果

問題 No.2044 Infinite Nim
ユーザー 👑 箱星箱星
提出日時 2022-04-24 23:21:43
言語 Kotlin
(1.9.23)
結果
RE  
実行時間 -
コード長 302 bytes
コンパイル時間 12,643 ms
コンパイル使用メモリ 434,188 KB
実行使用メモリ 65,832 KB
最終ジャッジ日時 2023-10-20 07:33:11
合計ジャッジ時間 32,111 ms
ジャッジサーバーID
(参考情報)
judge11 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 299 ms
54,400 KB
testcase_01 AC 313 ms
54,408 KB
testcase_02 AC 301 ms
54,416 KB
testcase_03 AC 297 ms
54,412 KB
testcase_04 AC 302 ms
54,412 KB
testcase_05 AC 305 ms
54,416 KB
testcase_06 RE -
testcase_07 AC 304 ms
54,416 KB
testcase_08 AC 312 ms
54,412 KB
testcase_09 AC 301 ms
54,416 KB
testcase_10 RE -
testcase_11 AC 308 ms
54,412 KB
testcase_12 AC 300 ms
54,412 KB
testcase_13 AC 497 ms
59,804 KB
testcase_14 AC 481 ms
59,764 KB
testcase_15 AC 468 ms
59,824 KB
testcase_16 AC 489 ms
59,800 KB
testcase_17 AC 515 ms
59,848 KB
testcase_18 AC 473 ms
59,784 KB
testcase_19 AC 484 ms
59,780 KB
testcase_20 AC 505 ms
59,796 KB
testcase_21 AC 539 ms
59,844 KB
testcase_22 AC 508 ms
59,832 KB
testcase_23 AC 490 ms
59,792 KB
testcase_24 AC 518 ms
59,844 KB
testcase_25 AC 506 ms
59,780 KB
testcase_26 AC 516 ms
59,812 KB
testcase_27 AC 509 ms
59,776 KB
testcase_28 AC 516 ms
59,852 KB
testcase_29 AC 490 ms
59,780 KB
testcase_30 AC 502 ms
59,844 KB
testcase_31 AC 547 ms
65,792 KB
testcase_32 AC 533 ms
65,780 KB
testcase_33 AC 532 ms
65,828 KB
testcase_34 RE -
testcase_35 AC 539 ms
65,832 KB
testcase_36 AC 306 ms
54,404 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Main.kt:2:9: warning: variable 'n' is never used
    val n = readInt()
        ^

ソースコード

diff #

fun main() {
    val n = readInt()
    val a = readInts()
    val inf = a.count { it == -1 }
    val xor = a.filter { it != -1 }.reduce(Int::xor)
    println(if (inf % 2 == 1 || xor != 0) "First" else "Second")
}

fun readInt() = readln().toInt()
fun readInts() = readln().split(" ").map { it.toInt() }
0