結果
| 問題 |
No.975 ミスターマックスバリュ
|
| ユーザー |
rhincodon66
|
| 提出日時 | 2020-01-31 22:22:59 |
| 言語 | Kotlin (2.1.0) |
| 結果 |
AC
|
| 実行時間 | 530 ms / 2,000 ms |
| コード長 | 372 bytes |
| コンパイル時間 | 12,567 ms |
| コンパイル使用メモリ | 435,864 KB |
| 実行使用メモリ | 65,708 KB |
| 最終ジャッジ日時 | 2024-09-17 08:48:35 |
| 合計ジャッジ時間 | 16,781 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 9 |
コンパイルメッセージ
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()}
^
ソースコード
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")
}
rhincodon66