Page 2 of 2

274 - Cat and Mouse

Posted: Thu Jun 28, 2012 3:07 am
by Hasan
I'm confused about the input, can anyone please help me with an input of 2 or more cases?
And there is a blank line after the description of mouse doors, right?

Re: 274 - Cat and Mouse

Posted: Fri Jun 29, 2012 1:30 am
by brianfry713
Input:

Code: Select all

2

5 3 5
1 2
2 1
3 1
4 3
5 2
-1 -1
1 3
2 5
3 4
4 1
4 2
4 5
5 4

5 3 5
1 2
2 1
3 1
4 3
5 2
-1 -1
1 3
2 5
3 4
4 1
4 2
4 5
5 4
AC output:

Code: Select all

Y Y

Y Y