cf/mirror

Grocer's Problem

CF
91D2600· international gm2s256 MB⌨ stdin/stdout

Examples

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