Painting Pebbles
509B1300· pupil1s256 MB⌨ stdin/stdout
Examples
Sample 1of 3
Input
4 41 2 3 4
Output
YES11 41 2 41 2 3 4
Sample 2of 3
Input
5 23 2 4 1 3
Output
NO
Sample 3of 3
Input
5 43 2 4 3 5
Output
YES1 2 31 31 2 3 41 3 41 1 2 3 4
58%
509B.cpp
loading editor…
Ln 11·137 BGNU C++20 (64)