�二行n个整数，依次表示X_1,X_2,...X_n (|X_i|&lt;=10^9)。</span></p>
<p></p></div></div></div></div></div><div class="row"><div class="column"><h4 class="ui top attached block header">输出格式</h4><div class="ui bottom attached segment font-content"><div style="position: relative; overflow: hidden;"><div class=content><p><span style="font-size: medium">一个正整数，表示最少的操作次数。如果不存在方案，输出-1。</span></p>
<p></p></div></div></div></div></div><div class