TopCoder

User's AC Ratio

50.0% (1/2)

Submission's AC Ratio

11.8% (2/17)

Tags

Description

Input Format

The correct constraint is $1 \leq l_i$, instead of $0 \leq l_i$.

Output Format

Sample Input 1

5
3 6 1 2 5
3
1 3
1 1
2 3

Sample Output 1

13.00000000000000000000

Hints

Problem Source

Migrated from old NTUJ.

Subtasks

No. Testdata Range Score

Testdata and Limits

No. Time Limit (ms) Memory Limit (VSS, KiB) Output Limit (KiB) Subtasks
0 3000 262144 131072
1 3000 262144 131072
2 3000 262144 131072
3 3000 262144 131072
4 3000 262144 131072
5 3000 262144 131072
6 3000 262144 131072
7 3000 262144 131072
8 3000 262144 131072
9 3000 262144 131072
10 3000 262144 131072
11 3000 262144 131072
12 3000 262144 131072
13 3000 262144 131072
14 3000 262144 131072
15 3000 262144 131072
16 3000 262144 131072
17 3000 262144 131072
18 3000 262144 131072
19 3000 262144 131072
20 3000 262144 131072
21 3000 262144 131072
22 3000 262144 131072
23 3000 262144 131072
24 3000 262144 131072
25 3000 262144 131072
26 3000 262144 131072
27 3000 262144 131072
28 3000 262144 131072
29 3000 262144 131072
30 3000 262144 131072