Search found 19 matches

by sumantbhardvaj
Fri Jun 01, 2007 6:43 pm
Forum: Volume 9 (900-999)
Topic: 967 - Circular
Replies: 23
Views: 12727

yeah ! you are absolutely right. I was not printing correctly when we have output 1. later on i found the mistake and got AC :P .why do acm problems have such irrelevant output formats.. i nearly wasted 1 hr for that.
by sumantbhardvaj
Fri Jun 01, 2007 6:06 pm
Forum: Volume 9 (900-999)
Topic: 967 - Circular
Replies: 23
Views: 12727

Somebody plz provide me some test case.. I m constantly getting wrong answer for this problem..thanx in advance
by sumantbhardvaj
Sat May 19, 2007 10:41 pm
Forum: Volume 104 (10400-10499)
Topic: 10400 - Game Show Math
Replies: 32
Views: 17612

I am aquainted with Bit masking concept.. but here in this situation, i could not imagine how bits can be used to mark the reached position ( as mentioned by Adrian ) if we do it by an array we need a 64000 x 100 size of array.. but masking can be done only for integers upto 64. Can anybody explain ...
by sumantbhardvaj
Mon Apr 16, 2007 6:20 pm
Forum: Volume 100 (10000-10099)
Topic: 10032 - Tug of War
Replies: 91
Views: 32079

What is the correct approach to this problem .... ? somebody plz suggest.
by sumantbhardvaj
Mon Apr 16, 2007 2:46 pm
Forum: Volume 106 (10600-10699)
Topic: 10600 - ACM Contest and Blackout
Replies: 34
Views: 13217

got ACC :) :)

changed it from PRIMS to Kruskal ..
by sumantbhardvaj
Mon Apr 16, 2007 1:51 pm
Forum: Volume 100 (10000-10099)
Topic: 10067 - Playing with Wheels
Replies: 62
Views: 24046

I have got this problem ac long ago.. just forgot to remove code later..

for BFS , Think abt some pruning
by sumantbhardvaj
Mon Apr 16, 2007 8:43 am
Forum: Volume 100 (10000-10099)
Topic: 10032 - Tug of War
Replies: 91
Views: 32079

I am facing TLE in this problem. I tested my program for your I/O and it gave following output : 2642 2642 ur second I/O is invalid. since weights should be <=450 By the way, what is your algo ? I used top down approach with memoization to produce all possible sum using n/2 weights with some pruning...
by sumantbhardvaj
Tue Apr 10, 2007 10:16 pm
Forum: Volume 106 (10600-10699)
Topic: 10600 - ACM Contest and Blackout
Replies: 34
Views: 13217

10600 Why WA ?

I tried to implement the algorithm mentioned in cormen for finding the second best minimum spanning tree . (along with prims to find minimum spanning tree ) but it is giving wrong answer in 0.029 secs.. :cry: :cry: some body plz provide me with some test cases or have a look at my code.. :( :( :( co...
by sumantbhardvaj
Thu Mar 22, 2007 12:27 am
Forum: Volume 100 (10000-10099)
Topic: 10067 - Playing with Wheels
Replies: 62
Views: 24046

why i m keep on getting TLE in this problem. I hv applied simple BFS.

Code: Select all

 ACC :)

How can i make this algo efficient ??
by sumantbhardvaj
Tue Mar 20, 2007 4:05 pm
Forum: Volume 100 (10000-10099)
Topic: 10037 - Bridge
Replies: 84
Views: 23916

well , as u would hv already seen in previous posts that there are two possible strategies...

if A,B,C....Z are time in ascending order ,

then Strategy one: AB+A+YZ+B
Strategy two: AZ+A+AY+A

So u r required to check for both and choose min out of them..
by sumantbhardvaj
Mon Feb 05, 2007 8:08 am
Forum: Volume 100 (10000-10099)
Topic: 10003 - Cutting Sticks
Replies: 59
Views: 24274

10003 TLE

This problem is based upon Matrix Multiplication . I wrote a top down DP solution to it .which is being timed out. Can't we have top down solution to this problem get accepted ?? Or if there is any mistake in optimization in solution then plz point it out. My code goes as follows. #include<string> #...
by sumantbhardvaj
Thu Feb 01, 2007 10:28 am
Forum: Volume 100 (10000-10099)
Topic: 10004 - Bicoloring
Replies: 93
Views: 29300

Yeah thanx rio ,

I got the error , Now i m puzzled how can i use Floyd Warshall to find cylces of odd length ?

I mean is it useful to apply FY here. Plz throws some light
by sumantbhardvaj
Thu Feb 01, 2007 10:09 am
Forum: Volume 100 (10000-10099)
Topic: 10004 - Bicoloring
Replies: 93
Views: 29300

10004 WA

earlier I solved this problem using a different approach but this time i tried to use Floyd warshall algorithm to solve it.. Using FY , i tried to find cycles in it of length 3. ie. if i is connected to j and if i is also connected to k and k is connected to j then its Not Bicolrable. But my code is...
by sumantbhardvaj
Thu Jan 11, 2007 8:05 pm
Forum: Volume 3 (300-399)
Topic: 348 - Optimal Array Multiplication Sequence
Replies: 22
Views: 3895

Thanx rio ... on carefully watching at my output .. i found tht i had used capital X instead of small X
by sumantbhardvaj
Thu Jan 11, 2007 3:47 pm
Forum: Volume 3 (300-399)
Topic: 348 - Optimal Array Multiplication Sequence
Replies: 22
Views: 3895

348 why PE

code removed after being accepted.. :lol:

Go to advanced search