cf/mirror

Painting Pebbles

CF
509B1300· pupil1s256 MB⌨ stdin/stdout

Examples

Sample 1of 3
Input
4 4
1 2 3 4
Output
YES
1
1 4
1 2 4
1 2 3 4
Sample 2of 3
Input
5 2
3 2 4 1 3
Output
NO
Sample 3of 3
Input
5 4
3 2 4 3 5
Output
YES
1 2 3
1 3
1 2 3 4
1 3 4
1 1 2 3 4
509B.cpp
loading editor…
Ln 11·137 BGNU C++20 (64)