← All problemsSign in

Anagram Split

CodeChefRating 2923Open on judge ↗

**This is an interactive task** Let's clear things up with some definitions: - Two binary strings $S$ and $T$ are *anagrams* of each other if it is possible to rearrange the letters in the string $S$ to get a string equal to $T$. - Let $S[l,r]$ be the substring of $S$ starting at $l$ and ending at $r$ both inclusive. - Let $f(S,l,r)$ be the frequency of character `1` in $S[l,r]$. Chef has two

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.

voice by Sarvam AI

Sign in to chat with the tutor and save your progress.

Sign in to start