SBSTR1 - Substring Check (Bug Funny)

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.

Please note, that the solution may only be submitted in the following languages: Brainf**k, Whitespace and Intercal.

Input

24 lines consisting of pairs of binary strings A and B separated by a single space.

Output

The logical value of: 'B is a substring of A'.

Example

First two lines of input:

1010110010 10110
1110111011 10011

First two lines of output:
1
0


Added by:adrian
Date:2004-05-01
Time limit:1s
Source limit:50000B
Memory limit:1536MB
Cluster: Cube (Intel G860)
Languages:BF ICK WHITESPACE

hide comments
2022-02-23 02:56:40
wtfff
2022-02-18 21:33:19
I first tried with code for 2 in 3 chars substring and it worked. If idea is ok then I just need to proceed with caution with actual solution.
2022-01-19 09:18:47
where to write the code and what the heck is BRAINF**K.
2021-11-27 23:48:39
Finally !
The hardest thing to me was managing the loops
2021-08-04 20:09:59
Are you kidding me Brainfuck!!!! I just checked the syntax of bf , OMG wtf it is!!
2021-08-02 08:44:00
Brainfuck OMG
2021-08-01 19:13:32
one line solution for this prob but hmm....
2021-07-23 21:32:55
are you... sure there are substrings in bf ? or even "strings"
all i know is that there are pointers are they strings that store one character ?
2021-06-01 14:53:01
why it is giving run time error I am using c++.
2021-05-28 11:41:52
Brainfuck lol
© Spoj.com. All Rights Reserved. Spoj uses Sphere Engine™ © by Sphere Research Labs.