908-Re-connecting Computer Sites

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

Moderator: Board moderators

908-Re-connecting Computer Sites

Postby calicratis19 » Tue Aug 11, 2009 10:49 pm

i m surprised abt the problem. it is said that it will give n-1<=m<=n*n-1/2 ,here m is the number of edges and n is the numbner of node which can be 1 <= n <= 1000000. so clearly m edges cant be stored in an array. but surprisingly there is no input where m>n.a two dimensional array of array[1000020][3] is enough to store edges and cost.
:o :o :o
Heal The World
calicratis19
Learning poster
 
Posts: 76
Joined: Mon Jul 21, 2008 8:50 am
Location: SUST,SYLHET,BANGLADESH.

Re: 908-Re-connecting Computer Sites

Postby Jehad Uddin » Sun Oct 04, 2009 4:16 pm

In uva there are problems(such as 200,11042,935,(789,479 no test case :))) of poor test cases , and this problem is also that type, the problem descripton is wrong also,
Jehad Uddin
Learning poster
 
Posts: 74
Joined: Fri May 08, 2009 5:16 pm

Re: 908-Re-connecting Computer Sites

Postby Shafaet_du » Sun Nov 28, 2010 10:25 pm

Whats wrong with problem description? just add the costs of first N-1 inputs,and thats the first output. find MST of last K+M inputs,thats the 2nd output.
Shafaet_du
Experienced poster
 
Posts: 147
Joined: Mon Jun 07, 2010 11:43 am
Location: University Of Dhaka,Bangladesh

Re: 908-Re-connecting Computer Sites

Postby SyFyKid » Sun Jun 10, 2012 5:22 pm

Nothing wrong, but we should remember that second line (aka MST of K+M edges) should be min(cost_before, cost_after).

Shafaet_du wrote:Whats wrong with problem description? just add the costs of first N-1 inputs,and thats the first output. find MST of last K+M inputs,thats the 2nd output.
SyFyKid
New poster
 
Posts: 26
Joined: Tue May 08, 2012 9:47 am

Re: 908-Re-connecting Computer Sites

Postby VitezVojko » Sun Nov 04, 2012 2:55 pm

Code: Select all
AC, Blank lines were the problem :S

I simply don't know, what am i doing wrong here, can someone please help me, or give me tricky I/O?
VitezVojko
New poster
 
Posts: 7
Joined: Sun Apr 15, 2012 4:45 pm


Return to Volume IX

Who is online

Users browsing this forum: No registered users and 1 guest