TopCoder

User's AC Ratio

100.0% (2/2)

Submission's AC Ratio

75.0% (3/4)

Tags

Description

Input Format

Output Format

Sample Input 1

2
1 3
5 5

Sample Output 1

108
574847666

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 5000 65536 131072
1 5000 65536 131072
2 5000 65536 131072
3 5000 65536 131072
4 5000 65536 131072
5 5000 65536 131072
6 5000 65536 131072
7 5000 65536 131072
8 5000 65536 131072
9 5000 65536 131072
10 5000 65536 131072
11 5000 65536 131072
12 5000 65536 131072
13 5000 65536 131072
14 5000 65536 131072
15 5000 65536 131072
16 5000 65536 131072
17 5000 65536 131072
18 5000 65536 131072
19 5000 65536 131072
20 5000 65536 131072
21 5000 65536 131072
22 5000 65536 131072
23 5000 65536 131072
24 5000 65536 131072
25 5000 65536 131072
26 5000 65536 131072
27 5000 65536 131072
28 5000 65536 131072
29 5000 65536 131072