結果

問題 No.1110 好きな歌
ユーザー tonnnura172tonnnura172
提出日時 2020-07-11 05:29:30
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 518 ms / 5,000 ms
コード長 868 bytes
コンパイル時間 92 ms
コンパイル使用メモリ 12,544 KB
実行使用メモリ 21,768 KB
最終ジャッジ日時 2024-04-20 12:18:34
合計ジャッジ時間 15,761 ms
ジャッジサーバーID
(参考情報)
judge1 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 34 ms
11,008 KB
testcase_01 AC 31 ms
11,008 KB
testcase_02 AC 31 ms
11,136 KB
testcase_03 AC 32 ms
11,008 KB
testcase_04 AC 32 ms
11,136 KB
testcase_05 AC 31 ms
11,008 KB
testcase_06 AC 31 ms
11,136 KB
testcase_07 AC 32 ms
11,136 KB
testcase_08 AC 32 ms
11,136 KB
testcase_09 AC 30 ms
11,008 KB
testcase_10 AC 32 ms
11,136 KB
testcase_11 AC 31 ms
11,008 KB
testcase_12 AC 31 ms
11,136 KB
testcase_13 AC 31 ms
11,136 KB
testcase_14 AC 32 ms
11,136 KB
testcase_15 AC 29 ms
11,136 KB
testcase_16 AC 32 ms
11,264 KB
testcase_17 AC 32 ms
11,136 KB
testcase_18 AC 31 ms
11,136 KB
testcase_19 AC 34 ms
11,264 KB
testcase_20 AC 33 ms
11,264 KB
testcase_21 AC 33 ms
11,136 KB
testcase_22 AC 31 ms
11,264 KB
testcase_23 AC 31 ms
11,008 KB
testcase_24 AC 293 ms
17,184 KB
testcase_25 AC 344 ms
18,632 KB
testcase_26 AC 197 ms
14,972 KB
testcase_27 AC 349 ms
18,536 KB
testcase_28 AC 206 ms
15,616 KB
testcase_29 AC 440 ms
19,740 KB
testcase_30 AC 196 ms
15,488 KB
testcase_31 AC 134 ms
13,696 KB
testcase_32 AC 464 ms
20,580 KB
testcase_33 AC 209 ms
16,108 KB
testcase_34 AC 290 ms
17,892 KB
testcase_35 AC 443 ms
21,768 KB
testcase_36 AC 78 ms
12,544 KB
testcase_37 AC 151 ms
14,080 KB
testcase_38 AC 409 ms
19,752 KB
testcase_39 AC 313 ms
17,592 KB
testcase_40 AC 339 ms
19,356 KB
testcase_41 AC 56 ms
11,776 KB
testcase_42 AC 405 ms
20,456 KB
testcase_43 AC 413 ms
19,540 KB
testcase_44 AC 453 ms
21,480 KB
testcase_45 AC 482 ms
21,604 KB
testcase_46 AC 462 ms
21,660 KB
testcase_47 AC 511 ms
21,476 KB
testcase_48 AC 488 ms
21,608 KB
testcase_49 AC 414 ms
21,636 KB
testcase_50 AC 475 ms
21,528 KB
testcase_51 AC 466 ms
21,480 KB
testcase_52 AC 489 ms
21,404 KB
testcase_53 AC 518 ms
21,660 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys, re
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians, gcd, log2
from itertools import accumulate, permutations, combinations, product
from operator import itemgetter, mul, add
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits
from bisect import bisect, bisect_left
from heapq import heappush, heappop
from functools import reduce, lru_cache
def input(): return sys.stdin.buffer.readline()[:-1]
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(): return list(map(int, input().split()))
def ZIP(n): return zip(*(MAP() for _ in range(n)))
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
mod = 10 ** 9 + 7

N, D = MAP()
A = [INT() for _ in range(N)]
sorted_A = sorted(A)
for a in A:
    print(bisect(sorted_A, a-D))
0