Problem 3: Youngest First [Mohammed Ajmal, 2002]

Farmer John often arranges his cows into a grid with R rows and C
columns. As usual, the cows have their own ideas about whether a
particular arrangement is acceptable. Specifically, each row and
column in the grid must arranged in age order, with young cows on
the left (up and down column 1) and top (across row 1) and progressively
older cows arranged across and down. No two cows have the same age.

Cows know only one way to rearrange a grid: by the swapping of two
adjacent cows (adjacent cows are exactly above, below, to the right,
or to the left of each other). Given a grid of cows (each specified
by their age), find the shortest sequence of swaps required to
change the grid into a proper order. Your solution will be given a
partial score relative to the best solution that is submitted.

PROBLEM NAME: young

INPUT FORMAT:

* Line 1: Three space-separated integers: N (the number of the test
        case), R, and C.

* Lines 2..R+1: Line i+1 describes row i with C space-separated
        integers, the first of which is the cow in column 1, etc.

SAMPLE INPUT (file young.in):

1 3 2
8 5
9 1
6 2

OUTPUT FORMAT:

* Line 1: One line of the form "#FILE young N".

* Line 2: A single integer N, the minimum number of swaps to meet the
        criteria above.

* Lines 3..N+2: Each line i+2 contains four integers r1, c1, r2, c2. 
        These correspond to swapping (r1, c1) with (r2, c2) as the
        i-th move.

SAMPLE OUTPUT (file young.out):

#FILE young 1
4
2 1 2 2
2 2 3 2
1 1 2 1
2 1 2 2
