結果

問題 No.1121 Social Distancing in Cinema
ユーザー trineutrontrineutron
提出日時 2020-07-23 00:38:11
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 895 ms / 2,000 ms
コード長 529 bytes
コンパイル時間 561 ms
コンパイル使用メモリ 10,864 KB
実行使用メモリ 37,612 KB
最終ジャッジ日時 2023-09-05 06:56:22
合計ジャッジ時間 18,661 ms
ジャッジサーバーID
(参考情報)
judge12 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 16 ms
8,140 KB
testcase_01 AC 16 ms
8,232 KB
testcase_02 AC 16 ms
8,132 KB
testcase_03 AC 16 ms
8,144 KB
testcase_04 AC 16 ms
8,272 KB
testcase_05 AC 17 ms
8,212 KB
testcase_06 AC 16 ms
8,156 KB
testcase_07 AC 17 ms
8,104 KB
testcase_08 AC 16 ms
8,156 KB
testcase_09 AC 17 ms
8,248 KB
testcase_10 AC 17 ms
8,280 KB
testcase_11 AC 17 ms
8,224 KB
testcase_12 AC 18 ms
8,280 KB
testcase_13 AC 19 ms
8,316 KB
testcase_14 AC 23 ms
8,432 KB
testcase_15 AC 43 ms
8,892 KB
testcase_16 AC 118 ms
10,760 KB
testcase_17 AC 406 ms
19,548 KB
testcase_18 AC 762 ms
32,452 KB
testcase_19 AC 888 ms
37,612 KB
testcase_20 AC 42 ms
8,852 KB
testcase_21 AC 36 ms
8,732 KB
testcase_22 AC 36 ms
8,596 KB
testcase_23 AC 23 ms
8,352 KB
testcase_24 AC 19 ms
8,364 KB
testcase_25 AC 243 ms
15,844 KB
testcase_26 AC 323 ms
18,156 KB
testcase_27 AC 26 ms
8,568 KB
testcase_28 AC 781 ms
33,836 KB
testcase_29 AC 289 ms
17,564 KB
testcase_30 AC 236 ms
13,776 KB
testcase_31 AC 895 ms
37,580 KB
testcase_32 AC 684 ms
30,236 KB
testcase_33 AC 298 ms
17,160 KB
testcase_34 AC 295 ms
17,400 KB
testcase_35 AC 713 ms
31,044 KB
testcase_36 AC 848 ms
36,480 KB
testcase_37 AC 216 ms
15,028 KB
testcase_38 AC 341 ms
18,280 KB
testcase_39 AC 779 ms
33,464 KB
testcase_40 AC 170 ms
13,392 KB
testcase_41 AC 58 ms
9,656 KB
testcase_42 AC 859 ms
36,236 KB
testcase_43 AC 862 ms
36,148 KB
testcase_44 AC 849 ms
36,240 KB
testcase_45 AC 852 ms
36,152 KB
testcase_46 AC 831 ms
35,244 KB
testcase_47 AC 16 ms
8,244 KB
testcase_48 AC 16 ms
8,244 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import itertools
n = int(input())
x = [0] * n
y = [0] * n
for i in range(n):
    x[i], y[i] = map(int, input().split())
t = [[0] * 10 for i in range(9)]
p = []
for i in range(n):
    offset = 0
    if y[i] % 18 >= 9:
        offset = 5
    t[y[i] % 9][(x[i] + offset) % 10] += 1
    p.append((y[i] % 9, (x[i] + offset) % 10))
for i, j in itertools.product(range(9), range(10)):
    if t[i][j] * 90 >= n:
        r = (i, j)
        break
s = []
for i in range(n):
    if p[i] == r:
        s.append(i + 1)
print(len(s))
print(*s)
0