TopCoder

User's AC Ratio

NaN% (0/0)

Submission's AC Ratio

NaN% (0/0)

Tags

Description

Input Format

Output Format

Sample Input 1

4 4 3 1 5 1 1 1 3
4 1 2 1 3 1 1 1 2
5 1 1 1 3 4 3 2 5
6 1 3 1 5 1 2 1 3
6 215657 553897 915611 930784
193666 323425 130393 654599

Sample Output 1

0
1
3
11
15

Hints

Problem Source

Migrated from old NTUJ.

TopCoder SRM

Subtasks

No. Testdata Range Score

Testdata and Limits

No. Time Limit (ms) Memory Limit (VSS, KiB) Output Limit (KiB) Subtasks
0 20000 65536 200