TopCoder

User's AC Ratio

NaN% (0/0)

Submission's AC Ratio

NaN% (0/0)

Tags

Description

A printable version(PDF) can be downloaded here.


抱歉來不及翻譯了,麻煩自己看,要注意題號喔!

Input Format

Output Format

Sample Input 1

5 5
1 3 2 4 7
1 2
1 3
2 3
2 4
3 5
3 3
1 2 3
1 2
2 3
1 3

Sample Output 1

11
4

Hints

Problem Source

Migrated from old NTUJ.

POI ONTAK 2010 day 6

Subtasks

No. Testdata Range Score

Testdata and Limits

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