結果

問題 No.1121 Social Distancing in Cinema
ユーザー yuruhiyayuruhiya
提出日時 2020-07-23 10:35:55
言語 Crystal
(1.11.2)
結果
AC  
実行時間 75 ms / 2,000 ms
コード長 238 bytes
コンパイル時間 16,790 ms
コンパイル使用メモリ 257,212 KB
実行使用メモリ 10,696 KB
最終ジャッジ日時 2023-09-13 11:25:39
合計ジャッジ時間 21,228 ms
ジャッジサーバーID
(参考情報)
judge15 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
4,388 KB
testcase_01 AC 2 ms
4,408 KB
testcase_02 AC 3 ms
4,380 KB
testcase_03 AC 2 ms
4,384 KB
testcase_04 AC 3 ms
4,412 KB
testcase_05 AC 3 ms
4,484 KB
testcase_06 AC 3 ms
4,400 KB
testcase_07 AC 3 ms
4,468 KB
testcase_08 AC 2 ms
4,376 KB
testcase_09 AC 2 ms
4,432 KB
testcase_10 AC 2 ms
4,448 KB
testcase_11 AC 2 ms
4,556 KB
testcase_12 AC 3 ms
4,592 KB
testcase_13 AC 3 ms
4,632 KB
testcase_14 AC 3 ms
4,788 KB
testcase_15 AC 5 ms
5,132 KB
testcase_16 AC 12 ms
5,812 KB
testcase_17 AC 35 ms
7,824 KB
testcase_18 AC 62 ms
9,180 KB
testcase_19 AC 74 ms
10,500 KB
testcase_20 AC 5 ms
5,164 KB
testcase_21 AC 5 ms
5,252 KB
testcase_22 AC 4 ms
5,132 KB
testcase_23 AC 3 ms
4,772 KB
testcase_24 AC 3 ms
4,624 KB
testcase_25 AC 22 ms
6,448 KB
testcase_26 AC 28 ms
6,936 KB
testcase_27 AC 4 ms
4,856 KB
testcase_28 AC 66 ms
10,424 KB
testcase_29 AC 26 ms
6,904 KB
testcase_30 AC 20 ms
6,204 KB
testcase_31 AC 75 ms
10,668 KB
testcase_32 AC 56 ms
9,008 KB
testcase_33 AC 26 ms
6,860 KB
testcase_34 AC 26 ms
6,776 KB
testcase_35 AC 59 ms
8,992 KB
testcase_36 AC 72 ms
10,420 KB
testcase_37 AC 20 ms
6,336 KB
testcase_38 AC 30 ms
6,908 KB
testcase_39 AC 64 ms
10,036 KB
testcase_40 AC 17 ms
6,000 KB
testcase_41 AC 7 ms
5,204 KB
testcase_42 AC 71 ms
10,636 KB
testcase_43 AC 71 ms
10,468 KB
testcase_44 AC 70 ms
10,312 KB
testcase_45 AC 71 ms
10,696 KB
testcase_46 AC 68 ms
10,264 KB
testcase_47 AC 2 ms
4,376 KB
testcase_48 AC 2 ms
4,448 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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