cf/mirror

Another String Minimization Problem

CF
1706A800· newbie1s256 MB⌨ stdin/stdout

Examples

Sample 1of 1multi-test • hover to link
Input
6
4 5
1 1 3 1
1 5
2
4 1
1 1 1 1
2 4
1 3
2 7
7 5
4 5
5 5 3 5
Output
ABABA
BABBB
A
AABB
ABABBBB
ABABA
1706A.cpp
loading editor…
Ln 11·137 BGNU C++20 (64)
loading graph engine…