結果

問題 No.202 1円玉投げ
ユーザー ayaoniayaoni
提出日時 2021-08-30 21:57:24
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 302 ms / 5,000 ms
コード長 1,093 bytes
コンパイル時間 303 ms
コンパイル使用メモリ 86,900 KB
実行使用メモリ 110,732 KB
最終ジャッジ日時 2023-08-24 00:22:41
合計ジャッジ時間 8,869 ms
ジャッジサーバーID
(参考情報)
judge13 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 225 ms
107,020 KB
testcase_01 AC 262 ms
110,732 KB
testcase_02 AC 93 ms
89,364 KB
testcase_03 AC 93 ms
89,404 KB
testcase_04 AC 93 ms
89,496 KB
testcase_05 AC 116 ms
90,892 KB
testcase_06 AC 252 ms
107,240 KB
testcase_07 AC 292 ms
109,720 KB
testcase_08 AC 282 ms
109,364 KB
testcase_09 AC 210 ms
102,848 KB
testcase_10 AC 158 ms
99,360 KB
testcase_11 AC 188 ms
102,976 KB
testcase_12 AC 198 ms
102,624 KB
testcase_13 AC 159 ms
99,432 KB
testcase_14 AC 120 ms
90,928 KB
testcase_15 AC 205 ms
102,820 KB
testcase_16 AC 197 ms
109,320 KB
testcase_17 AC 197 ms
107,604 KB
testcase_18 AC 199 ms
107,672 KB
testcase_19 AC 199 ms
103,504 KB
testcase_20 AC 249 ms
106,304 KB
testcase_21 AC 199 ms
102,532 KB
testcase_22 AC 106 ms
91,084 KB
testcase_23 AC 104 ms
91,036 KB
testcase_24 AC 108 ms
91,040 KB
testcase_25 AC 112 ms
90,872 KB
testcase_26 AC 109 ms
91,004 KB
testcase_27 AC 113 ms
90,884 KB
testcase_28 AC 108 ms
90,912 KB
testcase_29 AC 115 ms
90,972 KB
testcase_30 AC 110 ms
91,240 KB
testcase_31 AC 104 ms
90,892 KB
testcase_32 AC 111 ms
90,796 KB
testcase_33 AC 114 ms
91,148 KB
testcase_34 AC 117 ms
91,112 KB
testcase_35 AC 202 ms
106,960 KB
testcase_36 AC 228 ms
108,300 KB
testcase_37 AC 302 ms
108,912 KB
testcase_38 AC 207 ms
107,596 KB
testcase_39 AC 101 ms
91,064 KB
testcase_40 AC 99 ms
89,856 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys
def I(): return int(sys.stdin.readline().rstrip())
def MI(): return map(int,sys.stdin.readline().rstrip().split())
def LI(): return list(map(int,sys.stdin.readline().rstrip().split()))
def LI2(): return list(map(int,sys.stdin.readline().rstrip()))
def S(): return sys.stdin.readline().rstrip()
def LS(): return list(sys.stdin.readline().rstrip().split())
def LS2(): return list(sys.stdin.readline().rstrip())


N = I()

area = [[[] for _ in range(801)] for _ in range(801)]
XY = []
R = [-1,0,1]
ans = 0
for k in range(N):
    x,y = MI()
    XY.append((x,y))
    i = x//25
    j = y//25
    is_eliminated = 0
    for di in R:
        ni = i+di
        if not (0 <= ni < 801):
            continue
        for dj in R:
            nj = j+dj
            if not (0 <= nj < 801):
                continue
            for l in area[ni][nj]:
                xl,yl = XY[l]
                if (x-xl)**2+(y-yl)**2 < 400:
                    is_eliminated = 1
                    break
    if is_eliminated:
        continue
    else:
        area[i][j].append(k)
        ans += 1

print(ans)
0