提出 #40031417


ソースコード 拡げる

import kotlin.math.abs

fun main() {
    val (r, c) = readLine()!!.split(" ").map { it.toInt() }
    val b = List(r) {
        readLine()!!
    }

    val result = b.toMutableList().map { it.toCharArray() }

    for(i in 0 until r) {
        for(j in 0 until c) {
            if(b[i][j] != '.' && b[i][j] != '#') {
                val n = b[i][j] - '0'

                for(k in 0 until r) {
                    for(l in 0 until c) {
                        if(abs(i - k) + abs(j - l) <= n) {
                            result[k][l] = '.'
                        }
                    }
                }
            }
        }
    }

    println(result.map { String(it) }.joinToString("\n"))
}

提出情報

提出日時
問題 B - Bombs
ユーザ dhirabayashi
言語 Kotlin (1.3.71)
得点 200
コード長 725 Byte
結果 AC
実行時間 148 ms
メモリ 38260 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!

ジャッジ結果

セット名 Sample All
得点 / 配点 0 / 0 200 / 200
結果
AC × 4
AC × 22
セット名 テストケース
Sample 00_sample_00.txt, 00_sample_01.txt, 00_sample_02.txt, 00_sample_03.txt
All 00_sample_00.txt, 00_sample_01.txt, 00_sample_02.txt, 00_sample_03.txt, 01_random_00.txt, 01_random_01.txt, 01_random_02.txt, 01_random_03.txt, 01_random_04.txt, 01_random_05.txt, 01_random_06.txt, 01_random_07.txt, 01_random_08.txt, 01_random_09.txt, 01_random_10.txt, 01_random_11.txt, 01_random_12.txt, 01_random_13.txt, 01_random_14.txt, 01_random_15.txt, 01_random_16.txt, 01_random_17.txt
ケース名 結果 実行時間 メモリ
00_sample_00.txt AC 109 ms 36224 KiB
00_sample_01.txt AC 95 ms 36080 KiB
00_sample_02.txt AC 95 ms 36000 KiB
00_sample_03.txt AC 98 ms 35980 KiB
01_random_00.txt AC 101 ms 36240 KiB
01_random_01.txt AC 118 ms 37616 KiB
01_random_02.txt AC 107 ms 36332 KiB
01_random_03.txt AC 103 ms 36152 KiB
01_random_04.txt AC 104 ms 36320 KiB
01_random_05.txt AC 121 ms 37676 KiB
01_random_06.txt AC 105 ms 36264 KiB
01_random_07.txt AC 105 ms 36328 KiB
01_random_08.txt AC 111 ms 37564 KiB
01_random_09.txt AC 113 ms 37540 KiB
01_random_10.txt AC 115 ms 37628 KiB
01_random_11.txt AC 111 ms 37664 KiB
01_random_12.txt AC 115 ms 37628 KiB
01_random_13.txt AC 109 ms 37352 KiB
01_random_14.txt AC 112 ms 37700 KiB
01_random_15.txt AC 111 ms 37660 KiB
01_random_16.txt AC 148 ms 38260 KiB
01_random_17.txt AC 99 ms 36124 KiB