結果

問題 No.1121 Social Distancing in Cinema
ユーザー yuruhiyayuruhiya
提出日時 2020-07-23 09:44:49
言語 Crystal
(1.11.2)
結果
AC  
実行時間 78 ms / 2,000 ms
コード長 333 bytes
コンパイル時間 19,689 ms
コンパイル使用メモリ 258,248 KB
実行使用メモリ 10,732 KB
最終ジャッジ日時 2023-09-13 11:24:29
合計ジャッジ時間 22,200 ms
ジャッジサーバーID
(参考情報)
judge12 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 3 ms
4,420 KB
testcase_01 AC 3 ms
4,484 KB
testcase_02 AC 3 ms
4,376 KB
testcase_03 AC 3 ms
4,376 KB
testcase_04 AC 3 ms
4,380 KB
testcase_05 AC 3 ms
4,440 KB
testcase_06 AC 3 ms
4,460 KB
testcase_07 AC 3 ms
4,380 KB
testcase_08 AC 3 ms
4,400 KB
testcase_09 AC 3 ms
4,544 KB
testcase_10 AC 3 ms
4,488 KB
testcase_11 AC 3 ms
4,380 KB
testcase_12 AC 3 ms
4,544 KB
testcase_13 AC 3 ms
4,728 KB
testcase_14 AC 3 ms
4,656 KB
testcase_15 AC 6 ms
5,148 KB
testcase_16 AC 11 ms
5,508 KB
testcase_17 AC 35 ms
7,180 KB
testcase_18 AC 63 ms
9,844 KB
testcase_19 AC 78 ms
10,720 KB
testcase_20 AC 5 ms
5,280 KB
testcase_21 AC 5 ms
5,108 KB
testcase_22 AC 5 ms
5,144 KB
testcase_23 AC 4 ms
4,664 KB
testcase_24 AC 3 ms
4,712 KB
testcase_25 AC 23 ms
6,296 KB
testcase_26 AC 28 ms
6,708 KB
testcase_27 AC 3 ms
4,820 KB
testcase_28 AC 66 ms
9,912 KB
testcase_29 AC 26 ms
6,668 KB
testcase_30 AC 21 ms
6,208 KB
testcase_31 AC 74 ms
10,732 KB
testcase_32 AC 57 ms
9,168 KB
testcase_33 AC 27 ms
6,748 KB
testcase_34 AC 26 ms
6,804 KB
testcase_35 AC 60 ms
9,536 KB
testcase_36 AC 71 ms
10,240 KB
testcase_37 AC 20 ms
6,184 KB
testcase_38 AC 30 ms
6,812 KB
testcase_39 AC 64 ms
9,860 KB
testcase_40 AC 16 ms
5,816 KB
testcase_41 AC 8 ms
5,416 KB
testcase_42 AC 70 ms
10,280 KB
testcase_43 AC 71 ms
10,368 KB
testcase_44 AC 71 ms
10,520 KB
testcase_45 AC 71 ms
10,516 KB
testcase_46 AC 68 ms
10,000 KB
testcase_47 AC 3 ms
4,380 KB
testcase_48 AC 3 ms
4,376 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n = read_line.to_i
xy = Array.new(n) { x, y = read_line.split.map &.to_i; {x, y} }
ans = xy.each_with_index.group_by { |(x, y), i|
  {x % 5, y % 9}
}.values.max_by(&.size).map { |(x, y), i|
  Tuple.new({x//5, y//9}, i)
}.group_by { |(x, y), i|
  (x + y) % 2
}.values.max_by(&.size).map { |xy, i| i + 1 }
puts ans.size, ans.join(' ')
0