Lexi Yash
CodeChefOpen on judge ↗
Yash likes to play around with strings. Once, Yash’s friend decides to play a string game with Yash. Yash is assigned with a string $S$ of only lowercase alphabets with length $N$. He needs to first find all the substrings of $S$ and then find lexicographically $Kth$ smallest substring. Yash wins the string game if he computes correct hash value H of the substring. $H$ is calculated using the hash
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