結果
問題 | No.216 FAC |
ユーザー | javy |
提出日時 | 2015-11-13 01:52:27 |
言語 | Kotlin (1.9.23) |
結果 |
AC
|
実行時間 | 304 ms / 1,000 ms |
コード長 | 1,327 bytes |
コンパイル時間 | 13,323 ms |
コンパイル使用メモリ | 422,476 KB |
実行使用メモリ | 53,428 KB |
最終ジャッジ日時 | 2023-08-12 14:49:01 |
合計ジャッジ時間 | 23,387 ms |
ジャッジサーバーID (参考情報) |
judge11 / judge10 |
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 287 ms
52,788 KB |
testcase_01 | AC | 293 ms
53,032 KB |
testcase_02 | AC | 287 ms
52,780 KB |
testcase_03 | AC | 290 ms
52,864 KB |
testcase_04 | AC | 291 ms
52,844 KB |
testcase_05 | AC | 289 ms
52,976 KB |
testcase_06 | AC | 286 ms
52,788 KB |
testcase_07 | AC | 290 ms
52,784 KB |
testcase_08 | AC | 286 ms
52,824 KB |
testcase_09 | AC | 288 ms
52,780 KB |
testcase_10 | AC | 290 ms
53,264 KB |
testcase_11 | AC | 289 ms
53,056 KB |
testcase_12 | AC | 287 ms
52,860 KB |
testcase_13 | AC | 294 ms
52,760 KB |
testcase_14 | AC | 299 ms
52,780 KB |
testcase_15 | AC | 294 ms
53,428 KB |
testcase_16 | AC | 292 ms
52,968 KB |
testcase_17 | AC | 299 ms
53,060 KB |
testcase_18 | AC | 295 ms
52,856 KB |
testcase_19 | AC | 297 ms
52,884 KB |
testcase_20 | AC | 302 ms
53,060 KB |
testcase_21 | AC | 295 ms
53,004 KB |
testcase_22 | AC | 298 ms
52,888 KB |
testcase_23 | AC | 304 ms
52,824 KB |
testcase_24 | AC | 304 ms
52,988 KB |
testcase_25 | AC | 297 ms
53,108 KB |
testcase_26 | AC | 292 ms
52,784 KB |
コンパイルメッセージ
Main.kt:6:10: warning: parameter 'args' is never used fun main(args: Array<String>) { ^
ソースコード
package Yukicoder /** * Created by hichikawa on 2015/11/12. */ fun main(args: Array<String>) { fun readLineLongArray() : List<Long> { val str = readLine() as String val arrStr = str.split(" ") val ret = arrStr.map { it.toLong() } return ret } fun readLineLong() : Long { val str = readLine() as String return str.toLong() } fun readLineInt() : Int { val str = readLine() as String return str.toInt() } fun readLineIntArray() : List<Int> { val str = readLine() as String val arrStr = str.split(" ") val ret = arrStr.map { it.toInt() } return ret } val num = readLineInt() var numArrPorsonPoint = Array(100, {0}) val pointArr = readLineIntArray() val answerPerson = readLineIntArray() var maxPoint = 0 var gattablePoint = 0 for (i in 0..(num-1)) { if (answerPerson[i] == 0) { gattablePoint += pointArr[i] } else { numArrPorsonPoint[answerPerson[i]-1] += pointArr[i] if (numArrPorsonPoint[answerPerson[i]-1] > maxPoint) { maxPoint = numArrPorsonPoint[answerPerson[i]-1] } } } if (gattablePoint >= maxPoint) { println("YES") } else { println("NO") } }