Well, the news you were all waiting for: we came 6th out of the 12 teams present in this particular heat. Since this was our first time participating in this event, I’m really pleased with our result. Of course we got to the event slightly late, so we missed the introductions and the coffee (no caffeine!). We called ourselves “Dude, where’s my keyboard?” and, fittingly enough, a guy who called himself “Dude, where’s my compiler?” showed us around… How sad we all are!
Each team gets its own room in the rather nice IBM lab / executive playground, which appears to be a converted mansion, or at least built in that sort of style. We certainly had to drive a hell of a long way through grassland before we got anywhere. Each room was kitted out with a brand new IBM ThinkPad (yuck… but new!) with a big 19″ LCD screen, a titchy little projector, a printer (we had two actually), and the all-important USB pen drive to hand in our work. We were all given 4 problems, and four hours to solve as many as we could in.
The first problem we (along with the other teams) attempted was to code a small program that took times like 1:30 and 9:39 and turned them into sentences like “Half past one” and “Twenty-one minutes to ten”. We did it with a little bit of logic, one array with all the hours (“one” to “twelve”), and one big array with all minute combinations and a small string to replace (“% o’clock” to “one minute to %”). Call us cheats, but it worked. The second part of that question was to extend the program so that it worked for all 24 hours of the clock, instead of just from 1:00 to 11:59 (including noon and midnight).
Just after we finished this question (worth 2 points because of its 2 parts) was time for lunch! They supplied a few sandwiches, drinks (Coke = caffeine at last!), crisps (not chips :-D), and a seriously (un)healthy quantity of fun-size sweets. The perfect thing for a code-fest!
The next problem we attempted was a scoring system for a card game whose name I have forgotten… This is one of those problems that looks simple on the surface until you start trying to put it into code. The first few rules came easily, as did the 3 extra rules, but two rules eluded us for hours until they gradually fell into place (using a combination of
HashSets, recursive functions, and some serious brainstorming). We handed in our last attempt 15 minutes past the deadline, but it still failed. We went upstairs and within a few seconds we had sorted the problem: we put a
++ increment operator when we actually wanted a += 2 expression.
A lot of the time Sam and I were struggling over our card game, Ben was looking at and trying to solve the problem we would have attempted next: a jigsaw puzzle-like solver program. The aim of this was to read in some ‘pieces’, then try to make them fit in the right order to make up the puzzle. Sounds easy, but this was yet another mind-bender that we still want to attempt for the sheer heck of it. The main problem with this one is not to get it to work, but to get it to finish within the time limit of 5 minutes…
And finally, the fourth problem was about Lagrangian Points, and to be completely honest we just completely ignored it since it looked too math-y for us! Maybe we’ll attempt this one later.
So, Score: 2, Time taken: 1:38 (if I remember correctly), and that got us 6th place. Had we completed the card scorer we would have had 3 points and probably 5:15 or so time taken, which might just have got us 4th place, but we definitely would have had 5th. I must admit I would have been a bit gutted if we had won: the prize for this heat was a copy of Microsoft VisualStudio.net (IWNL). I suppose I could have made a small fortune selling it on eBay!
All in all, a great time was had by all. It was a great mind exercise and Ben should be actively seeking new competitions and contests of the sort for us to take part in.