結果

問題 No.202 1円玉投げ
ユーザー convexineqconvexineq
提出日時 2020-12-17 19:02:52
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 406 ms / 5,000 ms
コード長 452 bytes
コンパイル時間 922 ms
コンパイル使用メモリ 87,164 KB
実行使用メモリ 118,964 KB
最終ジャッジ日時 2023-08-24 00:17:08
合計ジャッジ時間 11,487 ms
ジャッジサーバーID
(参考情報)
judge13 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 264 ms
118,872 KB
testcase_01 AC 352 ms
118,964 KB
testcase_02 AC 104 ms
89,672 KB
testcase_03 AC 105 ms
89,668 KB
testcase_04 AC 105 ms
89,616 KB
testcase_05 AC 180 ms
109,628 KB
testcase_06 AC 341 ms
116,140 KB
testcase_07 AC 389 ms
115,588 KB
testcase_08 AC 406 ms
118,052 KB
testcase_09 AC 281 ms
113,080 KB
testcase_10 AC 255 ms
112,644 KB
testcase_11 AC 267 ms
113,136 KB
testcase_12 AC 262 ms
113,632 KB
testcase_13 AC 224 ms
111,632 KB
testcase_14 AC 180 ms
109,832 KB
testcase_15 AC 294 ms
114,256 KB
testcase_16 AC 240 ms
118,500 KB
testcase_17 AC 250 ms
118,524 KB
testcase_18 AC 245 ms
118,544 KB
testcase_19 AC 284 ms
112,016 KB
testcase_20 AC 338 ms
115,368 KB
testcase_21 AC 275 ms
113,808 KB
testcase_22 AC 147 ms
109,496 KB
testcase_23 AC 148 ms
109,256 KB
testcase_24 AC 149 ms
109,172 KB
testcase_25 AC 146 ms
108,904 KB
testcase_26 AC 148 ms
109,216 KB
testcase_27 AC 152 ms
109,568 KB
testcase_28 AC 147 ms
109,216 KB
testcase_29 AC 147 ms
109,304 KB
testcase_30 AC 157 ms
109,428 KB
testcase_31 AC 147 ms
109,616 KB
testcase_32 AC 164 ms
109,492 KB
testcase_33 AC 161 ms
109,944 KB
testcase_34 AC 153 ms
109,324 KB
testcase_35 AC 235 ms
118,576 KB
testcase_36 AC 286 ms
117,540 KB
testcase_37 AC 403 ms
118,604 KB
testcase_38 AC 235 ms
118,444 KB
testcase_39 AC 142 ms
109,988 KB
testcase_40 AC 110 ms
90,556 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

d = [[[] for _ in range(1002)] for _ in range(1002)]
n = int(input())
ans = 0
for _ in range(n):
    x,y = map(int,input().split())
    px,py = x//20, y//20
    ok = 1
    for i in range(-1,2):
        for j in range(-1,2):
            if px+i < 0 or py+j < 0: continue
            for v,w in d[px+i][py+j]:
                if (x-v)**2 + (y-w)**2 < 400:
                    ok = 0
    if ok:
        ans += 1
        d[px][py].append((x,y))

print(ans)
0