cf/mirror

Counting Necessary Nodes

CF
2074F2000· candidate master2s512 MB⌨ stdin/stdout

Examples

Sample 1of 1multi-test • hover to link
Input
5
0 1 1 2
0 2 0 2
1 3 1 3
0 2 1 5
9 98 244 353
Output
1
1
4
5
374
2074F.cpp
loading editor…
Ln 11·137 BGNU C++20 (64)