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
luozheng147: 2020-10-10 15:47:33

well what the fuck is wrong with the setter. Using these three language. Man before this question, I didn't even heard about these languages and the setter wants me to solve in this language. Fuck not gonna happen!!!!!!!!!

theprankster: 2020-09-30 14:11:37

Finally! somewhere I can use brainfuck :D

quantumbolt: 2020-08-28 05:54:00

wtf ? brainfuck? never heard of it.

Rafail Loizou: 2020-08-28 04:44:42

For anyone that will dare to try this problem after solving it I have to give 3 major tips that will make your life 10 times easier with this:

1) Remember that you are reading characters so ASCII codes of '1' and '0' and not integer values so you have to convert https://ascii.cl/
2) Use BF as it has a very good Wikipedia page that explains it perfectly and fast https://en.wikipedia.org/wiki/Brainfuck
3) Careful when reading spaces and end lines since they are characters as well. Especially when reading end lines read them in a position that you will use just for reading end lines and don't have to make 0 because the language's reaction may vary when reading an end line https://en.wikipedia.org/wiki/Brainfuck#End-of-line_code
4) Lost my sleep to this smh... wtf am I even doing with my life...

saikserajfahim: 2020-08-19 19:21:44

the problem setter is a mad. because only 3 language is allowed here. and this 3 language is rare.

mkp042: 2020-08-05 20:29:17

#include<cpp> in this program please!!!

dileep32: 2020-06-24 20:16:40

i solved this problem in c++

codeborn: 2020-05-17 05:07:57

this problem cant be solved in c++

iamsuyash_25: 2020-05-13 20:34:50

I done it but in python plz let me submit it

jaysnake: 2020-05-05 21:30:33

The whole point of this question is to make the implementation really difficult. It's not supposed to be solved in C lmfao


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