結果
| 問題 |
No.451 575
|
| コンテスト | |
| ユーザー |
hanorver
|
| 提出日時 | 2016-12-02 10:58:41 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 258 bytes |
| コンパイル時間 | 288 ms |
| コンパイル使用メモリ | 82,176 KB |
| 実行使用メモリ | 79,872 KB |
| 最終ジャッジ日時 | 2024-12-16 10:12:33 |
| 合計ジャッジ時間 | 9,437 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | WA * 4 |
| other | WA * 29 |
ソースコード
p=print n=int(input()) b=[int(input())for _ in[0]*n] i=m=-1 a=[1]*-~n print(a) while i<~-n: i+=1;a[i+1]=[b[i]-a[i],a[i]-b[i]][i%2] if 0>=a[i+1]or a[i+1]>10**18:a[0]+=-a[i+1]+1;i=-1;m+=1 if m==10:break if 0>=a[0]or m==10:p(-1);exit() p(n+1) for _ in a:p(_)
hanorver