← All problemsSign in

Yet another substring problem

CodeChefRating 2665Open on judge ↗

The problem is completely unrelated to its problem code :). Let us build an infinite string D that is simply a concatenation of the decimal representations of all positive integers without leading zeros. In other words, D = 12345678910111213141... You are given a string S. Find the position of the first occurrence of S in D that satisfies one additional constraint: at least one integer that wa

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