Submit | All submissions | Best solutions | Back to list |
TWOBISOP - TWO BISHOPS |
You are given a chess board of order 8x8 with exactly 2 bishops placed on it. Print "Yes" if they can attack each other during the first move of one of the bishops; "No" otherwise.
Input
The first line consists of an integer t (1 <= t <= 1000), the number of test cases. For each test case, you will be given the description of the board with 8 strings (8 characters in each string). 'B' denotes a cell with a bishop and '.' denotes an empty cell. There is an empty line after every test case.
Output
For each test case print "Yes" or "No" (case sensitive).
Example
Input: 2 .......B ........ ........ ....B... ........ ........ ........ ........ ........ ........ ........ .B...B.. ........ ........ ........ ........ Output: Yes No
Added by: | cegprakash |
Date: | 2013-02-24 |
Time limit: | 2s |
Source limit: | 50000B |
Memory limit: | 1536MB |
Cluster: | Cube (Intel G860) |
Languages: | All except: BF GOSU |
hide comments
2013-09-19 05:16:08 Chandan Chaubey
http://ideone.com/n7T59V# Please tell is what is the problem with my code ? for me it's giving correct results |
|
2013-03-27 18:10:09 vishwas
no empty line after number of test cases and no empty line after each line of the 8x8 array only empty line between two test cases |
|
2013-02-27 18:14:59 cegprakash
read from STDIN and print to STDOUT |
|
2013-02-27 17:49:09 Pradheep
how should we give the input? in file or get from user?? |
|
2013-02-27 18:14:42 Inspiron
http://ideone.com/X96CPj what is wrng in my code ,can any one tell me |
|
2013-02-27 16:14:06 Vignesh Natarajan
Is there an empty line after each line of the 8x8 array? |
|
2013-02-27 16:09:36 Serhat YILMAZ
is it a problem if the last test case output includes new line character? Last edit: 2013-02-27 16:12:00 |