結果

問題 No.2044 Infinite Nim
コンテスト
ユーザー 箱星
提出日時 2022-04-24 23:21:43
言語 Kotlin
(2.3.20)
コンパイル:
kotlinc _filename_ -include-runtime -d main.jar
実行:
kotlin main.jar
結果
RE  
実行時間 -
コード長 302 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 8,775 ms
コンパイル使用メモリ 457,596 KB
実行使用メモリ 69,732 KB
最終ジャッジ日時 2026-04-08 15:17:19
合計ジャッジ時間 23,312 ms
ジャッジサーバーID
(参考情報)
judge1_0 / judge3_0
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 31 RE * 3
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

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