結果

問題 No.601 Midpoint Erase
ユーザー 0w10w1
提出日時 2017-12-14 11:57:54
言語 Ruby
(3.3.0)
結果
AC  
実行時間 282 ms / 2,000 ms
コード長 231 bytes
コンパイル時間 357 ms
コンパイル使用メモリ 11,552 KB
実行使用メモリ 23,144 KB
最終ジャッジ日時 2023-08-24 18:50:06
合計ジャッジ時間 4,553 ms
ジャッジサーバーID
(参考情報)
judge13 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 79 ms
15,276 KB
testcase_01 AC 79 ms
15,176 KB
testcase_02 AC 82 ms
15,124 KB
testcase_03 AC 208 ms
21,036 KB
testcase_04 AC 230 ms
21,524 KB
testcase_05 AC 184 ms
19,072 KB
testcase_06 AC 137 ms
17,124 KB
testcase_07 AC 222 ms
21,100 KB
testcase_08 AC 200 ms
19,980 KB
testcase_09 AC 222 ms
21,100 KB
testcase_10 AC 112 ms
16,220 KB
testcase_11 AC 282 ms
23,144 KB
testcase_12 AC 164 ms
19,204 KB
testcase_13 AC 78 ms
15,184 KB
testcase_14 AC 77 ms
15,036 KB
testcase_15 AC 78 ms
15,264 KB
testcase_16 AC 78 ms
15,124 KB
testcase_17 AC 78 ms
15,144 KB
testcase_18 AC 78 ms
15,104 KB
testcase_19 AC 79 ms
15,360 KB
testcase_20 AC 77 ms
15,032 KB
testcase_21 AC 77 ms
15,036 KB
testcase_22 AC 78 ms
15,236 KB
testcase_23 AC 78 ms
15,296 KB
testcase_24 AC 77 ms
15,036 KB
testcase_25 AC 78 ms
15,160 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Main.rb:1: warning: assigned but unused variable - n
Syntax OK

ソースコード

diff #

n = gets.to_i
a = [].tap{ |a| $<.map { |s| a << s.split.map(&:to_i) } }
r = (0..1).map { |i|
  (0..1).map { |j|
    a.select { |x| x[0] % 2 == i && x[1] % 2 == j } .size / 2
  } .reduce :+
} .reduce :+
puts ["Bob", "Alice"][r & 1]
0