cf/mirror

Bank Hacking

CF
796C1900· candidate master2s256 MB⌨ stdin/stdout

Examples

Sample 1of 3
Input
5
1 2 3 4 5
1 2
2 3
3 4
4 5
Output
5
Sample 2of 3
Input
7
38 -29 87 93 39 28 -55
1 2
2 5
3 2
2 4
1 7
7 6
Output
93
Sample 3of 3
Input
5
1 2 7 6 7
1 5
5 3
3 4
2 4
Output
8
796C.cpp
loading editor…
Ln 11·137 BGNU C++20 (64)
loading graph engine…