結果

問題 No.1121 Social Distancing in Cinema
ユーザー tomeruntomerun
提出日時 2020-07-22 22:02:49
言語 Crystal
(1.11.2)
結果
AC  
実行時間 104 ms / 2,000 ms
コード長 331 bytes
コンパイル時間 18,247 ms
コンパイル使用メモリ 254,332 KB
実行使用メモリ 32,380 KB
最終ジャッジ日時 2023-09-13 11:22:52
合計ジャッジ時間 24,432 ms
ジャッジサーバーID
(参考情報)
judge14 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
4,440 KB
testcase_01 AC 2 ms
4,400 KB
testcase_02 AC 2 ms
4,420 KB
testcase_03 AC 2 ms
4,472 KB
testcase_04 AC 3 ms
4,500 KB
testcase_05 AC 3 ms
4,420 KB
testcase_06 AC 2 ms
4,496 KB
testcase_07 AC 3 ms
4,560 KB
testcase_08 AC 3 ms
4,504 KB
testcase_09 AC 2 ms
4,396 KB
testcase_10 AC 2 ms
4,416 KB
testcase_11 AC 2 ms
4,380 KB
testcase_12 AC 3 ms
4,496 KB
testcase_13 AC 2 ms
4,536 KB
testcase_14 AC 3 ms
4,844 KB
testcase_15 AC 5 ms
5,316 KB
testcase_16 AC 12 ms
7,508 KB
testcase_17 AC 43 ms
14,980 KB
testcase_18 AC 84 ms
22,412 KB
testcase_19 AC 104 ms
30,744 KB
testcase_20 AC 5 ms
5,388 KB
testcase_21 AC 5 ms
5,228 KB
testcase_22 AC 5 ms
5,268 KB
testcase_23 AC 4 ms
4,920 KB
testcase_24 AC 3 ms
4,592 KB
testcase_25 AC 28 ms
11,752 KB
testcase_26 AC 35 ms
13,400 KB
testcase_27 AC 4 ms
4,960 KB
testcase_28 AC 85 ms
23,760 KB
testcase_29 AC 33 ms
13,056 KB
testcase_30 AC 27 ms
11,188 KB
testcase_31 AC 104 ms
32,380 KB
testcase_32 AC 77 ms
20,232 KB
testcase_33 AC 35 ms
12,956 KB
testcase_34 AC 35 ms
12,788 KB
testcase_35 AC 85 ms
21,280 KB
testcase_36 AC 101 ms
27,076 KB
testcase_37 AC 24 ms
10,524 KB
testcase_38 AC 38 ms
15,500 KB
testcase_39 AC 91 ms
23,028 KB
testcase_40 AC 19 ms
8,692 KB
testcase_41 AC 8 ms
5,748 KB
testcase_42 AC 99 ms
27,384 KB
testcase_43 AC 100 ms
26,296 KB
testcase_44 AC 96 ms
25,540 KB
testcase_45 AC 100 ms
29,460 KB
testcase_46 AC 101 ms
28,284 KB
testcase_47 AC 2 ms
4,412 KB
testcase_48 AC 2 ms
4,396 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n = read_line.to_i
ps = Array.new(n) { read_line.split.map(&.to_i) }
cs = Array.new(90) { [] of Int32 }
ps.each.with_index do |p, i|
  x, y = p
  yi = y % 9
  x += y // 9 % 2 * 5
  xi = x % 10
  idx = yi * 10 + xi
  cs[idx] << i + 1
end
cs.each do |c|
  if c.size * 90 >= n
    puts c.size
    puts c.join(" ")
    break
  end
end
0