結果

問題 No.512 魔法少女の追いかけっこ
ユーザー ys
提出日時 2018-08-25 07:22:21
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
AC  
実行時間 32 ms / 2,000 ms
コード長 223 bytes
コンパイル時間 90 ms
コンパイル使用メモリ 12,672 KB
実行使用メモリ 10,880 KB
最終ジャッジ日時 2024-06-24 10:16:57
合計ジャッジ時間 3,079 ms
ジャッジサーバーID
(参考情報)
judge2 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 53
権限があれば一括ダウンロードができます

ソースコード

diff #

x, y = map(int, input().split())
n = int(input())
a = list(map(int, input().split()))

flag = True
for i in range(n - 1):
    if a[i] * y > a[i + 1] * x:
        flag = False

if flag:
    print("YES")
else:
    print("NO")
0