← All problemsSign in

Problem 3

Given two binary strings, A (of length 10) and B (of length 5), output 1 if B is a substring of A and 0 otherwise. Input The first line contains the number of test cases n. This is followed by n lines each consisting of pairs of binary strings A and B separated by a single space. Output output 1 if B is a substring of A and 0 otherwise. Example Input: 1 1010110010 10110 Output: 1

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