結果
問題 | No.2923 Mayor's Job |
ユーザー |
![]() |
提出日時 | 2024-09-30 22:22:33 |
言語 | PyPy3 (7.3.15) |
結果 |
RE
|
実行時間 | - |
コード長 | 679 bytes |
コンパイル時間 | 369 ms |
コンパイル使用メモリ | 82,176 KB |
実行使用メモリ | 65,152 KB |
最終ジャッジ日時 | 2024-09-30 22:22:36 |
合計ジャッジ時間 | 2,889 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | RE * 3 |
other | RE * 17 |
ソースコード
def test(N,K,H,L):assert 1 <= N <= 2000assert 1 <= K <= 10**9assert len(H) == Nassert all(1 <= h <= 10**9 for h in H)assert len(L) == Nassert all(len(l) == 2 for l in L)assert all(all(1 <= x <= 10**9 for x in l) for l in L)def solve():N,K = map(int,input().split())H = list(map(int,input().split()))L = [list(map(int,input().split())) for _ in range(N)]test(N,K,H,L)ans = Nfor i in range(N):for j in range(N):if (L[i][0]-L[j][0])**2+(L[i][1]-L[j][1])**2 <= K**2:if H[i] < H[j]:ans -= 1breakprint(ans)test()solve()