結果

問題 No.467 隠されていたゲーム
ユーザー mkawa2mkawa2
提出日時 2020-01-02 08:47:11
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 543 ms / 2,000 ms
コード長 1,022 bytes
コンパイル時間 268 ms
コンパイル使用メモリ 12,672 KB
実行使用メモリ 44,496 KB
最終ジャッジ日時 2024-05-02 06:12:18
合計ジャッジ時間 15,436 ms
ジャッジサーバーID
(参考情報)
judge2 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 508 ms
44,484 KB
testcase_01 AC 510 ms
44,492 KB
testcase_02 AC 508 ms
44,484 KB
testcase_03 AC 504 ms
44,488 KB
testcase_04 AC 519 ms
44,484 KB
testcase_05 AC 504 ms
44,480 KB
testcase_06 AC 505 ms
44,356 KB
testcase_07 AC 502 ms
44,488 KB
testcase_08 AC 519 ms
44,364 KB
testcase_09 AC 516 ms
44,484 KB
testcase_10 AC 538 ms
44,356 KB
testcase_11 AC 525 ms
44,488 KB
testcase_12 AC 531 ms
44,488 KB
testcase_13 AC 529 ms
44,488 KB
testcase_14 AC 523 ms
44,484 KB
testcase_15 AC 527 ms
44,496 KB
testcase_16 AC 516 ms
44,484 KB
testcase_17 AC 535 ms
44,480 KB
testcase_18 AC 507 ms
44,364 KB
testcase_19 AC 506 ms
44,480 KB
testcase_20 AC 510 ms
44,352 KB
testcase_21 AC 531 ms
44,356 KB
testcase_22 AC 534 ms
44,484 KB
testcase_23 AC 516 ms
44,360 KB
testcase_24 AC 503 ms
44,496 KB
testcase_25 AC 529 ms
44,480 KB
testcase_26 AC 543 ms
44,480 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

from itertools import *
from bisect import *
from math import *
from collections import *
from heapq import *
from random import *
from decimal import *
import numpy as np
import sys

sys.setrecursionlimit(10 ** 6)
int1 = lambda x: int(x) - 1
p2D = lambda x: print(*x, sep="\n")
def II(): return int(sys.stdin.readline())
def MI(): return map(int, sys.stdin.readline().split())
def MI1(): return map(int1, sys.stdin.readline().split())
def MF(): return map(float, sys.stdin.readline().split())
def LI(): return list(map(int, sys.stdin.readline().split()))
def LI1(): return list(map(int1, sys.stdin.readline().split()))
def LF(): return list(map(float, sys.stdin.readline().split()))
def LLI(rows_number): return [LI() for _ in range(rows_number)]
dij = [(1, 0), (0, 1), (-1, 0), (0, -1)]

def main():
    n=II()
    dd=LI()
    x,y=MI()
    dist=max(abs(x),abs(y))
    if dist==0:
        print(0)
        exit()
    if dist in dd:
        print(1)
        exit()
    mx=max(dd)
    print(max(2,(dist+mx-1)//mx))

main()
0