cf/mirror

Polycarp and Hay

CF
659F2000· candidate master4s512 MB⌨ stdin/stdout

Examples

Sample 1of 3
Input
2 3 35
10 4 9
9 9 7
Output
YES
7 0 7
7 7 7
Sample 2of 3
Input
4 4 50
5 9 1 1
5 1 1 5
5 1 5 5
5 5 7 1
Output
YES
5 5 0 0
5 0 0 5
5 0 5 5
5 5 5 0
Sample 3of 3
Input
2 4 12
1 1 3 1
1 6 2 4
Output
NO
659F.cpp
loading editor…
Ln 11·137 BGNU C++20 (64)
loading graph engine…