結果

問題 No.512 魔法少女の追いかけっこ
ユーザー kawacchukawacchu
提出日時 2019-10-09 18:11:46
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 20 ms / 2,000 ms
コード長 357 bytes
コンパイル時間 132 ms
コンパイル使用メモリ 10,588 KB
実行使用メモリ 9,152 KB
最終ジャッジ日時 2023-08-10 23:21:39
合計ジャッジ時間 3,344 ms
ジャッジサーバーID
(参考情報)
judge11 / judge12
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 20 ms
8,920 KB
testcase_01 AC 20 ms
8,976 KB
testcase_02 AC 20 ms
9,064 KB
testcase_03 AC 20 ms
8,936 KB
testcase_04 AC 20 ms
9,152 KB
testcase_05 AC 19 ms
9,040 KB
testcase_06 AC 19 ms
8,944 KB
testcase_07 AC 19 ms
9,076 KB
testcase_08 AC 19 ms
8,932 KB
testcase_09 AC 19 ms
9,004 KB
testcase_10 AC 19 ms
9,148 KB
testcase_11 AC 19 ms
9,068 KB
testcase_12 AC 19 ms
8,960 KB
testcase_13 AC 19 ms
8,992 KB
testcase_14 AC 20 ms
8,908 KB
testcase_15 AC 20 ms
9,140 KB
testcase_16 AC 19 ms
9,116 KB
testcase_17 AC 19 ms
8,984 KB
testcase_18 AC 19 ms
9,116 KB
testcase_19 AC 19 ms
9,004 KB
testcase_20 AC 20 ms
8,972 KB
testcase_21 AC 20 ms
8,956 KB
testcase_22 AC 19 ms
8,904 KB
testcase_23 AC 20 ms
8,888 KB
testcase_24 AC 20 ms
8,848 KB
testcase_25 AC 20 ms
9,104 KB
testcase_26 AC 19 ms
8,932 KB
testcase_27 AC 19 ms
8,948 KB
testcase_28 AC 20 ms
9,100 KB
testcase_29 AC 20 ms
9,092 KB
testcase_30 AC 19 ms
9,052 KB
testcase_31 AC 20 ms
9,080 KB
testcase_32 AC 19 ms
8,968 KB
testcase_33 AC 19 ms
8,924 KB
testcase_34 AC 19 ms
8,900 KB
testcase_35 AC 20 ms
8,956 KB
testcase_36 AC 20 ms
9,056 KB
testcase_37 AC 20 ms
9,112 KB
testcase_38 AC 20 ms
9,116 KB
testcase_39 AC 19 ms
8,908 KB
testcase_40 AC 19 ms
8,956 KB
testcase_41 AC 19 ms
8,952 KB
testcase_42 AC 20 ms
9,060 KB
testcase_43 AC 20 ms
8,884 KB
testcase_44 AC 20 ms
8,984 KB
testcase_45 AC 20 ms
8,976 KB
testcase_46 AC 20 ms
9,132 KB
testcase_47 AC 20 ms
9,108 KB
testcase_48 AC 20 ms
8,900 KB
testcase_49 AC 20 ms
9,128 KB
testcase_50 AC 20 ms
9,056 KB
testcase_51 AC 20 ms
8,912 KB
testcase_52 AC 20 ms
9,116 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

from decimal import Decimal

X,Y = map(int,input().split())
N = int(input())
A = list(map(Decimal,input().split()))


c = Decimal(Y) / Decimal(X)

for i in range(N-1) :
    if A[i+1] < float(A[i] * c) :
        print("NO")
        #print("i: {}, A[i]: {}, A[i+1]: {}, c: {}, A[i]*c: {}".format(i,A[i],A[i+1],c,A[i]*c))
        break
else :
    print("YES")
0