Frequency Problem (Hard Version)
1446D23000· legendary gm2s256 MB⌨ stdin/stdout
Examples
Sample 1of 3
Input
71 1 2 2 3 3 3
Output
6
Sample 2of 3
Input
101 1 1 5 4 1 3 1 2 2
Output
7
Sample 3of 3
Input
11
Output
0
58%
1446D2.cpp
loading editor…
Ln 11·137 BGNU C++20 (64)