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
4 4
2 4 1 3
1 4 2 3
2 4
4 4
1 2 1 2

Sample Output 1

10 1 16 15
7 6 5 4
3 8 13 14
2 9 12 11
1 2 3 4
5 6 7 8

Hints

Problem Source

Migrated from old NTUJ.

tmt+ferng+dreamoon

Subtasks

No. Testdata Range Score

Testdata and Limits

No. Time Limit (ms) Memory Limit (VSS, KiB) Output Limit (KiB) Subtasks
0 5000 65536 32768