for the Problem 1849C
The SOLUTION I wrote, it is having some out of bounds error in the below code portion.
s += (char)('0' ^ '1' ^ s.back());
s = ("" + (char)('0' ^ '1' ^ s[0])) + s; // this line giving error 'out of bounds' though working fine in LOCAL
n = s.size();
I am not able detect the exact reason.
Same purpose If I try to do like below, its working as expected
// working as expected
s += (char)('0' ^ '1' ^ s.back());
reverse(all(s));
s += (char)('0' ^ '1' ^ s.back());
reverse(all(s));
n = s.size();