結果

問題 No.1884 Sequence
ユーザー ikomaikoma
提出日時 2022-03-25 23:05:39
言語 PyPy3
(7.3.15)
結果
RE  
実行時間 -
コード長 495 bytes
コンパイル時間 419 ms
コンパイル使用メモリ 82,504 KB
実行使用メモリ 179,536 KB
最終ジャッジ日時 2024-04-22 07:57:50
合計ジャッジ時間 6,225 ms
ジャッジサーバーID
(参考情報)
judge5 / judge3
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 37 ms
52,692 KB
testcase_01 AC 36 ms
51,952 KB
testcase_02 AC 35 ms
53,280 KB
testcase_03 RE -
testcase_04 RE -
testcase_05 AC 36 ms
52,316 KB
testcase_06 AC 35 ms
53,616 KB
testcase_07 AC 34 ms
53,356 KB
testcase_08 AC 35 ms
52,760 KB
testcase_09 AC 35 ms
53,244 KB
testcase_10 AC 138 ms
117,716 KB
testcase_11 AC 134 ms
117,748 KB
testcase_12 WA -
testcase_13 WA -
testcase_14 AC 65 ms
90,508 KB
testcase_15 AC 111 ms
106,588 KB
testcase_16 AC 140 ms
117,876 KB
testcase_17 AC 82 ms
106,324 KB
testcase_18 AC 90 ms
106,536 KB
testcase_19 AC 84 ms
103,792 KB
testcase_20 AC 103 ms
105,340 KB
testcase_21 AC 92 ms
107,040 KB
testcase_22 AC 105 ms
105,944 KB
testcase_23 AC 144 ms
117,740 KB
testcase_24 AC 139 ms
117,728 KB
testcase_25 AC 138 ms
116,868 KB
testcase_26 AC 147 ms
118,656 KB
testcase_27 RE -
testcase_28 RE -
testcase_29 AC 71 ms
96,592 KB
testcase_30 AC 66 ms
97,288 KB
testcase_31 AC 120 ms
107,088 KB
testcase_32 AC 199 ms
179,536 KB
testcase_33 AC 107 ms
116,536 KB
testcase_34 AC 105 ms
116,252 KB
testcase_35 AC 77 ms
99,640 KB
testcase_36 AC 108 ms
106,464 KB
testcase_37 AC 106 ms
116,532 KB
testcase_38 AC 104 ms
114,676 KB
testcase_39 AC 84 ms
104,364 KB
testcase_40 AC 91 ms
105,696 KB
testcase_41 AC 133 ms
110,672 KB
testcase_42 AC 133 ms
109,780 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys
input = sys.stdin.readline

def solve():
    N=int(input())
    A=list(map(int,input().split()))
    A.sort()
    cnt0=0
    d_lst = []
    for i in range(N-1):
        if A[i]==0:
            cnt0+=1
            continue
        d = A[i+1]-A[i]
        d_lst.append(d)
    d_min = min(d_lst)
    if d_min==0:
        return len(set(A)-set([0]))==1
    for d in d_lst:
        if d%d_min!=0:return False
        cnt0 -= d//d_min-1
    return cnt0>=0

print("Yes" if solve() else "No")
0