TSET - "If Equal" in BF

no tags 

your task is simple... you will read tow numbers a,b then print 1 if a==b or print 0 if a!=b

a and b are one_digit_numbers  {0,1,2,3,4,5,6,7,8,9}.

NOTE : The Only Available language For This Problem Is BrainF***.

Input

there are 10 test cases ... in each one there is:

one_digit_number a

followed by space

then one_digit_number b

followed by end_of_line charachter

Output

the logic value of a==b

Example

Input:
4 7
8 8
9 7
0 1
..
Output:
0
1
0
0
..

Score is your Code Length.

hide comments
(Tjandra Satria Gunawan)(曾毅昆): 2013-01-03 04:23:14

+1 for Robert Gerbicz This problem must have strong test case ;-)

Edit: Strong Test Cases Added ... Have Fun :)

RE: Thank You! :-D

Last edit: 2012-12-20 16:38:42
Robert Gerbicz: 2013-01-03 04:23:14

There is more than 1 input set (probably three), but this does not cover all 100 possible input case. One of my broken code is still get AC. It would be better to test all of these cases at least once.
PS EDIT: Should I Improve the Judge and Rejudge the solutions?
Many of them will Get WA ...what should i do?(my first problem you know :p )

re: add more input set to cover all 100 cases at least once and then rejudge all submissions (just click on start rejudge). It is not a problem that some submissions will get wa (or maybe tle).

Last edit: 2012-12-20 15:55:55
(Tjandra Satria Gunawan)(曾毅昆): 2013-01-03 04:23:14

@Aditya Pande: wow seems that you made an invalid code! :-P

Last edit: 2012-12-20 16:37:00
Mostafa 36a2: 2013-01-03 04:23:14

@Mitch Schwartz Sorry for this.. it was a fluke as you said :)..
MB2 was very easy to guess the 12point sol.
but BFTAB was important to me knowing how to move around bf arrays (as a beginner)
I also think it should be in tutorial, with a little bit challenge ;)

@Aditya Pande HaHa ... Yes Mitch is unbelievable in many problems ... I'm amazed too ..:D

@All this my first Problem .. thanks for solving :)

Last edit: 2012-12-20 10:17:30
Aditya Pande: 2013-01-03 04:23:14

got it
edit: finally within 100B
there should still be some scope for golfing

+1 for challenge as seemingly this problem does have many implementations
edit: it is much better than existing problems like BF writing challenge which doesn't have much logic and scope for golfing

@mitch: finally defeated momentarily

edit: oh can't use the weakness of the test cases anymore
RE: Yes Dear :) Sorry For This ..(Just Do it;)

Last edit: 2012-12-20 16:49:10
Mitch Schwartz: 2013-01-03 04:23:14

"internal error" -- so the judge crashed. Why?

Edit: Maybe it was a fluke. Submitting the same code a little later got AC.

And, I don't know about suitability for challenge section. MB2 got moved to tutorial for being too simple. See also BFTAB.

Last edit: 2012-12-20 05:33:23

Added by:Mostafa 36a2
Date:2012-12-16
Time limit:1s
Source limit:250B
Memory limit:1536MB
Cluster: Cube (Intel G860)
Languages:BF
Resource:BF it self ^_^