SBSTR1 - Substring Check (Bug Funny)

no tags 

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


hide comments
mahashwetha: 2016-09-13 18:01:42

i coded in java it says time exceeded so im unable to check the logic :(

pineapple: 2016-08-05 20:11:37

challenge accepted
lol

shubhu45: 2016-07-30 12:25:16

why not in other languages

snydergd: 2016-07-16 23:21:40

Is this even possible in intercal? It appears only spelled-out numerals are accepted as input.

sushantgokhale: 2016-06-23 12:05:13

Guneet, I think you can implement the function yourself. Time complexity is 'm+n' where m,n are lengths of string A and B respectively,

rishbhsharma: 2016-06-01 17:17:51

So I am assuming esoteric languages aren't really famous yet.

neeraj2424: 2016-05-26 22:04:35

coded in java and felt like hell

joey18: 2016-05-26 15:32:10

freaking man....seriously spoj???

thala_ajit: 2016-05-22 07:11:41

does the question allow the answer to be written in c++?

d_griffin_101: 2016-05-18 20:13:38

@andy, a bunch of joy that looks like nonsense when you are done.


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