結果

問題 No.975 ミスターマックスバリュ
ユーザー rhincodon66rhincodon66
提出日時 2020-01-31 22:22:59
言語 Kotlin
(1.9.23)
結果
AC  
実行時間 501 ms / 2,000 ms
コード長 372 bytes
コンパイル時間 14,677 ms
コンパイル使用メモリ 444,888 KB
実行使用メモリ 60,004 KB
最終ジャッジ日時 2023-10-17 10:24:03
合計ジャッジ時間 19,872 ms
ジャッジサーバーID
(参考情報)
judge13 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 295 ms
54,472 KB
testcase_01 AC 296 ms
54,504 KB
testcase_02 AC 299 ms
54,512 KB
testcase_03 AC 302 ms
54,500 KB
testcase_04 AC 302 ms
54,524 KB
testcase_05 AC 314 ms
54,628 KB
testcase_06 AC 318 ms
54,628 KB
testcase_07 AC 328 ms
54,708 KB
testcase_08 AC 501 ms
60,004 KB
testcase_09 AC 292 ms
54,448 KB
testcase_10 AC 292 ms
54,460 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Main.kt:3:10: warning: parameter 'args' is never used
fun main(args:Array<String>){
         ^
Main.kt:4:12: warning: variable 'n' is never used
    val (x,n,m) = readLine()!!.split(" ").map{it.toInt()}
           ^
Main.kt:4:14: warning: variable 'm' is never used
    val (x,n,m) = readLine()!!.split(" ").map{it.toInt()}
             ^

ソースコード

diff #

import java.util.*

fun main(args:Array<String>){
    val (x,n,m) = readLine()!!.split(" ").map{it.toInt()}
    val a = readLine()!!.split(" ").map{it.toInt()}
    val b = readLine()!!.split(" ").map{it.toInt()}
    val A = a.any { it -> it == x }
    val B = b.any { it -> it == x }
    println(if(A && B) "MrMaxValu" else if(A) "MrMax" else if(B) "MaxValu" else "-1")
}
0