結果

問題 No.239 にゃんぱすー
ユーザー komkomhkomkomh
提出日時 2019-06-19 17:46:14
言語 Kotlin
(1.9.23)
結果
AC  
実行時間 387 ms / 2,000 ms
コード長 696 bytes
コンパイル時間 9,751 ms
コンパイル使用メモリ 437,188 KB
実行使用メモリ 60,188 KB
最終ジャッジ日時 2024-04-30 21:06:00
合計ジャッジ時間 22,979 ms
ジャッジサーバーID
(参考情報)
judge5 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 265 ms
56,656 KB
testcase_01 AC 259 ms
56,664 KB
testcase_02 AC 264 ms
56,676 KB
testcase_03 AC 260 ms
56,800 KB
testcase_04 AC 266 ms
56,664 KB
testcase_05 AC 264 ms
56,740 KB
testcase_06 AC 261 ms
56,660 KB
testcase_07 AC 262 ms
56,852 KB
testcase_08 AC 278 ms
56,840 KB
testcase_09 AC 284 ms
56,972 KB
testcase_10 AC 276 ms
56,900 KB
testcase_11 AC 292 ms
56,944 KB
testcase_12 AC 304 ms
57,020 KB
testcase_13 AC 307 ms
56,904 KB
testcase_14 AC 312 ms
57,000 KB
testcase_15 AC 317 ms
57,048 KB
testcase_16 AC 316 ms
56,984 KB
testcase_17 AC 312 ms
57,144 KB
testcase_18 AC 338 ms
57,224 KB
testcase_19 AC 333 ms
57,084 KB
testcase_20 AC 330 ms
56,956 KB
testcase_21 AC 353 ms
57,276 KB
testcase_22 AC 383 ms
58,712 KB
testcase_23 AC 375 ms
58,580 KB
testcase_24 AC 376 ms
58,812 KB
testcase_25 AC 382 ms
60,052 KB
testcase_26 AC 387 ms
60,188 KB
testcase_27 AC 265 ms
56,828 KB
testcase_28 AC 285 ms
56,936 KB
testcase_29 AC 307 ms
57,044 KB
testcase_30 AC 313 ms
57,060 KB
testcase_31 AC 322 ms
56,924 KB
testcase_32 AC 320 ms
57,188 KB
testcase_33 AC 328 ms
57,124 KB
testcase_34 AC 374 ms
58,616 KB
testcase_35 AC 385 ms
60,056 KB
testcase_36 AC 375 ms
59,280 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

package yukicoder

fun main() {
    val N = readLine()!!.toInt()
    var A = mutableListOf<List<String>>()
    for (i in 0 until N) {
        A.add(readLine()!!.split(" "))
    }

    fun isRenchon(i: Int): Boolean {
        for (j in 0 until N) {
            if (i == j) {
                continue
            }
            if (A[j][i] != "nyanpass") {
                return false
            }
        }
        return true
    }

    var renChanIndex = -2
    for (i in 0 until N) {
        if (isRenchon(i)) {
            if (renChanIndex != -2) {
                println("-1")
                return
            }
            renChanIndex = i
        }
    }
    println(renChanIndex + 1)
}
0