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
2014-03-03 13:31:55 awt
I hate this problem which only supports several languages!
2014-02-23 17:08:30 atul jain
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
2014-01-11 04:16:21 Martijn Muijsers
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
2014-01-09 09:52:52 Meet Udeshi
The judge keeps showing time limit exceeded, but on my computer it runs in 0.162 s?????? can some one help me pls?
2013-11-28 09:07:04 blueromantic
Can not use C language ?
2013-10-29 12:28:43 Shashank Gupta
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. :)
2013-10-23 19:45:34 code_new
How can i input these String..
2013-07-05 12:57:27 imiao
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Ą­
2013-06-06 01:36:02 ade surya ramadhani
this case uses "eof" or not..? (in pascal)

Last edit: 2013-06-06 01:36:36
2013-04-15 21:35:30 (Tjandra Satria Gunawan)(曾毅昆)
Now you can find more than 40 brainf**k solvable problem on TJANDRA page ;-)
© Spoj.com. All Rights Reserved. Spoj uses Sphere Engine™ © by Sphere Research Labs.