Page 2 of 2

10607 require output

Posted: Tue Sep 28, 2004 8:47 am
by ..
Can anyone give me the output?

Code: Select all

5  5
BBBBB
B   B
B A B
B   B
BBBBB
5  5
AAAAA
A   A
A   A
A   A
AAAAA
5  5
AAAAA
A   A
A B A
A   A
AAAAA
5  5
AAAAA
AB BA
ABBBA
ABBBA
AAAAA
3 3
AAA
AAA
AAA
3 3
AAA
AAA
AAB
5 6
     
     
  AA 
     
     
5 6
BBBBBZ
B    Z
B A  Z
B    Z
33333Z
5 6
BBBBBZ
B    Z
B  AZZ
B    Z
33333Z
5 6
      
 CCCB 
 CAbb 
 DDDb 
      
5 6
      
 CCCB 
 CAbb 
   Db 
      
0 0 

Posted: Fri Nov 05, 2004 6:36 pm
by ..
No one can give me help?? :(

Posted: Fri Nov 05, 2004 8:52 pm
by Adrian Kuegel
Here is my output of my AC program (but without guarantee of correctness):
2
-1
-1
-1
0
-1
1
2
2
4
3

For some of your inputs I had to add some spaces at the end to get the required width (I guess they were removed by the board).

Posted: Sat Nov 06, 2004 5:27 pm
by ..
Thanks Adrian, your output helps me much, at last I get accepted.......
I find that in the input, there is character with ASCII code > 127........
I think it is too tricky......they should states this in the problem statement.

And my AC program gives these output
1
-1
-1
-1
0
1
0
1
1
3
2

Posted: Mon Nov 15, 2004 2:02 am
by marian
Hello guys,

What is your output to this?

Code: Select all

5 4
DDDD
DBBD
DBAC
DBBD
DDDD
0 0
My AC program outputs 2, but the answer should be obviously 3 (B and C must be conquered, but they are not bordering, unless I misunderstood the statement).

Posted: Mon Nov 15, 2004 2:15 am
by Adrian Kuegel
I also print 2.
But this is no valid test case:
"There is no point in Flatland, which has a boundary with more than three other provinces i.e. four squares, which have the same vertex can

Posted: Tue Nov 16, 2004 12:21 am
by marian
Thanks Adrian, you're right. This is what happens, when I try to understand why my old code works without reading the statement properly.

Any ideas how hard would that problem be without that constraint?