結果
問題 | No.1884 Sequence |
ユーザー | Goltermann大和 |
提出日時 | 2022-03-25 22:48:45 |
言語 | Python3 (3.12.2 + numpy 1.26.4 + scipy 1.12.0) |
結果 |
RE
|
実行時間 | - |
コード長 | 573 bytes |
コンパイル時間 | 190 ms |
コンパイル使用メモリ | 10,908 KB |
実行使用メモリ | 40,164 KB |
最終ジャッジ日時 | 2023-08-04 09:50:35 |
合計ジャッジ時間 | 7,355 ms |
ジャッジサーバーID (参考情報) |
judge14 / judge11 |
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 16 ms
7,804 KB |
testcase_01 | AC | 14 ms
7,764 KB |
testcase_02 | AC | 13 ms
8,172 KB |
testcase_03 | RE | - |
testcase_04 | RE | - |
testcase_05 | AC | 13 ms
8,196 KB |
testcase_06 | AC | 13 ms
8,192 KB |
testcase_07 | AC | 14 ms
7,688 KB |
testcase_08 | AC | 13 ms
8,192 KB |
testcase_09 | RE | - |
testcase_10 | AC | 208 ms
31,544 KB |
testcase_11 | AC | 213 ms
31,492 KB |
testcase_12 | WA | - |
testcase_13 | WA | - |
testcase_14 | AC | 59 ms
11,188 KB |
testcase_15 | AC | 177 ms
20,356 KB |
testcase_16 | AC | 282 ms
31,584 KB |
testcase_17 | AC | 107 ms
19,260 KB |
testcase_18 | AC | 151 ms
21,884 KB |
testcase_19 | AC | 121 ms
18,712 KB |
testcase_20 | AC | 131 ms
18,188 KB |
testcase_21 | AC | 96 ms
16,632 KB |
testcase_22 | AC | 132 ms
19,464 KB |
testcase_23 | AC | 284 ms
29,988 KB |
testcase_24 | AC | 280 ms
31,488 KB |
testcase_25 | AC | 250 ms
29,952 KB |
testcase_26 | AC | 282 ms
31,524 KB |
testcase_27 | RE | - |
testcase_28 | RE | - |
testcase_29 | AC | 68 ms
11,924 KB |
testcase_30 | AC | 67 ms
11,920 KB |
testcase_31 | RE | - |
testcase_32 | RE | - |
testcase_33 | RE | - |
testcase_34 | RE | - |
testcase_35 | RE | - |
testcase_36 | RE | - |
testcase_37 | RE | - |
testcase_38 | RE | - |
testcase_39 | RE | - |
testcase_40 | RE | - |
testcase_41 | AC | 235 ms
26,104 KB |
testcase_42 | AC | 230 ms
26,032 KB |
ソースコード
import sys n = int(input()) a = list(map(int,input().split())) a_plus = [] zero_count = 0 for _ in a: if _ != 0: a_plus.append(_) else: zero_count += 1 a_plus.sort() a_dfr = [a_plus[i+1]-a_plus[i] for i in range(len(a_plus)-1)] min_dfr = min(a_dfr) if min_dfr == 0 and (1 in set(a_plus)) and len(set(a_plus))==1: print("Yes") sys.exit() mlt_count = 0 for j in a_dfr: if j%min_dfr==0: mlt_count += (j//min_dfr)-1 else: print("No") sys.exit() if mlt_count <= zero_count: print("Yes") else: print("No")