結果
問題 | No.5017 Tool-assisted Shooting |
ユーザー | エセ賢者 |
提出日時 | 2023-07-16 15:06:36 |
言語 | Kotlin (1.9.23) |
結果 |
AC
|
実行時間 | 362 ms / 2,000 ms |
コード長 | 1,391 bytes |
コンパイル時間 | 14,960 ms |
コンパイル使用メモリ | 426,864 KB |
実行使用メモリ | 70,996 KB |
スコア | 33 |
平均クエリ数 | 71.82 |
最終ジャッジ日時 | 2023-07-16 15:07:33 |
合計ジャッジ時間 | 50,883 ms |
ジャッジサーバーID (参考情報) |
judge12 / judge13 |
純コード判定しない問題か言語 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 340 ms
69,084 KB |
testcase_01 | AC | 342 ms
68,888 KB |
testcase_02 | AC | 313 ms
68,944 KB |
testcase_03 | AC | 323 ms
69,588 KB |
testcase_04 | AC | 333 ms
69,076 KB |
testcase_05 | AC | 333 ms
69,124 KB |
testcase_06 | AC | 319 ms
68,844 KB |
testcase_07 | AC | 322 ms
69,388 KB |
testcase_08 | AC | 346 ms
69,120 KB |
testcase_09 | AC | 317 ms
68,768 KB |
testcase_10 | AC | 331 ms
68,972 KB |
testcase_11 | AC | 341 ms
69,056 KB |
testcase_12 | AC | 326 ms
68,928 KB |
testcase_13 | AC | 315 ms
69,136 KB |
testcase_14 | AC | 321 ms
69,528 KB |
testcase_15 | AC | 344 ms
69,104 KB |
testcase_16 | AC | 317 ms
69,208 KB |
testcase_17 | AC | 326 ms
69,220 KB |
testcase_18 | AC | 344 ms
69,280 KB |
testcase_19 | AC | 323 ms
69,180 KB |
testcase_20 | AC | 328 ms
69,648 KB |
testcase_21 | AC | 324 ms
68,860 KB |
testcase_22 | AC | 316 ms
69,296 KB |
testcase_23 | AC | 329 ms
69,428 KB |
testcase_24 | AC | 321 ms
68,940 KB |
testcase_25 | AC | 352 ms
69,136 KB |
testcase_26 | AC | 327 ms
69,356 KB |
testcase_27 | AC | 319 ms
68,816 KB |
testcase_28 | AC | 356 ms
68,884 KB |
testcase_29 | AC | 334 ms
68,952 KB |
testcase_30 | AC | 318 ms
68,900 KB |
testcase_31 | AC | 353 ms
69,512 KB |
testcase_32 | AC | 324 ms
69,364 KB |
testcase_33 | AC | 321 ms
69,792 KB |
testcase_34 | AC | 315 ms
69,808 KB |
testcase_35 | AC | 362 ms
68,960 KB |
testcase_36 | AC | 333 ms
69,076 KB |
testcase_37 | AC | 322 ms
69,680 KB |
testcase_38 | AC | 350 ms
69,700 KB |
testcase_39 | AC | 324 ms
70,996 KB |
testcase_40 | AC | 321 ms
68,996 KB |
testcase_41 | AC | 320 ms
69,296 KB |
testcase_42 | AC | 330 ms
68,844 KB |
testcase_43 | AC | 322 ms
69,352 KB |
testcase_44 | AC | 343 ms
69,144 KB |
testcase_45 | AC | 348 ms
69,292 KB |
testcase_46 | AC | 327 ms
69,180 KB |
testcase_47 | AC | 327 ms
68,988 KB |
testcase_48 | AC | 325 ms
69,620 KB |
testcase_49 | AC | 321 ms
69,360 KB |
testcase_50 | AC | 320 ms
69,436 KB |
testcase_51 | AC | 318 ms
69,484 KB |
testcase_52 | AC | 345 ms
68,852 KB |
testcase_53 | AC | 329 ms
69,540 KB |
testcase_54 | AC | 323 ms
68,804 KB |
testcase_55 | AC | 337 ms
68,968 KB |
testcase_56 | AC | 321 ms
68,768 KB |
testcase_57 | AC | 338 ms
69,596 KB |
testcase_58 | AC | 317 ms
68,952 KB |
testcase_59 | AC | 352 ms
69,276 KB |
testcase_60 | AC | 319 ms
69,276 KB |
testcase_61 | AC | 315 ms
69,212 KB |
testcase_62 | AC | 347 ms
69,540 KB |
testcase_63 | AC | 325 ms
69,136 KB |
testcase_64 | AC | 328 ms
69,596 KB |
testcase_65 | AC | 327 ms
69,164 KB |
testcase_66 | AC | 334 ms
69,584 KB |
testcase_67 | AC | 319 ms
69,448 KB |
testcase_68 | AC | 340 ms
69,168 KB |
testcase_69 | AC | 347 ms
68,928 KB |
testcase_70 | AC | 326 ms
69,492 KB |
testcase_71 | AC | 319 ms
69,316 KB |
testcase_72 | AC | 348 ms
69,404 KB |
testcase_73 | AC | 325 ms
68,944 KB |
testcase_74 | AC | 325 ms
69,348 KB |
testcase_75 | AC | 324 ms
69,472 KB |
testcase_76 | AC | 348 ms
69,292 KB |
testcase_77 | AC | 327 ms
69,084 KB |
testcase_78 | AC | 329 ms
69,564 KB |
testcase_79 | AC | 353 ms
69,356 KB |
testcase_80 | AC | 324 ms
69,416 KB |
testcase_81 | AC | 322 ms
68,756 KB |
testcase_82 | AC | 347 ms
69,592 KB |
testcase_83 | AC | 324 ms
69,328 KB |
testcase_84 | AC | 322 ms
69,656 KB |
testcase_85 | AC | 326 ms
69,544 KB |
testcase_86 | AC | 358 ms
69,548 KB |
testcase_87 | AC | 321 ms
68,592 KB |
testcase_88 | AC | 322 ms
68,796 KB |
testcase_89 | AC | 354 ms
69,104 KB |
testcase_90 | AC | 311 ms
69,048 KB |
testcase_91 | AC | 324 ms
68,992 KB |
testcase_92 | AC | 337 ms
68,816 KB |
testcase_93 | AC | 322 ms
69,588 KB |
testcase_94 | AC | 324 ms
69,264 KB |
testcase_95 | AC | 317 ms
68,808 KB |
testcase_96 | AC | 345 ms
69,224 KB |
testcase_97 | AC | 321 ms
69,420 KB |
testcase_98 | AC | 318 ms
69,472 KB |
testcase_99 | AC | 344 ms
69,084 KB |
コンパイルメッセージ
Main.kt:10:10: warning: parameter 'args' is never used fun main(args: Array<String>) { ^
ソースコード
private fun next() = readLine()!! private fun nextInt() = next().toInt() private fun nextLong() = next().toLong() private fun nextDouble() = next().toDouble() private fun nextList() = next().split(" ") private fun nextIntList() = next().split(" ").map { it.toInt() }.toIntArray() private fun nextLongList() = next().split(" ").map { it.toLong() }.toLongArray() private fun nextDoubleList() = next().split(" ").map { it.toDouble() }.toDoubleArray() fun main(args: Array<String>) { var turn = 0 var enemyList = mutableListOf<Enemy>() var own = 12 while (turn < 1000) { val n = nextInt() if (n == -1) { return } val newEnemyList = mutableListOf<Enemy>() for (enemy in enemyList) { val isAlive = enemy.nextTurn() if (isAlive) { newEnemyList.add(enemy) } } enemyList = newEnemyList for (i in 0 until n) { val hpx = nextIntList() enemyList.add(Enemy(hpx[2], 59, hpx[0], hpx[1])) } val leftCount = enemyList.count { it.x > own } if (leftCount * 2 > enemyList.count()) { println("L") } else { println("R") } turn++ } } class Enemy(var x: Int, var y: Int, var h: Int, var p: Int) { fun nextTurn(): Boolean { y-- return y >= 0 } }