bzoj-4318:osu!

Source: Internet
Author: User
Descriptionosu is a popular leisure software. We can simplify and adapt the rules of OSU to the following: A total of n operations, each operation only success and failure of the points, the success of the corresponding 1, the failure corresponds to the 0,n operation corresponds to 1 length of 01 strings of N. In this string continuous x 1 can contribute to the score of x^3, this x 1 cannot be included in the other continuous 1 (that is, a very long string of 1, see the sample explanation) now give N, as well as the success rate of each operation, please output the desired score, the output is rounded and retained 1 decimal places.

The first line of input has a positive integer n, which indicates the number of operations. Next n rows each row has a real number between [0,1], indicating the success rate of each operation.

Output has only one real number, which indicates the answer. The answer is rounded and retains 1 decimal places.

Sample Input3
0.5
0.5
0.5 Sample Output6.0
HINT

"Sample description"
000 score of 0,001 score for 1,010 score for 1,100 score for 1,101 score for 2,110 score for 8,011 score for 8,111 score for 27, sum of 48, expected for 48/8=6.0
n<=100000

bzoj-4318:osu!

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.