結果
| 問題 |
No.451 575
|
| コンテスト | |
| ユーザー |
hanorver
|
| 提出日時 | 2016-12-02 10:29:09 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
TLE
|
| 実行時間 | - |
| コード長 | 287 bytes |
| コンパイル時間 | 220 ms |
| コンパイル使用メモリ | 12,544 KB |
| 実行使用メモリ | 18,688 KB |
| 最終ジャッジ日時 | 2024-12-16 10:09:24 |
| 合計ジャッジ時間 | 9,673 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 4 |
| other | AC * 28 TLE * 1 |
ソースコード
n=int(input()) b=[int(input()) for _ in range(n)] i=m=0 a=[1]*(n+1) while i<n: if i%2:a[i+1]=a[i]-b[i] else:a[i+1]=b[i]-a[i] if 0>=a[i+1]or a[i+1]>10**18:a[0]+=-a[i+1]+1;i=-1;m+=1 if m==100:print(-1);exit() i+=1 if a[0]<=0:print(-1);exit() print(n+1) for _ in range(n+1):print(a[_])
hanorver