Double
题号:NC222867
时间限制:C/C++/Rust/Pascal 1秒,其他语言2秒
空间限制:C/C++/Rust/Pascal 256 M,其他语言512 M
64bit IO Format: %lld

题目描述

Recently,  became obsessed with a fighting game. In this game,  characters stand on an arena from left to right, and the combat power of the  character is a_i. For each operation,  will choose two adjacent characters  and  on the arena for a duel. If , then  wins, if , then  wins. If , then both  and  have a probability of  to win. The victorious character will stay in the arena and double the combat power; the losing character will leave the arena.

Now will perform  operations, after  operations, there will only be one character left in the ring. Obviously,  has  operation modes. In all these modes of operation, which characters have the probability to stay till the end and become the final winner.

输入描述:

The first line contains a positive integer , which represents the number of the characters.

The second line contains  integers separated by spaces , which represents the the combat power of the  character.

输出描述:

The first line contains a positive integer , which represents the number of the characters who have the probability to stay till the end and become the final winner.


The second line contains  integers in  order separated by spaces , which represents the the index of the characters who have the probability to stay till the end and become the final winner.


示例1

输入

复制
3
1 2 3

输出

复制
2
2 3
示例2

输入

复制
3
2 2 4

输出

复制
3
1 2 3
示例3

输入

复制
5
1 2 30 16 1

输出

复制
2
3 4