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
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...

Jatin Sanghvi: 2015-08-13 08:12:45

People who wrote solutions in other languages: the problem is not challenging if written in a mainstream language. You hardly put any effort so you should not feel bad if you have to throw your code away.

mattcroth: 2015-06-30 21:41:43

mattcroth: 2015-06-30 21:06:09

Last edit: 2015-07-03 21:49:56

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