11065 - A Gentlemen's Agreement

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

Moderator: Board moderators

shanto86
Experienced poster
Posts: 160
Joined: Wed Jul 30, 2003 8:10 pm

Post by shanto86 »

well i got AC this morning. the idea given above is nothing but garbage.

actually i though that i only needed the maximum size, but later i noticed that i also need total as well...

if it was only maximum then that would come to play!
Self judging is the best judging!
sluga
New poster
Posts: 20
Joined: Sun Jan 22, 2006 10:48 pm
Location: Croatia

Post by sluga »

Could someone write here the 6 intersection sets in the last example in the sample input? I only find 2 of them, no matter what I do ( I even searched for sets using O( 2^n ) algorithm ).
Those I find are:
0 3 4 7
1 2 5 6

( edit )
I realize my mistake now... I thought the first number was the number of maximal sets.
A sta da radim
rammestain
New poster
Posts: 18
Joined: Fri Apr 21, 2006 11:34 am

Post by rammestain »

please give me hint for solving this problem
satej
New poster
Posts: 4
Joined: Sun Oct 26, 2003 5:29 am
Location: Dhaka,Bangladesh
Contact:

Post by satej »

mf wrote:I guess the test cases in the input aren't too tough.
I've used backtracking with some pruning to generate every independent set, and it got just ~0.6 seconds.
The maximum answer can be 2^30. So a backtracking solution should not work for such limits.
mf
Guru
Posts: 1244
Joined: Mon Feb 28, 2005 4:51 am
Location: Zürich, Switzerland
Contact:

Post by mf »

sqtej wrote:The maximum answer can be 2^30.
So, can you please show a test case where the answer would be 2^30?
(Don't forget, that "the graph representing the city's network of roads [should] be connected.")
Post Reply

Return to “Volume 110 (11000-11099)”