10607 - Siege

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

Moderator: Board moderators

10607 require output

Postby .. » Tue Sep 28, 2004 8:47 am

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

Postby .. » Fri Nov 05, 2004 6:36 pm

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

Postby Adrian Kuegel » Fri Nov 05, 2004 8:52 pm

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

Postby .. » Sat Nov 06, 2004 5:27 pm

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

Postby marian » Mon Nov 15, 2004 2:02 am

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

Postby Adrian Kuegel » Mon Nov 15, 2004 2:15 am

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

Postby marian » Tue Nov 16, 2004 12:21 am

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

Previous

Return to Volume CVI

Who is online

Users browsing this forum: No registered users and 0 guests