### ICPC

### Small codes

There is a solution in \(O(nm 2^{2n+3})\)
The resulting sequences for \(N\times N\) grids and \(N\times(N+1)\) grids can be found at ??? and ???

There is a solution in \(O(nm 2^{2n+3})\)
The resulting sequences for \(N\times N\) grids and \(N\times(N+1)\) grids can be found at ??? and ???