Search found 44 matches

by LithiumDex
Mon Oct 08, 2007 7:19 pm
Forum: Volume 8 (800-899)
Topic: 829 - Almost Balanced Trees
Replies: 16
Views: 8877

-almost well balanced: abs(mindepth(root)-maxdepth(root)) <= 1 -one tree per line -remeber to output -del in case of delete! (that's what got me AC) note to judge, I have received rank 1 on this problem.. even though other's have solved it in 0.000 before me... is this do to memory usage that I am n...
by LithiumDex
Sat Jul 14, 2007 11:56 pm
Forum: Volume 9 (900-999)
Topic: 902 - Password Search
Replies: 68
Views: 31599

I used hashing.. I tried TRIES, they would have been fast if I had been able to use fixed links and not get MLE. Anyway tho, hashing is fast enough.. and if you get the right hashing function (i.e. one of the more sensible obvious ones), you can avoid key errors while using unsigned int's. Also... I...
by LithiumDex
Sun Jul 01, 2007 3:10 pm
Forum: Volume 7 (700-799)
Topic: 723 - Comment Removal
Replies: 16
Views: 9866

My program passes all the test cases here (the good ones anyway) My questions are: - Do we remove all trailing spaces from the end of a line? - If the last line in the file does not end with a \n, should a \n be displayed? - In pascal, this is a valid comment: { *).. not here? - This sounds kinda du...
by LithiumDex
Thu Jun 28, 2007 4:28 am
Forum: C
Topic: Illegal Instruction (SIGILL)
Replies: 3
Views: 4905

SIGILL can be caused by an array out of bounds, i.e. memory containing code is overwritten with garbage and then executed.
by LithiumDex
Sun Jun 17, 2007 1:45 am
Forum: Volume 3 (300-399)
Topic: 303 - Pipe
Replies: 5
Views: 1500

You know... I always find it ironic that almost every time I post for help, I then solve in a few minutes later. (This is one of those times).. I used a value of EPS around 0.0000001, and doubles... and that gave me the AC (giving away too much? I think EPS should have been stated in the problem sta...
by LithiumDex
Sun Jun 17, 2007 1:34 am
Forum: Volume 3 (300-399)
Topic: 303 - Pipe
Replies: 5
Views: 1500

I'm also getting WA... However in my tests, our programs produce the same result, with the exception of this test case: 20 0 .5 10 -.5 20 .5 30 -.5 40 .5 50 -.5 60 .5 70 -.5 80 .5 90 -.5 100 .5 110 -.5 120 .5 130 -.5 140 .5 150 -.5 160 .5 170 -.5 180 .5 190 -.5 The only solution too this, is a horiz...
by LithiumDex
Thu Jun 07, 2007 1:57 am
Forum: Volume 112 (11200-11299)
Topic: 11214 - Guarding the Chessboard
Replies: 13
Views: 4682

I have the running theory.. that in the rare(?) case that the greedy algorithm fails, it will only be off by one -- I wonder if there's some way to detect this case quickly and subtract one? hmm...
by LithiumDex
Thu Jun 07, 2007 1:22 am
Forum: Volume 112 (11200-11299)
Topic: 11214 - Guarding the Chessboard
Replies: 13
Views: 4682

There you go... I'm working a brute force solution right now... TLE, but I've got it down to just a bit over 20 seconds (on my PC) with 13 test cases of grids of 9x9 X's

[EDIT] Got it down to 4.6 seconds. Thanks, and AC :D
by LithiumDex
Thu Jun 07, 2007 1:14 am
Forum: Volume 112 (11200-11299)
Topic: 11214 - Guarding the Chessboard
Replies: 13
Views: 4682

Again, same.
by LithiumDex
Thu Jun 07, 2007 12:58 am
Forum: Volume 112 (11200-11299)
Topic: 11214 - Guarding the Chessboard
Replies: 13
Views: 4682

My program also outputs 2 for that case.
by LithiumDex
Thu Jun 07, 2007 12:09 am
Forum: Volume 112 (11200-11299)
Topic: 11214 - Guarding the Chessboard
Replies: 13
Views: 4682

(Oops... last time I was here there wasn't a post, ah well... might as well delete my old one) I'm getting WA.. can someone explain why my algorithm won't work? It is.. minQueens = 0 While boardNotEmpty: PlaceQueenWhichEliminatesLargestNumberOfX's EliminateX'sForThatQueen minQueens ++ Loop. Judging ...
by LithiumDex
Sat May 26, 2007 11:21 pm
Forum: Volume 107 (10700-10799)
Topic: 10715 - Cat
Replies: 11
Views: 6744

After a little bit of a headache, and a few *cough* submissions, I solved it in 0.031 -- With a GA (that's Genetic Algorithm)

I used to obsessed with GA's... when all else failed, I would write a GA... let's hope this doesn't cause a relapse, lol :P
by LithiumDex
Sun May 13, 2007 12:40 am
Forum: Volume 4 (400-499)
Topic: 474 - Heads / Tails Probability
Replies: 50
Views: 10456

I did the exact same thing, and then got AC -- If not directly a bug in the judges output, it must have been a bug or "nuance" in the library used with the code to produce that output.
by LithiumDex
Wed Apr 25, 2007 1:13 am
Forum: Volume 100 (10000-10099)
Topic: 10023 - Square root
Replies: 121
Views: 26721

bigInt... Large base = more speed? (10023)

I recently solved 10023 (sqrt) using a method described in the forms, and my bigInt class used base 10 digits, in a time of about 5 seconds -- It's seems pretty obvious too me, that if I had used a higher base (i.e. base 10^9) -- it would have greatly increased the speed of addition and subtraction,...
by LithiumDex
Mon Apr 23, 2007 8:57 pm
Forum: Algorithms
Topic: Traveling Salesman Problem .. MST or not?
Replies: 5
Views: 2862

I understand, thanks.

Go to advanced search