結果

問題 No.2803 Bocching Star
ユーザー 2000 Ekiben2000 Ekiben
提出日時 2024-07-12 21:24:45
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 717 ms / 2,000 ms
コード長 285 bytes
コンパイル時間 486 ms
コンパイル使用メモリ 12,544 KB
実行使用メモリ 44,520 KB
最終ジャッジ日時 2024-07-12 21:25:00
合計ジャッジ時間 15,176 ms
ジャッジサーバーID
(参考情報)
judge5 / judge3
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 31 ms
10,752 KB
testcase_01 AC 31 ms
10,624 KB
testcase_02 AC 32 ms
10,752 KB
testcase_03 AC 87 ms
14,316 KB
testcase_04 AC 481 ms
36,156 KB
testcase_05 AC 226 ms
24,396 KB
testcase_06 AC 57 ms
13,184 KB
testcase_07 AC 214 ms
20,496 KB
testcase_08 AC 101 ms
16,088 KB
testcase_09 AC 484 ms
38,452 KB
testcase_10 AC 537 ms
39,472 KB
testcase_11 AC 578 ms
39,416 KB
testcase_12 AC 170 ms
19,492 KB
testcase_13 AC 448 ms
34,120 KB
testcase_14 AC 278 ms
26,524 KB
testcase_15 AC 580 ms
39,248 KB
testcase_16 AC 329 ms
26,052 KB
testcase_17 AC 98 ms
15,672 KB
testcase_18 AC 72 ms
14,476 KB
testcase_19 AC 435 ms
34,332 KB
testcase_20 AC 262 ms
25,124 KB
testcase_21 AC 229 ms
21,792 KB
testcase_22 AC 214 ms
21,952 KB
testcase_23 AC 560 ms
40,548 KB
testcase_24 AC 717 ms
44,388 KB
testcase_25 AC 659 ms
43,068 KB
testcase_26 AC 699 ms
43,496 KB
testcase_27 AC 598 ms
41,184 KB
testcase_28 AC 667 ms
42,304 KB
testcase_29 AC 642 ms
40,768 KB
testcase_30 AC 693 ms
43,752 KB
testcase_31 AC 598 ms
40,296 KB
testcase_32 AC 716 ms
44,520 KB
testcase_33 AC 34 ms
11,136 KB
testcase_34 AC 36 ms
11,136 KB
testcase_35 AC 35 ms
11,008 KB
testcase_36 AC 35 ms
10,880 KB
testcase_37 AC 34 ms
11,136 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

def f(N, S, P):
    A = sorted((P[i], i + 1) for i in range(N))
    I = [A[i][1] for i in range(N) if (i == 0 or A[i][0] - A[i-1][0] > S) and (i == N-1 or A[i+1][0] - A[i][0] > S)]
    print(len(I))
    print(*sorted(I))

f(*map(int, input().split()), list(map(int, input().split())))
0