MINIMAL LENGTH STRING
CodeChefOpen on judge ↗
Given 3 strings $S1, S2$ and $S3$ find the length of the minimal string $S$ that has S1, S2 and S3 as $substrings$. ### Input There are exactly 3 lines in the input data. The i-th line contains string Si. All the strings are non-empty, consists of lowercase Latin letters. ### Output Print the minimal length of the string S, containing S1, S2 and S3 as substrings. ### Constraints The length of e
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