結果

問題 No.512 魔法少女の追いかけっこ
ユーザー MitI_7
提出日時 2017-05-22 13:35:22
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
WA  
実行時間 -
コード長 448 bytes
コンパイル時間 82 ms
コンパイル使用メモリ 12,544 KB
実行使用メモリ 10,880 KB
最終ジャッジ日時 2024-06-27 06:28:50
合計ジャッジ時間 2,992 ms
ジャッジサーバーID
(参考情報)
judge1 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 48 WA * 5
権限があれば一括ダウンロードができます

ソースコード

diff #

from collections import defaultdict
from bisect import bisect

def main():
    X, Y = map(int, input().split())
    N = int(input())
    A_list = list(map(int, input().split()))

    for i in range(N):
        a = A_list[i]
        t = a / X
        s = Y * t
        p = bisect(A_list, s)
        if p > i + 1 and A_list[i + 1] != s:
            print("NO")
            break
    else:
        print("YES")


if __name__ == '__main__':
    main()
0