結果

問題 No.467 隠されていたゲーム
ユーザー persimmon-persimmonpersimmon-persimmon
提出日時 2021-06-17 14:44:53
言語 PyPy3
(7.3.13)
結果
AC  
実行時間 67 ms / 2,000 ms
コード長 559 bytes
コンパイル時間 621 ms
コンパイル使用メモリ 87,052 KB
実行使用メモリ 71,632 KB
最終ジャッジ日時 2023-08-30 22:14:09
合計ジャッジ時間 3,529 ms
ジャッジサーバーID
(参考情報)
judge12 / judge11
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 65 ms
71,308 KB
testcase_01 AC 64 ms
71,444 KB
testcase_02 AC 64 ms
71,408 KB
testcase_03 AC 65 ms
71,380 KB
testcase_04 AC 64 ms
71,296 KB
testcase_05 AC 66 ms
71,360 KB
testcase_06 AC 65 ms
71,428 KB
testcase_07 AC 67 ms
71,412 KB
testcase_08 AC 65 ms
71,484 KB
testcase_09 AC 65 ms
71,632 KB
testcase_10 AC 62 ms
71,316 KB
testcase_11 AC 63 ms
71,420 KB
testcase_12 AC 63 ms
71,320 KB
testcase_13 AC 65 ms
71,180 KB
testcase_14 AC 64 ms
71,316 KB
testcase_15 AC 64 ms
71,552 KB
testcase_16 AC 65 ms
71,336 KB
testcase_17 AC 64 ms
71,168 KB
testcase_18 AC 66 ms
71,500 KB
testcase_19 AC 67 ms
71,452 KB
testcase_20 AC 64 ms
71,524 KB
testcase_21 AC 63 ms
71,604 KB
testcase_22 AC 65 ms
71,312 KB
testcase_23 AC 65 ms
71,368 KB
testcase_24 AC 63 ms
71,168 KB
testcase_25 AC 67 ms
71,336 KB
testcase_26 AC 67 ms
71,448 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

"""
x,y=5,4
d=2,2,11
(0,0)->(11,4)->(9,4)->(7,4)->(5,4)
(0,0)->(11,4)->(9,4)->(7,4)->(5,4)
(0,0)->(11,-7)->(5,4)
x,y=5,4
d=2,9
(0,0)->(9,-5)->(5,4)
移動dを2回行えば(-2*d,-2*d)~(2*d,2*d)の四角領域すべていける
移動dを3回行えば(-3*d,-3*d)~(3*d,3*d)の四角領域すべていける
"""
n=int(input())
d=list(map(int,input().split()))
d.sort()
x,y=map(int,input().split())
x,y=abs(x),abs(y)
if x<y:x,y=y,x
# 0<=y<=x

if x==0:
  print(0)
  exit()
if x in d:
  print(1)
  exit()
if x<=2*d[-1]:
  print(2)
  exit()
print((x+d[-1]-1)//d[-1])
0