結果

問題 No.202 1円玉投げ
ユーザー noko2250noko2250
提出日時 2015-06-06 21:05:52
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 4,112 ms / 5,000 ms
コード長 648 bytes
コンパイル時間 99 ms
コンパイル使用メモリ 10,956 KB
実行使用メモリ 23,200 KB
最終ジャッジ日時 2023-08-23 23:00:40
合計ジャッジ時間 42,764 ms
ジャッジサーバーID
(参考情報)
judge11 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 4,112 ms
23,200 KB
testcase_01 AC 1,472 ms
22,764 KB
testcase_02 AC 22 ms
9,684 KB
testcase_03 AC 22 ms
9,700 KB
testcase_04 AC 22 ms
9,572 KB
testcase_05 AC 66 ms
10,632 KB
testcase_06 AC 1,170 ms
19,476 KB
testcase_07 AC 1,400 ms
20,540 KB
testcase_08 AC 1,435 ms
20,768 KB
testcase_09 AC 631 ms
16,272 KB
testcase_10 AC 219 ms
12,548 KB
testcase_11 AC 478 ms
15,248 KB
testcase_12 AC 506 ms
15,320 KB
testcase_13 AC 246 ms
13,028 KB
testcase_14 AC 75 ms
10,688 KB
testcase_15 AC 594 ms
16,068 KB
testcase_16 AC 2,987 ms
22,604 KB
testcase_17 AC 2,926 ms
22,632 KB
testcase_18 AC 2,932 ms
22,516 KB
testcase_19 AC 490 ms
15,740 KB
testcase_20 AC 971 ms
18,616 KB
testcase_21 AC 505 ms
15,664 KB
testcase_22 AC 28 ms
9,568 KB
testcase_23 AC 29 ms
9,548 KB
testcase_24 AC 27 ms
9,512 KB
testcase_25 AC 27 ms
9,508 KB
testcase_26 AC 29 ms
9,644 KB
testcase_27 AC 28 ms
9,564 KB
testcase_28 AC 26 ms
9,620 KB
testcase_29 AC 27 ms
9,548 KB
testcase_30 AC 30 ms
9,620 KB
testcase_31 AC 25 ms
9,560 KB
testcase_32 AC 27 ms
9,640 KB
testcase_33 AC 33 ms
9,656 KB
testcase_34 AC 53 ms
9,548 KB
testcase_35 AC 3,741 ms
22,528 KB
testcase_36 AC 4,017 ms
22,760 KB
testcase_37 AC 1,511 ms
21,320 KB
testcase_38 AC 3,704 ms
22,692 KB
testcase_39 AC 24 ms
9,636 KB
testcase_40 AC 22 ms
9,620 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

'''
Created on 2015/06/06
'''

def check(x, y):
    for dy in range(-1, 2):
        for dx in range(-1, 2):
            bx, by = x // size + dx, y // size + dy
            if 0 <= bx < 20000 // size + 1 and 0 <= by < 20000 //size + 1:
                for cx, cy in L[bx][by]:
                    if (x-cx)**2 + (y-cy)**2 < 400:
                        return False;
    return True;


n = int(input())
size = 140
L = [[[] for i in range(20000 // size + 1)] for j in range(20000 // size + 1)]

ans = 0
for i in range(n):
    x, y = map(int, input().split())
    if check(x, y):
        ans += 1
        L[x//size][y//size].append((x, y))
print(ans)
0