# Problem 42806. GJam 2016 Rd1A: Rank and File (Large)

This Challenge is derived from GJam Rd1A 2016 Rank and File. This is the first 26 large cases with max N=50.

The GJam story is a matrix H(NxN) which has every row and column increasing. Each row and column is recorded on strips. The strips get scrambled and one gets incinerated. The goal is to reconstruct the missing increasing vector strip.

Input: [M], matrix of size [2*N-1,N] of all rows and columns of H except one

Output: [V], the missing vector of H not included in M

Examples: [M] [V]

```[1 2 3;2 3 5;3 5 6;2 3 4;1 2 3] [3 4 6]
[22 222;2 22;2 22][22 222]
```

GJam 2016 Rd1A Matlab results show three qualifiers for Rd2.

Theory: Brute force permutation will not succeed in a timely manner for N=50. Recreating the original matrix is possible in a timely manner. The min corner or the max corner will always be available. Evolving solution, no guessing, is possible. OR one can observe an inherent mathematical result to create a 1-line solution. GJam Rank_file solutions.

### Solution Stats

25.0% Correct | 75.0% Incorrect
Last Solution submitted on Apr 02, 2023

### Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!