Find Brian's Bitcoin!

View as PDF

Submit solution


Points: 7
Time limit: 1.0s
Memory limit: 64M

Author:
Problem types

After hearing about the new craze with Blockchain technology and NFT's, Brian decides to start mining Bitcoin and Ethereum! Everything is going well, until Brian accidentally loses his Bitcoin and Ethereum! Coincidentally, the Blockchain can be represented as a grid. Since Brian doesn't know anything about traversing through grids, you must help him find out if he could reach his Bitcoin THEN Ethereum.

Brian starts off at the letter s in the blockchain, his Bitcoin is located at position b and Ethereum is located as position e.

. denotes an open space, while # represents a wall in the blockchain.

You can move only up/down/left/right, not through walls, and not outside of the blockchains bounds.

Input Specification

The first line of input contains two space separated integers 1 \le R, C \le 10, the number of rows and columns that represent the size of the blockchain, respectively.

The next R lines, each contain C characters - the actual grid.

Output Specification

If Brian can not reach his Bitcoin and Ethereum, output No Crypto For Brian!, otherwise output Crypto for Brian!

Sample Input 1

3 6
##s###
#b.###
##...e

Sample Output 1

Crypto For Brian

Sample Input 2

3 6
##s###
#b.###
##..#e

Sample Output 2

No Crypto For Brian!

Explanation for Sample Output 2

Brian is able to reach his Bitcoin, however; there is a wall stopping him from reaching his Ethereum.

Comments

There are no comments at the moment.