Subarray XOR
Mary loves binary strings. Given a binary string $S$, she defines the *beauty* of the string as the [bitwise XOR](https://en.wikipedia.org/wiki/Bitwise_operation#XOR) of **decimal representations** of **all substrings** of $S$. Find the *beauty* of string $S$. Since the answer can be huge, print it modulo $998244353$. For example, the decimal representation of binary string $1101$ is $1\cdot 2
HINT LADDERno hints yet
L1 Observation
L2 Technique
L3 Approach
L4 Pseudo-code
🔒
L5 Full solution
L5 unlocks only if you insist twice
solution.cppC++17
CodeSearch Tutor
Hints, not spoilers — it won’t hand over the full solution unless you insist.
Sign in to chat with the tutor and save your progress.
Sign in to start