EDIT: The PSU somehow works now. Except I fried the wires for the lights in front of the box. Not critical, and thankfully I didn’t have to fork out more money :/
My day started at 4:45am this morning. That was around 4 hours of sleep, although I managed to catch some on the flight down to Sydney.
Today was the date of the UNSW ProgComp 2k5 (don’t click if you don’t wanna know what happened :), an Australia-wide high school programming competition, designed to attract the most elite programmers from around Australia.
Previously, our team has won the competition back in 2003 (a fluke, I’d say) but we only solved two questions out of six (excluding the tie-breaker question) as the questions back then were more algorithmic-based then they are now. Due to that, we couldn’t take advantage of the algorithmic questions as my friend pretty much rips through those questions as he recently obtained a bronze medal at the IOI2005, one of the four(?) people representing Australia. Also, we somehow managed to win with VB6.0 in 2003, ousting C++, Perl, Python and Haskell (the tiebreaker was with C++).
Before we even got to the airport, however, we already hit a snag.
There was no box for my computer.
Due to the problems they had with making sure each team had the right software and whatnot on their computer, they made it so that we had to bring our own. So, a large bag and two blankets later, we checked the luggage in, and prayed that it wouldn’t break.
Location: Sydney, UNSW Campus.
We made our way to the venue, which was the Beagle(?) lab in the Engineering building (they had a funky chocolate mountain at the entrance, we went there after the competition and dipped some marshmellows in that, great stuff) and dropped our stuff in the storage room as the setting up period doesn’t actually start for another 45 minutes. Some food and a can of V later, we were back and unpacking our stuff.
Snag number two: Box doesn’t power up.
I pretty much shat myself when this happened. The computer only gets power for half a second before dying, and it only works again if you unplug the power supply, and replug it back in. I assumed it was the power supply at fault, so we searched for a power supply, as I thought there had to be one in their computer science building.
Fifteen minutes later of pants-shitting, they returned with a power supply and threw it in for us.
Until I found out it had a hard switch at the back.
I bounced off a couple of walls as the box powered up. That’s another hurdle passed.
Was a few minor snags with trying to find printer drivers for the printer they supplied us (we were the only ones running Linux there), before I just forgot to start the CUPS daemon.
The competition started.
Five problems: Mattress, Stencils, Manuscript, Censor, Sudoku.
Mattress: Simple problem involving a depth-first search (I think, anyway) to find the most effecient way of rotating a mattress to even out wear and tear. We didn’t bother attempting this question.
Stencils: My friend had that one. It was a fill problem, probably the most algorithmic one there. We got this after two tries.
I should explain the team that we had at this point. There was my friend (Year 12), another guy we know (Year 11) and me (Year 12). Us Year 12’s had the programming knowledge and I had the non-algorithmic based ones whereas he had the algorithmic ones. The Year 11 guy was there to solve the problems by hand 😀
Manuscript: Letter substitution cipher on a 30kb file. We didn’t actually have to use a program to solve the cipher, but it had to have a programming element. Year 11 guy solved this manually, then we coded the decryption function (which took a lot longer than it should’ve :/)
Censor: My problem. Involves a ‘bad word’ list and the text to censor. Censored text must be bound by non-alphanumeric characters. Screwed up so bad… spent maybe an hour or so working in C++ before I realised it would’ve been a no-brainer in Python. I switched languages and converted 2 pages of code into 10 lines (2 lines actually contained the logic). Hit a snag with escaping characters, though. Thank God for regex. And thank God I learnt Python like a week ago, just for kicks.
Sudoku: Friend also had this one. You can read all about Sudokus here. We got the basic part out, didn’t get the advanced part though (would’ve gotten 15 marks… that’s a fair bit).
Overall Score: 76 out of 100.
The team that came first completed all problems in 1:54 (total allocated was 2:30), which, I have to admit, is an insane effort. gg to them. Our excuse was cause they were a year older and had programming courses at their school. We only get taught VB. Well, that’s our excuse anyway :p
So, we walked away with $400 each (which leaves maybe $150 after airfares and new PSU :/), and a $2000 scholarship to their CSE division (which we can’t use cause we already have a $3000 one from 2003 and we live in Brisbane…).
Not tooooo bad for a day’s work.
My main computer is lying in my room with no PSU, so I’m on the family one. Exam block starts on Monday (English and Japanese, argh) and I have an art film due soon, so don’t expect me to make any progress with inserting.
End of transmission.