結果
| 問題 |
No.1121 Social Distancing in Cinema
|
| コンテスト | |
| ユーザー |
yuruhiya
|
| 提出日時 | 2020-07-23 09:44:49 |
| 言語 | Crystal (1.14.0) |
| 結果 |
AC
|
| 実行時間 | 78 ms / 2,000 ms |
| コード長 | 333 bytes |
| コンパイル時間 | 11,756 ms |
| コンパイル使用メモリ | 298,728 KB |
| 実行使用メモリ | 9,344 KB |
| 最終ジャッジ日時 | 2024-06-30 20:43:54 |
| 合計ジャッジ時間 | 15,912 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 47 |
ソースコード
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(' ')
yuruhiya