cf/mirror

Partitioning the Array

CF
1920C1600· expert3s256 MB⌨ stdin/stdout

Examples

Sample 1of 1multi-test • hover to link
Input
8
4
1 2 1 4
3
1 2 3
5
1 1 1 1 1
6
1 3 1 1 3 1
6
6 2 6 2 2 2
6
2 6 3 6 6 6
10
1 7 5 1 4 3 1 3 1 4
1
1
Output
2
1
2
4
4
1
2
1
1920C.cpp
loading editor…
Ln 11·137 BGNU C++20 (64)