結果

問題 No.601 Midpoint Erase
ユーザー 0w10w1
提出日時 2017-12-14 11:56:56
言語 Ruby
(3.3.0)
結果
WA  
実行時間 -
コード長 232 bytes
コンパイル時間 325 ms
コンパイル使用メモリ 11,520 KB
実行使用メモリ 23,448 KB
最終ジャッジ日時 2023-08-21 04:08:32
合計ジャッジ時間 5,731 ms
ジャッジサーバーID
(参考情報)
judge14 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 AC 87 ms
15,172 KB
testcase_02 AC 87 ms
15,076 KB
testcase_03 WA -
testcase_04 AC 253 ms
21,340 KB
testcase_05 WA -
testcase_06 AC 139 ms
17,144 KB
testcase_07 WA -
testcase_08 AC 208 ms
19,964 KB
testcase_09 WA -
testcase_10 WA -
testcase_11 WA -
testcase_12 WA -
testcase_13 AC 86 ms
15,304 KB
testcase_14 AC 82 ms
15,300 KB
testcase_15 WA -
testcase_16 AC 83 ms
15,232 KB
testcase_17 AC 84 ms
15,232 KB
testcase_18 WA -
testcase_19 AC 86 ms
15,324 KB
testcase_20 WA -
testcase_21 AC 87 ms
15,248 KB
testcase_22 AC 84 ms
15,156 KB
testcase_23 AC 84 ms
15,292 KB
testcase_24 AC 84 ms
15,160 KB
testcase_25 AC 84 ms
15,148 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