結果

問題 No.512 魔法少女の追いかけっこ
コンテスト
ユーザー r_ishida
提出日時 2026-01-10 13:15:47
言語 Python3
(3.14.2 + numpy 2.4.0 + scipy 1.16.3)
結果
AC  
実行時間 160 ms / 2,000 ms
コード長 452 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 561 ms
コンパイル使用メモリ 20,936 KB
実行使用メモリ 15,616 KB
最終ジャッジ日時 2026-01-10 13:15:58
合計ジャッジ時間 9,846 ms
ジャッジサーバーID
(参考情報)
judge3 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 53
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

import math
import sys
def S(): return sys.stdin.readline().rstrip()
def I(): return int(sys.stdin.readline().rstrip())
def MI(): return map(int, sys.stdin.readline().rstrip().split())
def LI(): return list(map(int, sys.stdin.readline().rstrip().split()))
def LS(): return list(sys.stdin.readline().rstrip().split())

x, y = MI()
n = I()
a = LI()

for i in range(n-1):
    if a[i+1]*x < a[i]*y:
        print("NO")
        break
else:
    print("YES")
0