結果
| 問題 |
No.601 Midpoint Erase
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2017-12-01 10:24:26 |
| 言語 | Kotlin (2.1.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 371 bytes |
| コンパイル時間 | 14,592 ms |
| コンパイル使用メモリ | 433,900 KB |
| 実行使用メモリ | 98,684 KB |
| 最終ジャッジ日時 | 2024-11-20 13:21:39 |
| 合計ジャッジ時間 | 30,099 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 17 WA * 6 |
コンパイルメッセージ
Main.kt:3:10: warning: parameter 'args' is never used
fun main(args: Array<String>) {
^
Main.kt:6:20: warning: parameter 'i' is never used, could be renamed to _
val A = Array(4, {i -> 0})
^
Main.kt:14:38: warning: no cast needed
val num = arrayOf(A[0], A[3]).min() as Int + arrayOf(A[1], A[2]).min() as Int
^
Main.kt:14:73: warning: no cast needed
val num = arrayOf(A[0], A[3]).min() as Int + arrayOf(A[1], A[2]).min() as Int
^
ソースコード
import java.util.*
fun main(args: Array<String>) {
val cin = Scanner(System.`in`)
val N = cin.nextInt()
val A = Array(4, {i -> 0})
for (i in 1..N) {
val x = cin.nextInt()
val y = cin.nextInt()
A[x%2*2 + y%2] += 1
}
val num = arrayOf(A[0], A[3]).min() as Int + arrayOf(A[1], A[2]).min() as Int
val ans = if (num % 2 == 1) "Alice" else "Bob"
println(ans)
}