結果
| 問題 |
No.871 かえるのうた
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2019-09-03 14:18:33 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
RE
|
| 実行時間 | - |
| コード長 | 345 bytes |
| コンパイル時間 | 345 ms |
| コンパイル使用メモリ | 12,288 KB |
| 実行使用メモリ | 53,004 KB |
| 最終ジャッジ日時 | 2024-12-24 00:52:43 |
| 合計ジャッジ時間 | 43,926 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 9 WA * 15 RE * 13 TLE * 12 |
ソースコード
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))