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.


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


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


First two lines of input:

1010110010 10110
1110111011 10011

First two lines of output:

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

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

andyhu0777: 2016-05-04 05:24:12

What in the hell is Brainfuck language?

x_codecreative: 2016-04-08 12:14:48

brainfuck language
first time

Rezaul H Sagar: 2016-03-27 18:51:21

I've learnt a new language name- "Brainfuck" :p

theketan2: 2016-02-23 16:08:54

coded in java and they Brain*fucked it :P

guneet_1995: 2016-02-03 16:58:43

Very Easy to solve in Java using contains() function in strings

keanedawg: 2016-02-01 08:42:23

So is the challenge supposed to be that you have to use a stupid language?

meproin: 2015-09-19 19:37:44

OOH NOO! I cannot send my beautiful one line xD
print((0,1)[reduce(lambda a,b: b in a,raw_input().split(" "))])

pvsmpraveen: 2015-09-08 10:04:34

Write the code in c/c++ , then realize its not allowed for this problem :P

harshit sharma: 2015-09-03 19:19:32

actully...with these types of problems(not allowing all languages) you cant test coding skills...

Added by:adrian
Time limit:0.979s
Source limit:50000B
Memory limit:1536MB
Cluster: Cube (Intel G860)