cf/mirror

LuoTianyi and XOR-Tree

CF
1824C2500· grandmaster2s256 MB⌨ stdin/stdout

Examples

Sample 1of 4
Input
6
3 5 7 5 8 4
1 2
1 3
1 4
3 5
4 6
Output
3
Sample 2of 4
Input
8
7 10 7 16 19 9 16 11
1 5
4 2
6 5
5 2
7 2
2 3
3 8
Output
3
Sample 3of 4
Input
4
1 2 1 2
1 2
2 3
4 3
Output
0
Sample 4of 4
Input
9
4 3 6 1 5 5 5 2 7
1 2
2 3
4 1
4 5
4 6
4 7
8 1
8 9
Output
2
1824C.cpp
loading editor…
Ln 11·137 BGNU C++20 (64)
loading graph engine…