Two Arrays
1599E3200· legendary gm5s256 MB⌨ stdin/stdout
Examples
Sample 1of 2
Input
3 41 0 22 1 04 1 33 2 2 2 31 1 1 3 04 1 3
Output
44
Sample 2of 2
Input
5 41 3 5 3 24 2 1 3 34 1 34 2 52 1 2 4 64 2 4
Output
182668
58%
1599E.cpp
loading editor…
Ln 11·137 BGNU C++20 (64)