Distinct Substring
CodeChefOpen on judge ↗
Smith’s father gives a String of Length $N$. He told Smith to find the $k-th$ smallest substring from all of the distinct substrings in lexicographical order of the given string. As Smith is busy doing his school work. Help Smith to find the $k-th$ Smallest substring in lexicographical order. ### Input -The first input line has a string of length $N$ that consists of characters $a–z$. -The
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