11231 - Black and white painting

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

Moderator: Board moderators

Post Reply
hamedv
Learning poster
Posts: 98
Joined: Mon May 07, 2007 8:30 am

11231 - Black and white painting

Post by hamedv »

what's wrong with my code???

Code: Select all

GOT AC
Last edited by hamedv on Sat Jul 07, 2007 5:04 pm, edited 1 time in total.
Adrian Kuegel
Guru
Posts: 724
Joined: Wed Dec 19, 2001 2:00 am
Location: Germany

Post by Adrian Kuegel »

It is too complicated :wink:
I suggest you think again, or try small cases with a brute force program and compare the values.
Last edited by Adrian Kuegel on Sat Jul 07, 2007 4:49 pm, edited 1 time in total.
mf
Guru
Posts: 1244
Joined: Mon Feb 28, 2005 4:51 am
Location: Zürich, Switzerland
Contact:

Post by mf »

Here's some random input:

Code: Select all

15 9 0
9 9 0
89 35 0
11 16 1
16 14 0
10 17 0
11 17 1
12 11 0
17 13 1
16 10 1
12 10 1
15 9 1
17 8 1
0 0 0
Output:

Code: Select all

8
2
1148
18
31
15
20
10
30
14
8
8
5
hamedv
Learning poster
Posts: 98
Joined: Mon May 07, 2007 8:30 am

Post by hamedv »

thanx for your fast reply
GOT AC
Post Reply

Return to “Volume 112 (11200-11299)”