TopCoder

User's AC Ratio

NaN% (0/0)

Submission's AC Ratio

NaN% (0/0)

Tags

Description

Input Format

Output Format

Sample Input 1

2 3
1 2
2 1
2 1

4 8
1 2
3 4
1 3
2 4
1 2
3 4
1 3
2 4

Sample Output 1

2
0
2

2
4
12
12
12
4
2
0

Hints

NTUJ cannot show multiple samples, so we merged them here

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 4000 262144 131072
1 4000 262144 131072
2 4000 262144 131072
3 4000 262144 131072
4 4000 262144 131072
5 4000 262144 131072
6 4000 262144 131072
7 4000 262144 131072
8 4000 262144 131072
9 4000 262144 131072
10 4000 262144 131072
11 4000 262144 131072
12 4000 262144 131072
13 4000 262144 131072
14 4000 262144 131072
15 4000 262144 131072
16 4000 262144 131072
17 4000 262144 131072