cf/mirror

XOR, Tree, and Queries

CF
1788F2500· grandmaster3s256 MB⌨ stdin/stdout

Examples

Sample 1of 3
Input
4 4
1 2
2 3
3 4
1 4 3
2 4 2
1 3 1
2 3 1
Output
No
Sample 2of 3
Input
6 2
1 2
2 3
3 4
2 5
5 6
1 4 2
2 6 7
Output
Yes
4 2 4 1 6
Sample 3of 3
Input
6 2
1 2
2 3
3 4
2 5
5 6
1 4 3
1 6 5
Output
Yes
6 1 4 3 0
1788F.cpp
loading editor…
Ln 11·137 BGNU C++20 (64)
loading graph engine…