Polycarp and Hay
659F2000· candidate master4s512 MB⌨ stdin/stdout
Examples
Sample 1of 3
Input
2 3 3510 4 99 9 7
Output
YES7 0 77 7 7
Sample 2of 3
Input
4 4 505 9 1 15 1 1 55 1 5 55 5 7 1
Output
YES5 5 0 05 0 0 55 0 5 55 5 5 0
Sample 3of 3
Input
2 4 121 1 3 11 6 2 4
Output
NO
58%
659F.cpp
loading editor…
Ln 11·137 BGNU C++20 (64)
loading graph engine…