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

<snip>

Last edit: 2022-09-11 00:33:33
devgeek0: 2015-06-12 02:05:24

This is the kind of program where you realise how important proper commenting actually is haha

ngdanthanh: 2015-05-21 12:02:37

Why not C/C++???

Seven.Martinez: 2015-03-23 17:47:59

Available only for 3 language, what the?

al117: 2015-03-15 06:44:14

Is space considered as character?

Tista Saha: 2015-02-27 11:14:26

i did it on C and now i realise dats not allowed :( im a beginner.poor me :(

Maneesh Sharma: 2015-02-18 12:57:28

Why such a language restriction ? That is quite discouraging. I realized this after solving the problem when I expanded the language drop down.

re(vamsi): this problem isn't really a problem in other languages. allowing only esoteric languages is what makes it difficult.

Last edit: 2015-02-19 12:50:32
Yiri Wen: 2014-11-06 15:17:01

how could such a problem TLE!

Tomasz Wasilczyk: 2014-10-27 18:40:24

Brainfuck isn't that bad. Actually, I really enjoyed it. :)

The worst part is, that a comment in your code could introduce a bug (if you type a comma etc).


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