結果
| 問題 | No.467 隠されていたゲーム |
| コンテスト | |
| ユーザー |
picares9ue
|
| 提出日時 | 2016-12-18 13:21:11 |
| 言語 | Python3 (3.14.3 + numpy 2.4.4 + scipy 1.17.1) |
| 結果 |
AC
|
| 実行時間 | 145 ms / 2,000 ms |
| コード長 | 606 bytes |
| 記録 | |
| コンパイル時間 | 869 ms |
| コンパイル使用メモリ | 20,824 KB |
| 実行使用メモリ | 15,488 KB |
| 最終ジャッジ日時 | 2026-04-20 10:59:15 |
| 合計ジャッジ時間 | 4,222 ms |
|
ジャッジサーバーID (参考情報) |
judge3_0 / judge2_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 24 |
ソースコード
#要はxとyの値の大きい方に引っ張られる距離だな
n = int(input())
d = sorted([int(i) for i in input().split()])
x, y = [abs(int(i)) for i in input().split()]
def func(n, d, x, y):
d_max = d[-1]
ans = -1
if max(x, y)==0:
ans=0
else:
for m in d:
if m==max(x, y):
ans = 1
if ans==-1:
if max(x, y)>2*d_max:
c = max(x, y)//d_max
if max(x,y)%d_max==0:
ans+=c+1
else:
ans+=c+2
else:
ans=2
return ans
print(func(n, d, x, y))
picares9ue