CF39B.Company Income Growth

普及/提高-

通过率:0%

AC君温馨提醒

该题目为【codeforces】题库的题目,您提交的代码将被提交至codeforces进行远程评测,并由ACGO抓取测评结果后进行展示。由于远程测评的测评机由其他平台提供,我们无法保证该服务的稳定性,若提交后无反应,请等待一段时间后再进行重试。

题目描述

Petya works as a PR manager for a successful Berland company BerSoft. He needs to prepare a presentation on the company income growth since 20012001 (the year of its founding) till now. Petya knows that in 20012001 the company income amounted to a1a_{1} billion bourles, in 20022002 — to a2a_{2} billion, ..., and in the current (2000+n)(2000+n) -th year — ana_{n} billion bourles. On the base of the information Petya decided to show in his presentation the linear progress history which is in his opinion perfect. According to a graph Petya has already made, in the first year BerSoft company income must amount to 11 billion bourles, in the second year — 22 billion bourles etc., each following year the income increases by 11 billion bourles. Unfortunately, the real numbers are different from the perfect ones. Among the numbers aia_{i} can even occur negative ones that are a sign of the company’s losses in some years. That is why Petya wants to ignore some data, in other words, cross some numbers aia_{i} from the sequence and leave only some subsequence that has perfect growth.

Thus Petya has to choose a sequence of years y1y_{1} , y2y_{2} , ..., yky_{k} ,so that in the year y1y_{1} the company income amounted to 11 billion bourles, in the year y2y_{2}22 billion bourles etc., in accordance with the perfect growth dynamics. Help him to choose the longest such sequence.

输入格式

The first line contains an integer nn ( 1<=n<=1001<=n<=100 ). The next line contains nn integers aia_{i} ( 100<=ai<=100-100<=a_{i}<=100 ). The number aia_{i} determines the income of BerSoft company in the (2000+i)(2000+i) -th year. The numbers in the line are separated by spaces.

输出格式

Output kk — the maximum possible length of a perfect sequence. In the next line output the sequence of years y1y_{1} , y2y_{2} , ..., yky_{k} . Separate the numbers by spaces. If the answer is not unique, output any. If no solution exist, output one number 00 .

输入输出样例

  • 输入#1

    10
    -2 1 1 3 2 3 4 -10 -2 5
    

    输出#1

    5
    2002 2005 2006 2007 2010
    
  • 输入#2

    3
    -1 -2 -3
    

    输出#2

    0
    
首页