10607 - Siege

All about problems in Volume 106. If there is a thread about your problem, please use it. If not, create one with its number in the subject.

Moderator: Board moderators

..
A great helper
Posts: 454
Joined: Thu Oct 18, 2001 2:00 am
Location: Hong Kong

10607 require output

Post 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 
Last edited by .. on Sat Nov 06, 2004 5:35 pm, edited 2 times in total.
My signature:
  • Please make discussion about the algorithm BRFORE posting source code.
    We can learn much more in discussion than reading source code.
  • I HATE testing account.
  • Don't send me source code for debug.
..
A great helper
Posts: 454
Joined: Thu Oct 18, 2001 2:00 am
Location: Hong Kong

Post by .. »

No one can give me help?? :(
My signature:
  • Please make discussion about the algorithm BRFORE posting source code.
    We can learn much more in discussion than reading source code.
  • I HATE testing account.
  • Don't send me source code for debug.
Adrian Kuegel
Guru
Posts: 724
Joined: Wed Dec 19, 2001 2:00 am
Location: Germany

Post 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).
..
A great helper
Posts: 454
Joined: Thu Oct 18, 2001 2:00 am
Location: Hong Kong

Post 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
My signature:
  • Please make discussion about the algorithm BRFORE posting source code.
    We can learn much more in discussion than reading source code.
  • I HATE testing account.
  • Don't send me source code for debug.
marian
New poster
Posts: 30
Joined: Sun Oct 27, 2002 4:01 pm
Contact:

Post 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).
Adrian Kuegel
Guru
Posts: 724
Joined: Wed Dec 19, 2001 2:00 am
Location: Germany

Post 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
marian
New poster
Posts: 30
Joined: Sun Oct 27, 2002 4:01 pm
Contact:

Post 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?
Post Reply

Return to “Volume 106 (10600-10699)”