cf/mirror

Dima and Bacteria

CF
400D2000· candidate master2s256 MB⌨ stdin/stdout

Examples

Sample 1of 4
Input
4 4 2
1 3
2 3 0
3 4 0
2 4 1
2 1 2
Output
Yes
0 2
2 0
Sample 2of 4
Input
3 1 2
2 1
1 2 0
Output
Yes
0 -1
-1 0
Sample 3of 4
Input
3 2 2
2 1
1 2 0
2 3 1
Output
Yes
0 1
1 0
Sample 4of 4
Input
3 0 2
1 2
Output
No
400D.cpp
loading editor…
Ln 11·137 BGNU C++20 (64)
loading graph engine…