結果
問題 | No.451 575 |
ユーザー | tnodino |
提出日時 | 2023-07-09 19:04:23 |
言語 | Python3 (3.12.2 + numpy 1.26.4 + scipy 1.12.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 301 bytes |
コンパイル時間 | 73 ms |
コンパイル使用メモリ | 10,696 KB |
実行使用メモリ | 17,004 KB |
最終ジャッジ日時 | 2023-09-30 22:39:57 |
合計ジャッジ時間 | 8,054 ms |
ジャッジサーバーID (参考情報) |
judge11 / judge13 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 16 ms
7,780 KB |
testcase_01 | AC | 16 ms
7,944 KB |
testcase_02 | WA | - |
testcase_03 | AC | 16 ms
7,844 KB |
testcase_04 | AC | 17 ms
8,184 KB |
testcase_05 | AC | 27 ms
8,340 KB |
testcase_06 | AC | 50 ms
8,840 KB |
testcase_07 | AC | 196 ms
11,944 KB |
testcase_08 | AC | 16 ms
7,820 KB |
testcase_09 | WA | - |
testcase_10 | WA | - |
testcase_11 | WA | - |
testcase_12 | WA | - |
testcase_13 | AC | 311 ms
15,908 KB |
testcase_14 | WA | - |
testcase_15 | WA | - |
testcase_16 | WA | - |
testcase_17 | WA | - |
testcase_18 | WA | - |
testcase_19 | WA | - |
testcase_20 | WA | - |
testcase_21 | WA | - |
testcase_22 | AC | 16 ms
7,816 KB |
testcase_23 | WA | - |
testcase_24 | WA | - |
testcase_25 | AC | 16 ms
7,864 KB |
testcase_26 | WA | - |
testcase_27 | AC | 16 ms
8,116 KB |
testcase_28 | WA | - |
testcase_29 | WA | - |
testcase_30 | WA | - |
testcase_31 | WA | - |
testcase_32 | AC | 77 ms
9,372 KB |
ソースコード
n = int(input()) b = list(int(input()) for _ in range(n)) for i in range(1,n,2): if b[i-1] < b[i]: print(-1) exit() a = [1] for i in range(n): if i % 2 == 0: a.append(b[i] - a[-1]) else: a.append(a[-1] - b[i]) print(n+1) for i in range(n+1): print(a[i])