結果
問題 | No.1121 Social Distancing in Cinema |
ユーザー | mkawa2 |
提出日時 | 2022-08-03 11:36:59 |
言語 | PyPy3 (7.3.15) |
結果 |
WA
|
実行時間 | - |
コード長 | 1,409 bytes |
コンパイル時間 | 353 ms |
コンパイル使用メモリ | 86,928 KB |
実行使用メモリ | 136,240 KB |
最終ジャッジ日時 | 2023-10-11 02:48:09 |
合計ジャッジ時間 | 19,347 ms |
ジャッジサーバーID (参考情報) |
judge11 / judge15 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 93 ms
71,480 KB |
testcase_01 | AC | 93 ms
71,860 KB |
testcase_02 | AC | 92 ms
71,804 KB |
testcase_03 | AC | 93 ms
71,456 KB |
testcase_04 | AC | 94 ms
71,684 KB |
testcase_05 | AC | 92 ms
71,864 KB |
testcase_06 | AC | 94 ms
71,952 KB |
testcase_07 | AC | 94 ms
71,956 KB |
testcase_08 | AC | 94 ms
71,808 KB |
testcase_09 | AC | 94 ms
71,588 KB |
testcase_10 | AC | 96 ms
72,308 KB |
testcase_11 | AC | 97 ms
72,348 KB |
testcase_12 | AC | 100 ms
76,512 KB |
testcase_13 | AC | 111 ms
77,540 KB |
testcase_14 | AC | 127 ms
78,152 KB |
testcase_15 | AC | 158 ms
80,064 KB |
testcase_16 | AC | 191 ms
84,084 KB |
testcase_17 | AC | 330 ms
101,480 KB |
testcase_18 | AC | 422 ms
119,404 KB |
testcase_19 | AC | 480 ms
135,660 KB |
testcase_20 | AC | 163 ms
79,876 KB |
testcase_21 | AC | 157 ms
79,504 KB |
testcase_22 | AC | 156 ms
79,232 KB |
testcase_23 | AC | 142 ms
79,028 KB |
testcase_24 | AC | 122 ms
77,680 KB |
testcase_25 | AC | 274 ms
92,592 KB |
testcase_26 | AC | 314 ms
96,036 KB |
testcase_27 | AC | 161 ms
78,936 KB |
testcase_28 | AC | 578 ms
130,020 KB |
testcase_29 | AC | 298 ms
94,728 KB |
testcase_30 | AC | 233 ms
91,364 KB |
testcase_31 | AC | 469 ms
135,780 KB |
testcase_32 | AC | 397 ms
120,184 KB |
testcase_33 | AC | 269 ms
94,660 KB |
testcase_34 | AC | 269 ms
94,324 KB |
testcase_35 | AC | 414 ms
125,872 KB |
testcase_36 | AC | 526 ms
136,240 KB |
testcase_37 | AC | 240 ms
91,412 KB |
testcase_38 | AC | 297 ms
97,644 KB |
testcase_39 | AC | 504 ms
118,312 KB |
testcase_40 | AC | 218 ms
87,304 KB |
testcase_41 | AC | 166 ms
80,772 KB |
testcase_42 | AC | 502 ms
133,820 KB |
testcase_43 | AC | 501 ms
133,948 KB |
testcase_44 | WA | - |
testcase_45 | WA | - |
testcase_46 | WA | - |
testcase_47 | AC | 91 ms
71,692 KB |
testcase_48 | AC | 91 ms
71,480 KB |
ソースコード
import sys # sys.setrecursionlimit(200005) int1 = lambda x: int(x)-1 pDB = lambda *x: print(*x, end="\n", file=sys.stderr) p2D = lambda x: print(*x, sep="\n", end="\n\n", file=sys.stderr) def II(): return int(sys.stdin.readline()) def LI(): return list(map(int, sys.stdin.readline().split())) def LLI(rows_number): return [LI() for _ in range(rows_number)] def LI1(): return list(map(int1, sys.stdin.readline().split())) def LLI1(rows_number): return [LI1() for _ in range(rows_number)] def SI(): return sys.stdin.readline().rstrip() dij = [(0, 1), (-1, 0), (0, -1), (1, 0)] # dij = [(0, 1), (-1, 0), (0, -1), (1, 0), (1, 1), (1, -1), (-1, 1), (-1, -1)] # inf = (1 << 63)-1 inf = (1 << 31)-1 # md = 10**9+7 md = 998244353 from collections import defaultdict from bisect import * def ng(): for px in range(x, x-11, -1): if px not in yy: continue j = bisect(yy[px], y) py = yy[px][j] if y-yy[px][j-1] < py-y: py = yy[px][j-1] if (x-px)**2+(y-py)**2 < 100: return True return False n = II() xy = LLI(n) ans = [] yy = defaultdict(lambda: [-inf, inf]) for i, (x, y) in sorted(enumerate(xy), key=lambda x: x[1]): if ng(): continue insort(yy[x], y) ans.append(i+1) print(len(ans)) print(*ans) # for i in range(len(ans)): # x, y = xy[ans[i]-1] # for j in range(i): # s, t = xy[ans[j]-1] # print(x, y, s, t, (x-s)**2+(y-t)**2)