結果

問題 No.601 Midpoint Erase
ユーザー 💕💖💞💕💖💞
提出日時 2017-12-25 00:28:55
言語 Kotlin
(1.9.23)
結果
AC  
実行時間 758 ms / 2,000 ms
コード長 406 bytes
コンパイル時間 13,717 ms
コンパイル使用メモリ 439,752 KB
実行使用メモリ 89,788 KB
最終ジャッジ日時 2024-04-30 16:48:38
合計ジャッジ時間 25,757 ms
ジャッジサーバーID
(参考情報)
judge2 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 330 ms
56,944 KB
testcase_01 AC 344 ms
57,012 KB
testcase_02 AC 328 ms
57,036 KB
testcase_03 AC 684 ms
84,108 KB
testcase_04 AC 701 ms
88,216 KB
testcase_05 AC 675 ms
79,800 KB
testcase_06 AC 634 ms
69,520 KB
testcase_07 AC 689 ms
88,036 KB
testcase_08 AC 647 ms
82,004 KB
testcase_09 AC 688 ms
88,296 KB
testcase_10 AC 543 ms
65,168 KB
testcase_11 AC 758 ms
89,788 KB
testcase_12 AC 656 ms
77,900 KB
testcase_13 AC 327 ms
57,080 KB
testcase_14 AC 333 ms
56,928 KB
testcase_15 AC 326 ms
57,016 KB
testcase_16 AC 337 ms
57,056 KB
testcase_17 AC 324 ms
56,960 KB
testcase_18 AC 338 ms
57,112 KB
testcase_19 AC 342 ms
57,120 KB
testcase_20 AC 337 ms
57,056 KB
testcase_21 AC 333 ms
57,108 KB
testcase_22 AC 336 ms
57,048 KB
testcase_23 AC 330 ms
57,032 KB
testcase_24 AC 333 ms
57,060 KB
testcase_25 AC 334 ms
57,164 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Main.kt:1:10: warning: parameter 'args' is never used
fun main(args:Array<String>) {
         ^

ソースコード

diff #

fun main(args:Array<String>) {
  val n = readLine()!!.toInt()
  val map = mutableMapOf<Pair<Int,Int>, Int>()
  (1..n).map {
    val (a,b) = readLine()!!.split(" ").map { it.toInt()%2 }
    val pair = Pair(a,b)
    if( map.get(pair) == null)
      map[pair] = 0
    map[pair] = map[pair]!! + 1
  }
  val sum = map.values.map { it/2 }.sum()
  if( sum%2 == 0 )
    println("Bob")
  else
    println("Alice")
}
0