結果

問題 No.601 Midpoint Erase
ユーザー cympfhcympfh
提出日時 2017-12-02 00:14:07
言語 Ruby
(3.3.0)
結果
AC  
実行時間 222 ms / 2,000 ms
コード長 246 bytes
コンパイル時間 451 ms
コンパイル使用メモリ 11,448 KB
実行使用メモリ 15,548 KB
最終ジャッジ日時 2023-08-24 18:43:44
合計ジャッジ時間 4,244 ms
ジャッジサーバーID
(参考情報)
judge15 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 78 ms
15,112 KB
testcase_01 AC 78 ms
15,220 KB
testcase_02 AC 77 ms
15,032 KB
testcase_03 AC 169 ms
15,396 KB
testcase_04 AC 183 ms
15,392 KB
testcase_05 AC 154 ms
15,548 KB
testcase_06 AC 119 ms
15,344 KB
testcase_07 AC 178 ms
15,212 KB
testcase_08 AC 162 ms
15,360 KB
testcase_09 AC 182 ms
15,328 KB
testcase_10 AC 101 ms
15,332 KB
testcase_11 AC 222 ms
15,188 KB
testcase_12 AC 144 ms
15,364 KB
testcase_13 AC 77 ms
15,068 KB
testcase_14 AC 77 ms
15,180 KB
testcase_15 AC 77 ms
15,104 KB
testcase_16 AC 78 ms
15,084 KB
testcase_17 AC 78 ms
15,076 KB
testcase_18 AC 79 ms
15,112 KB
testcase_19 AC 77 ms
15,252 KB
testcase_20 AC 78 ms
15,316 KB
testcase_21 AC 78 ms
15,068 KB
testcase_22 AC 77 ms
15,136 KB
testcase_23 AC 78 ms
15,328 KB
testcase_24 AC 77 ms
15,072 KB
testcase_25 AC 78 ms
15,224 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Syntax OK

ソースコード

diff #

a = [[0, 0], [0, 0]]
n = gets.to_i
n.times do
  x, y = gets.chomp.split.map(&:to_i)
  i = x.even? ? 0 : 1
  j = y.even? ? 0 : 1
  a[i][j] += 1
end
x = 0
2.times do |i|
  2.times do |j|
x ^= (a[i][j] / 2) % 2
  end
end
puts x == 0 ? :Bob : :Alice
0