結果
| 問題 | No.871 かえるのうた |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2019-09-03 14:18:33 |
| 言語 | Python3 (3.14.3 + numpy 2.4.4 + scipy 1.17.1) |
| 結果 |
RE
|
| 実行時間 | - |
| コード長 | 345 bytes |
| 記録 | |
| コンパイル時間 | 565 ms |
| コンパイル使用メモリ | 20,696 KB |
| 実行使用メモリ | 31,620 KB |
| 最終ジャッジ日時 | 2026-05-29 21:41:56 |
| 合計ジャッジ時間 | 12,734 ms |
|
ジャッジサーバーID (参考情報) |
judge3_0 / judge2_1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 3 WA * 9 RE * 6 TLE * 2 -- * 29 |
ソースコード
N, K = map(int, input().split())
X = list(map(int, input().split()))
A = list(map(int, input().split()))
hear = [K-1]
cried = set()
while len(hear):
h = hear.pop()
cried.add(h)
for i, c in enumerate(X):
if X[h] - A[h] <= c <= X[h] + A[h] and i not in cried:
hear.append(i)
X.pop(i)
print(len(cried))