結果

問題 No.1884 Sequence
ユーザー ikomaikoma
提出日時 2022-03-25 23:08:05
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 520 bytes
コンパイル時間 377 ms
コンパイル使用メモリ 82,560 KB
実行使用メモリ 180,808 KB
最終ジャッジ日時 2024-04-22 08:00:43
合計ジャッジ時間 7,039 ms
ジャッジサーバーID
(参考情報)
judge2 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 37 ms
52,224 KB
testcase_01 AC 38 ms
52,224 KB
testcase_02 AC 37 ms
51,968 KB
testcase_03 AC 37 ms
51,456 KB
testcase_04 AC 37 ms
52,096 KB
testcase_05 AC 37 ms
52,224 KB
testcase_06 AC 37 ms
52,096 KB
testcase_07 AC 43 ms
51,968 KB
testcase_08 AC 37 ms
51,968 KB
testcase_09 AC 38 ms
52,096 KB
testcase_10 AC 218 ms
180,492 KB
testcase_11 AC 218 ms
180,140 KB
testcase_12 WA -
testcase_13 WA -
testcase_14 AC 75 ms
91,136 KB
testcase_15 AC 151 ms
112,440 KB
testcase_16 AC 213 ms
180,388 KB
testcase_17 AC 108 ms
122,212 KB
testcase_18 AC 129 ms
116,968 KB
testcase_19 AC 115 ms
127,824 KB
testcase_20 AC 137 ms
115,584 KB
testcase_21 AC 118 ms
118,528 KB
testcase_22 AC 141 ms
118,076 KB
testcase_23 AC 217 ms
180,456 KB
testcase_24 AC 218 ms
180,248 KB
testcase_25 AC 217 ms
179,224 KB
testcase_26 AC 227 ms
180,808 KB
testcase_27 AC 74 ms
95,488 KB
testcase_28 AC 73 ms
95,488 KB
testcase_29 AC 75 ms
95,744 KB
testcase_30 AC 75 ms
95,232 KB
testcase_31 AC 130 ms
125,184 KB
testcase_32 AC 224 ms
179,300 KB
testcase_33 AC 99 ms
102,248 KB
testcase_34 AC 100 ms
101,804 KB
testcase_35 AC 74 ms
96,512 KB
testcase_36 AC 97 ms
100,224 KB
testcase_37 AC 115 ms
116,140 KB
testcase_38 AC 114 ms
113,844 KB
testcase_39 AC 92 ms
103,808 KB
testcase_40 AC 98 ms
105,984 KB
testcase_41 AC 201 ms
155,920 KB
testcase_42 AC 193 ms
155,276 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys
input = sys.stdin.readline

def solve():
    N=int(input())
    A=list(map(int,input().split()))
    if len(set(A)-set([0]))<=1:return True
    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 False
    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