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
awt: 2014-03-03 13:31:55

I hate this problem which only supports several languages!

atul jain: 2014-02-23 17:08:30

i am actually new in coding line i wanna ask can these types of programs can be done with the help of java?
--ans(francky)--> Choose a problem, then take a look at 'Best solutions', and 'JAVA' ones, if there are plenty of, you can try this problem if you feel good enough with it. This problem is for 'Brain Fuck' users amongst few languages.

Last edit: 2014-02-23 17:22:38
Martijn Muijsers: 2014-01-11 04:16:21

Mine works but it's TLE! I swear this is my worst nightmare!!

Edit: rethought my idea and got AC! :)

Last edit: 2014-01-11 17:50:07
Meet Udeshi: 2014-01-09 09:52:52

The judge keeps showing time limit exceeded, but on my computer it runs in 0.162 s?????? can some one help me pls?

blueromantic: 2013-11-28 09:07:04

Can not use C language ?

Shashank Gupta: 2013-10-29 12:28:43

Hints: Check out this site for BF isomorphisms to C code. http://www.muppetlabs.com/~breadbox/bf/ After you've read that, go read this tutorial. http://nieko.net/projects/brainfuck Finally go to ideone.com and start programming with your own inputs. :)

code_new: 2013-10-23 19:45:34

How can i input these String..

imiao: 2013-07-05 12:57:27

I only know little c and PythonĄ­When I solved this problem by Python,I find that it only can be solved by other languages which I don't knowĄ­what a pityŁĄmiao miaoĄ­

ade surya ramadhani: 2013-06-06 01:36:02

this case uses "eof" or not..? (in pascal)

Last edit: 2013-06-06 01:36:36
(Tjandra Satria Gunawan)(曾毅昆): 2013-04-15 21:35:30

Now you can find more than 40 brainf**k solvable problem on TJANDRA page ;-)


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