cf/mirror

Grid Sort

CF
1044E3100· legendary gm2s256 MB⌨ stdin/stdout

Examples

Sample 1of 2
Input
3 3
4 1 2
7 6 3
8 5 9
Output
1
8 1 4 7 8 5 6 3 2
Sample 2of 2
Input
3 5
1 2 3 5 10
11 6 4 14 9
12 7 8 13 15
Output
3
4 4 14 13 8
4 5 10 9 4
4 12 7 6 11
1044E.cpp
loading editor…
Ln 11·137 BGNU C++20 (64)