結果
| 問題 | No.451 575 |
| コンテスト | |
| ユーザー |
hanorver
|
| 提出日時 | 2016-12-02 10:24:27 |
| 言語 | Python3 (3.14.3 + numpy 2.4.4 + scipy 1.17.1) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 272 bytes |
| 記録 | |
| コンパイル時間 | 373 ms |
| コンパイル使用メモリ | 20,700 KB |
| 実行使用メモリ | 22,492 KB |
| 最終ジャッジ日時 | 2026-05-26 14:03:06 |
| 合計ジャッジ時間 | 8,826 ms |
|
ジャッジサーバーID (参考情報) |
judge1_0 / judge3_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 4 |
| other | AC * 13 WA * 7 TLE * 1 -- * 8 |
ソースコード
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 a[i+1]<=0:a[0]=-a[i+1]+1;i=-1;m+=1 if m==1000:print(-1);exit() i+=1 if a[0]<=0:print(-1);exit() print(n+1) for _ in range(n+1):print(a[_])
hanorver