Log in

No account? Create an account
color cycle (slow)

Kistaro Windrider, Reptillian Situation Assessor

Unfortunately, I Really Am That Nerdy

Previous Entry Share Next Entry
TCCC: Advance
color cycle (slow)
My score: 897.13
Cutoff: 191ish

I'm on to round 2! Take that, stupid statistic generator saying I only had a one out of three chance! Nyah! Nyah!

I have coding!

Oh, and for the final coolness? I got a rank up. My rating is now 1528, which is over the cutoff line; my username is now in yellow. I like the color blue, but I think I like the rank of yellow!

  • 1

Blue is a good color.
Yellow is yet more beautiful. Congrats again, see you in Round 2 :)

Great job on winning your room, Antimatter! I'm just rather lucky that the problems were algorithmic instead of mathematical. And the whole thing was at D2 difficulty.

I never did figure out how to solve the 500- I'll wait for the write-up, reading other peoples' algorithms doesn't help because they look exactly like mine. I just came up with some version with a logic error somewhere that resulted in it returning the correct first element and then nothing but zeroes. Second place in room 39, if you want a look.

Basic algorithm: topological sort.

What topo sort does is it takes a directed graph with no cycles, and returns an ordering of the vertices such that for any given vertex, all vertices that point to it come before it in the ordering.

The vertices here represent flowers, and an edge from one to another means that the latter blocks the former on some day. Then all that needs to be done is to topologically sort the graph.

As for the actual implementation of topological sort, you can Google for it, because I'm too lazy to type it here, sorry :/

I'll check it out, thanks. (Actually, I suspect that topological sort is in my Algorithms and Data Structures textbook.) I couldn't make heads or tails of half the implementations.

I'm still wondering what mine did, though, because even if it gave the wrong output, it shouldn't have given that particular variety of wrong output.

Congratulations! I beat the odds 3 times in the TCO to advance to Round 3 (and win $75!)

Now my next question is,... how did you ever figure out that 1000?

Good luck in the rest of the rounds.

Yeah, too bad they're not giving out prizes unless you make it to the finals of the TCCC.

I used what is probably considered the alternate method (relative to the match write-up) to solve the problem. I globalized the pond string, then I created a recursive function that takes the current pond location and how many skips the rock has left. If the pond location is an X, return 0.0 (kerplunk); if it is water, then if skipsLeft is zero, return 100 (anti-kerplunk); otherwise, check the lookup table (the dynamic programming cache). If this has not yet been computed, return the average of recursively calling this with a decremented skipsLeft and a pondLocation incremented by 1 to skipsLeft. (It is put in the DP cache, of course, and the location is called with a modulus to the size of the pond.)

My solution actually fails, but nobody saw it. In the case where an X is the first thing in the pond, it will return 0, whether that's the correct answer or not. But nobody caught it, so I've still got my 750 points. (Or was that what it's supposed to do?)

Ack, I just re-read. The first char of pads is always open water, so my case can't happen. It works, then. My bad.

I'm not sure if it's the virus (or bacteria) that has taken over my body, but I can't follow that "algorithm". Glad for you though!

  • 1