結果
| 問題 | 
                            No.1121 Social Distancing in Cinema
                             | 
                    
| コンテスト | |
| ユーザー | 
                             yuruhiya
                         | 
                    
| 提出日時 | 2020-07-23 10:30:37 | 
| 言語 | Crystal  (1.14.0)  | 
                    
| 結果 | 
                             
                                AC
                                 
                             
                            
                         | 
                    
| 実行時間 | 77 ms / 2,000 ms | 
| コード長 | 244 bytes | 
| コンパイル時間 | 11,711 ms | 
| コンパイル使用メモリ | 297,356 KB | 
| 実行使用メモリ | 9,088 KB | 
| 最終ジャッジ日時 | 2024-06-30 20:44:28 | 
| 合計ジャッジ時間 | 15,375 ms | 
| 
                            ジャッジサーバーID (参考情報)  | 
                        judge3 / judge4 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| 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, (x//5 + y//9) % 2}
}.values.max_by(&.size).map { |xy, i|
  i + 1
}
puts ans.size, ans.join(' ')
            
            
            
        
            
yuruhiya