String Coloring (hard version)
1296E22000· candidate master1s256 MB⌨ stdin/stdout
Examples
Sample 1of 4
Input
9abacbecfd
Output
21 1 2 1 2 1 2 1 2
Sample 2of 4
Input
8aaabbcbb
Output
21 2 1 2 1 2 1 1
Sample 3of 4
Input
7abcdedc
Output
31 1 1 1 1 2 3
Sample 4of 4
Input
5abcde
Output
11 1 1 1 1
58%
1296E2.cpp
loading editor…
Ln 11·137 BGNU C++20 (64)