結果
| 問題 |
No.602 隠されていたゲーム2
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2017-12-02 04:37:24 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 429 bytes |
| コンパイル時間 | 89 ms |
| コンパイル使用メモリ | 12,416 KB |
| 実行使用メモリ | 21,776 KB |
| 最終ジャッジ日時 | 2024-11-28 02:42:21 |
| 合計ジャッジ時間 | 1,874 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 WA * 1 |
| other | AC * 5 WA * 16 |
ソースコード
from bisect import bisect_left
def main():
N = int(input())
D = tuple(map(int, input().split()))
X, Y = map(int, input().split())
goal = abs(X) + abs(Y)
if goal == 0:
print(0)
elif bisect_left(D, goal) < N:
print(1)
else:
for i in D:
if bisect_left(D, abs(goal - i)) < N:
print(2)
break
else:
print(-1)
main()