Search found 76 matches

by calicratis19
Sun Nov 01, 2009 8:48 am
Forum: Volume 116 (11600-11699)
Topic: 11693 - Speedy Escape
Replies: 7
Views: 3545

Re: 11693 - Speedy Escape

thanks MSH for your reply. i understand the mistake.i am going to fix my code. :)
by calicratis19
Thu Oct 29, 2009 2:35 pm
Forum: Volume 110 (11000-11099)
Topic: 11015 - 05-2 Rendezvous
Replies: 48
Views: 17197

Re: 11015 - 05-2 Rendezvous

@nayimsust remove flagging. and change the initialization to this

Code: Select all

for(i=0;i<=c;++i)
                    {
                        for(j=0;j<=c;++j)
                            d[i][j]=inf;
                        d[i][i]=0;
                    }
and please remove your code if accepted.
by calicratis19
Tue Oct 27, 2009 1:52 pm
Forum: Volume 117 (11700-11799)
Topic: 11710 - Expensive subway
Replies: 14
Views: 5717

Re: 11710 - Expensive subway

this is a straight forward mst problem. but i think from your algo that you are using bfs.try with kruskal or prim.
by calicratis19
Mon Oct 26, 2009 8:11 pm
Forum: Volume 105 (10500-10599)
Topic: 10525 - New to Bangladesh?
Replies: 50
Views: 20254

Re: 10525 - New to Bangladesh

this is a very simple floyd warshell problem. implementing almost the standard code can get you ac.
only special case is that, same edge can repeat with random values in input. so you have to take the minimum time and distance .
if you still cant get ac then you can post your code .
thank you.
by calicratis19
Fri Oct 23, 2009 2:21 pm
Forum: Volume 116 (11600-11699)
Topic: 11693 - Speedy Escape
Replies: 7
Views: 3545

Re: 11693 - Speedy Escape

getting WA in this prob. i used dijkstra. my procedure is 1)for all 'e' calculate the distance between police and highway exit and also between brothers and highway exit. while calculating the distance between brothers and highway exit i didn't use the node where the police starts. 2) if the the bro...
by calicratis19
Fri Oct 23, 2009 12:22 pm
Forum: Volume 116 (11600-11699)
Topic: 11693 - Speedy Escape
Replies: 7
Views: 3545

Re: 11693 - Speedy Escape

i think your procedure is wrong.
in problem statement it is told that the brothers car is faster than the police. so i think distance doesnt matter.

try this case
input

Code: Select all

1
3 2 1
1 2 100
3 2 3
2
1 3
output

Code: Select all

5333.3333333333
by calicratis19
Mon Oct 05, 2009 6:51 am
Forum: Volume 116 (11600-11699)
Topic: 11666 - Logarithms
Replies: 16
Views: 6214

Re: 11666 Logarithms WA again and agian

my ac code gives, 0 0.00000000 1 0.26424112 1 -0.10363832 1 -0.47151776 1 -0.83939721 2 0.18798830 2 0.05265302 2 -0.08268227 2 -0.21801755 2 -0.35335283 2 -0.48868812 2 -0.62402340 4 -0.83156389 5 -0.34758940 6 0.25637435 9 -0.23409804 12 0.26269452 16 -0.12535175 21 0.24174396 you can visit here h...
by calicratis19
Wed Sep 30, 2009 10:31 pm
Forum: Volume 112 (11200-11299)
Topic: 11267 - The Hire-a-Coder Business Model
Replies: 7
Views: 3699

Re: 11267 - The Hire-a-Coder Business Model

but sometimes you can take more egdes not only those needed to form spanning tree this means you can add edges which have not been used in the mst but have negative cost . u can add these negative cost to reduce the total cost of the mst.i hope you understand now. but i think you should have unders...
by calicratis19
Fri Sep 18, 2009 11:50 am
Forum: Volume 5 (500-599)
Topic: 544 - Heavy Cargo
Replies: 32
Views: 14657

Re: 544 - heavy cargo

can anyone please tell me how to solve this problem with mst.i solved it with floyd warshell. but i want to know how to solve with mst. i would prefer kruskel much :D :D .
thank you .


EDIT: solved with kruskal. :D :D
by calicratis19
Sun Sep 13, 2009 1:06 am
Forum: Volume 5 (500-599)
Topic: 549 - Evaluating an Equations Board
Replies: 13
Views: 5002

Re: 549: Error in input set?

@nayimsust check this input

Code: Select all

1

E
AB
CD
BE
CE

this is not the thread for this problem 8) 8) and when you post your code please try to follow the procedure :wink: :wink: . like i have posted the input.it would be easier to look at the code. :D
hope it helps.
by calicratis19
Sat Sep 12, 2009 3:41 pm
Forum: Volume 101 (10100-10199)
Topic: 10158 - War
Replies: 23
Views: 9440

Re: 10158 - War

can anyone please discuss how to solve this problem. i cant figure out how to do it with union find.

i figured out how to mark enemies.but couldnt figured out how to find common enemies.

any help will be appreciated .thank you.
by calicratis19
Sat Sep 12, 2009 9:01 am
Forum: Volume 114 (11400-11499)
Topic: 11474 - Dying Tree
Replies: 7
Views: 4046

11474 - Dying Tree_wa

AC :D
by calicratis19
Thu Sep 10, 2009 11:25 am
Forum: Volume 113 (11300-11399)
Topic: 11360 - Have Fun with Matrices
Replies: 38
Views: 13124

Re: 11360 - Have Fun with Matrices

thanks lnr :D :D .i have found my bug at last. it was when input will tell me to do transpose twice.then my code will give me wa.

thanks again.but my input taking is good though :wink: :wink:
by calicratis19
Wed Sep 09, 2009 6:17 pm
Forum: Volume 115 (11500-11599)
Topic: 11503 - Virtual Friends
Replies: 49
Views: 18004

Re: 11503 - Virtual Friends

you are not properly handeling the cases where two nodes cant be connected.

try these inputs

Code: Select all

1
6
a b
b c
e f
e g
c d
f g
by calicratis19
Fri Sep 04, 2009 7:59 pm
Forum: Volume 2 (200-299)
Topic: 280 - Vertex
Replies: 95
Views: 22644

Re: 280 Vertex WA Help!!

@looserdgr8, u should remove your code.thanks.

Go to advanced search