8549: Hack of Multiply 2 Divide 2

内存限制:128 MB 时间限制:1 S 标准输入输出
题目类型:传统 评测方式:Special Judge 上传者:
提交:0 通过:0

题目描述

Frank_DD has a sequence a of length n(1n105,1ai105).

For each operation, he selects a number ai(1in) and changes it to2ai.

Frank_DD wants to know the minimum number of operations to change the sequence a to a non-descending sequence.

To help Frank_DD solve this problem, ddy guesses that the number in the result sequence can't be very large, and it will not exceed 2^{127}-1, which means that every number in the result sequence can be held in a 128-bit signed integer variable.

Formally, he guesses that for each sequence a that satisfies the constraints, there will always be a way that the number of operations is minimal, and in the result sequence, an<2127.

So, he writes a program relying on this idea.

But unfortunately, the idea is wrong, so this program can be hacked.

Now you should construct a sequence to hack the program of ddy. Your solution is considered correct if and only if this sequence satisfies the constraints, and the idea of ddy is wrong to this sequence.

输入格式

This problem has no input.

输出格式

The first line contains a single integern(1n105) --- the length of sequence a.

The second line contains n integers a1,a2,,an (1ai105) --- the sequence a.

输入样例 复制


输出样例 复制