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
tushar091: 2017-05-01 09:03:33

lol

pheonix_101: 2017-04-11 16:48:06

why not in other languages like c or c++

bnzhaxx: 2017-03-18 22:05:00

I got a TLE with java, but i tested it with the example input and it was correct!
What is happening?
(I submitted as BrainFuck)

cake_is_a_lie: 2017-02-06 23:02:48

1) Some people need to learn to read the problem statement before submitting the solution (the accepted languages are in bold); and brainfuck WILL compile Java or C++ or pretty much any syntax just fine; the only reason it might fail to compile is missmatched brackets.
2) Computer science is more about abstract thinking than about knowing Java. Using esoteric languages is sometimes a good exercise for that.
3) Might be useful to know bff has 32 bit ints and their version as of now (1.0.5) doesn't optimize [-] and [+]; the most recent version on SF (1.0.6) optimizes [-] and [+] so they wouldn't risk timing you out.

m090166: 2017-01-10 19:46:08

Solved :) 5036 Brainf**k commands

Last edit: 2017-01-10 19:49:54
cyclic_func: 2017-01-09 16:05:45

Brainfuck ignores every character except + - , . [ ] < >

dudedivesh: 2016-11-24 19:25:17

really you want us to code in languages that some psychopaths created on some april fool day????? that too in classical section.

tokyomoon: 2016-11-17 20:51:03

lmao

esshuvo: 2016-10-18 19:05:55

what is this! i wote my solution using C++,but submitted by BrainF**k,nevertheless i got wrong answer,not compilation error! i got amazed :)

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

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


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