CF1696G Fishingprince Plays With Array Again
Description
Suppose you are given a 1-indexed sequence $ a $ of non-negative integers, whose length is $ n $ , and two integers $ x $ , $ y $ . In consecutive $ t $ seconds ( $ t $ can be any positive real number), you can do one of the following operations:
- Select $ 1\le i
Input Format
N/A
Output Format
N/A
Explanation/Hint
Let's analyse the sample.
In the first query, we are asked to compute $ f([3,1,1,4]) $ . The answer is $ 3.5 $ . One optimal sequence of operations is:
- In the first $ 1.5 $ seconds do the second operation with $ i=1 $ .
- In the next $ 2 $ seconds do the first operation with $ i=3 $ .
In the third query, we are asked to compute $ f([1,1,1]) $ . The answer is $ 1 $ . One optimal sequence of operations is:
- In the first $ 0.5 $ seconds do the second operation with $ i=1 $ .
- In the next $ 0.5 $ seconds do the first operation with $ i=2 $ .