cf/mirror

Reverse Madness

CF
1878D1600· expert1s256 MB⌨ stdin/stdout

Examples

Sample 1of 1multi-test • hover to link
Input
5
4 2
abcd
1 3
2 4
2
1 3
5 3
abcde
1 2 3
1 2 5
3
1 2 3
3 1
gaf
1
3
2
2 2
10 1
aghcdegdij
1
10
5
1 2 3 4 2
1 1
a
1
1
1
1
Output
badc
abedc
gaf
jihgedcdga
a
1878D.cpp
loading editor…
Ln 11·137 BGNU C++20 (64)