Monday, December 8, 2008

The ACM-ICPC Experience

As this year’s ACM ICPC Regionals played out in front of us, our road to the ICPC world finals seemed to run into a dead end. Despite the failure, I feel obliged to put this one down in my blog, a permanent record of how and what happened, though I’m pretty sure I’m not going to forget any of the details any time soon.

For the uninitiated: The ACM ICPC is one of the most coveted programming competitions for college students. ACM stands for Association of Computing Machinery, and is the world’s largest educational and scientific computing society. ICPC is short for International Collegiate Programming Competition. The ICPC is open to contestants from all over the world who happen to be studying in colleges, during the prime of their algorithmic lives. There are 5 regions, Asia, Africa and the Middle East, Europe, North America and South Pacific. Contestants are to compete in teams of three, with a coach, and an optional reserve candidate, and take part in an online round, to qualify for the onsite regional finals. The top two to three teams from each region compete in the world finals.

Suren, Nutty and I had qualified to take part in the regional finals, to be held at Amrita Vishwa Vidyapeetham, Amrita University, Amritapuri Campus, Kollam, as team LRSL (Last Row of Sun Lab: something of a cult back in college). I don’t think I’d be speaking for myself when I say what followed were an amazing four days that left us with memories of a lifetime.

Day 1

We were supposed to check in at Amrita on Day 1. Nutty had made his way to campus by himself. Suren came over to my place in the morning, and we left for the college by train in the evening. Not having travelled along this route for a long time, I was quite excited at the prospect of a train ride through the beautiful green countryside of Kerala. The speed of the trains plying on this route adds to the fun.

We arrived at Karunagapalli Railway Station at around 6:45pm where a car was waiting for us. We hopped on, and made casual conversation with the volunteer who had come to pick us up, as we sped to the campus. None of us had ever been here before, and had no idea what to expect. We were met with a warm reception, a host of cheerful volunteers who made it clear they were there to help, and a college adorned with banners, balloons, and tapestry, all exuding the idea that something big was coming up, and something big certainly was.

We completed the registration process, and were handed a bag of goodies, a notebook, a pen, a bunch of brochures and texts related to the college and ICPC, and a lovely ICPC T-Shirt, and were then led away to our room.

The hostel we were meant to stay in was as good as a lodge. The door of our room bore an ICPC label that brandished our team name and institute. A comfortable room, furnished with sleek cupboards, tables and cots, clean mattresses, the softest pillows and long blankets you could wrap yourself in like a candy, and a bottle of water for each inmate, we seemed to have everything we ever wanted.

Day 2

Our first full day in the college, Suren and I took in the complete picture of what our hosts had done to the college for our visit. Majestic ACM ICPC banners proclaiming the battle of the brains that loomed in the near future livened up the hallways. The pillars bore balloons of blue, yellow and red. Twenty-five foot leaves of ICPC colors hung from a disk suspended in the middle of the quadrangle of the college’s main building. The quadrangle was further decorated with two foot dice, and two dozen B, Y and R balls.

We were given the official welcome in the traditional Keralite style, with a volunteer applying chandan, followed by a thalappoli (a path marked by beautiful girls wearing saris and holding oil lamps on either side) leading into the college main building, and panchavadyam (music using five different instruments, although I didn’t care to count) in the background.

Breakfast, lunch, evening snacks and dinner were served at the campus canteen, modified into a makeshift mess for the ICPC contestants. Food was exquisite, and I ate a whole day’s worth for each meal. They followed a buffet system, and never before had I seen such a variety of rich food on my plate during breakfast, or gone for thirds for lunch, or enjoyed a purely vegan dinner so as to fill myself up till my vision blurred.

We used to get idiappams, appams, uppuma etc. for breakfast, along with as many slices of bread as we pleased, with jam, and the best butter served as cubes, followed by a bowl of corn flakes with milk, and tea or coffee (poor Suren couldn’t have any of these, due to his hostilities with milk). Lunches were topped off by delicious curries and one variety of payasam every day. The tea alone was sufficient reason to show up for snacks at five. Dinners saw roti and either fried rice or pulao, with dal, gobi, paneer and mushroom dishes to go along, hardly leaving space in our tummies for dessert, mostly ice creams, fruit salads and juices. Fruits were served regularly with lunch and dinner.

We had two practice contests on Day 2, one in the morning, and the other later in the night, after supper. Practice contest problems were pretty simple, and quite rightly so: practice time is meant to get yourself used to the environment, and work out different specifications, such as how much memory and stack space your code is allowed, how many instructions the judge machine can run per second, what warnings are treated as errors, and what warnings are ignored, what libraries are allowed and so on. Both contests were supposed to have the same problems, so we went for just one, got all the specs we needed, and left after submitting both problems.

In the afternoon, we had a beach trip. The previous day, during the registration process, we were given the choice of either going to the beach, or playing in a variety of indoor games, such as chess, carroms, and badminton. We pretended to consider our options for a while, though we had telepathically debated the issue, and decided on the beach trip even before the question was complete. Beaches are always most fun when you have people your same age and intentions all around you. There were five teams from my college, so there was no lack of friends to make merry with. This beach was one of those remote not-commercialized-yet getaways we urban folk dream of. The water was pure, and the sands were free of the usual plastic and paper wastes we normally find at the most famous beaches around the country. Get wet we did, though I had to hold back a bit for fear of taking ill before the contest.

We also had the formal inauguration ceremony. Nothing unusual there, it was just a few speeches followed by a mohiniattam by a student of the host college. We got to look around and see all the big brains from around Asia gathered there. Among the people that caught my attention would be a bunch of students from Singapore, a coach from Kazakhstan that seemed to move around like a short circuited robot (although a lot of girls were tailing the guy the next couple of days, so I have something to be jealous of), and a funny looking girl from Bangalore (I think, my intelligence sources are questionable) that keeps spotting me every time I look at her (and this continued as a vicious circle till we left, me, looking at her to see if she’ll spot me again, and she, spotting me looking at her).

The Big Day

The contest was scheduled for 8:00am on the third day. We got up early, quite against tradition, freshened up and trotted off for breakfast. I was feeling the pressure then, struggling with my food and having second thoughts about the amount of sugar in the corn flakes. To make matters worse, we ran into The Great P, intimidating, as a God watching over a battle of mere mortals.

The contest environment was grand. Good computers with my favorite DELL keyboards, with Ubuntu 8, and with just two teams in every row, giving you sufficient space to move about to let out steam to keep your head from overheating. The computers for each team’s use were marked up by a small radio sized pyramid bearing the ICPC logo and the team name on it. Each time a team gets a problem right, a volunteer comes along and attaches a balloon to the pyramid, so that at any point of time, you could just look around to get an idea of how the other teams are dealing with the contest. The balloons would also be of the same color as the color code for the problem, so you can also see which problems are being solved the most, without looking at the ugly percentages in the statistics page. Of course, I was quite confused why the volunteers were giving us fewer balloons than everybody else, and needed Nutty’s help to figure it out.

Supposedly being the best coder (in terms of speed, correctness, etc., nothing to do with skill) in the team, I was given the responsibility of implementing the solutions my teammates came up with. I’m not sure whether I had wanted to do well, and I was worried if I could, or whether I was simply scared of making mistakes and letting my teammates down, but that’s exactly what I did.

I had a shaky start, having trouble implementing the easiest problem of the lot. After half an hour of toil, I finished the code, and submitted it, and thankfully got it right. We were in a good position then; even after what I consider one of my slowest and sloppiest pieces of work, it seems most teams submitted the problem after us, either because they were having the same kind of trouble, or because they saw the problem later.

I messed up our second problem with two wrong submissions, racking up 80 minutes of penalty time, before managing to get it right. I was getting up to speed: even with two wrongs, we were looking good amongst the other teams who got around to completing their second one eventually. Most of the other problems were tough, and they made the difference between the best and the rest. The top team got seven correct, while second, third and fourth managed six. We were down in twenty fifth, a good start at ICPC, but not good enough, at least in my view. All five teams from our college were separated by less than a dozen or so ranks. I was gloomy, and wasn’t very social, to say the least. I didn’t respond to chat all afternoon, though I’m not the least bit apologetic: my status message clearly said I wasn’t in the mood, except for the choicest few.

By evening, I was feeling better, and so was everyone else. We went for tea, and by the time we made it to the auditorium, the presentation ceremony had started. Luckily we got there before our team’s turn came, and we had a chance to go on stage and receive the certificates amidst a flurry of flashes and a steady applause from the crowd. I really appreciate that they took the trouble of presenting every team with certificates on stage. It made me feel a whole lot less of a loser.

We had a good dinner, and were asked to stay back for the official photo session. We sat on the soft green lawn discussing rarely-told stories about each of us: funny, weird, goofy, romantic and what not: geeks keep no secrets from fellow geeks. My senior, who had made it to ICPC as part of another team, and I discovered we had nurtured a crush on the same fellow competitor after getting there, a good looking mallu girl who sure could code, and were fighting over her. Everybody had something to talk about, and we quickly left our failures behind and were moving on already.

Day 4

Hospitality seems abundant at this college set in a village town. The fourth day saw us driving off on five buses on an excursion to Thenmala, a hill station in south eastern Kerala, one of the more recently discovered and exploited tourist spots, a plethora of awe inspiring landscapes, with a few monkeys thrown in.

The bus ride was fun, though not everyone would agree. I’m the kind that can sit in a cage on wheels peering outside for any amount of time without complaining. Most people were sleeping in the bus, because we had reported at 5:45am and started in another three quarters of an hour. The bus ride was a whole lot more fun once they woke up.

We stopped at the Lookout Point for breakfast: nothing like a breathtaking view of a vast expanse of forests endorsed by a long range of evergreen hills grayed by the slightest cover of mist to help digestion.

We climbed up what are called the Ambanaad Hills, if I remember the name right. The road was treacherous, with gutters, twists and turns making the bus feel like a raging bull in rodeo. The climb was so steep and the roads so narrow at parts that only two of the five buses could make it all the way up, and the other three stopped midway, and had to wait for the two to ferry all of their passengers the rest of the way batch by batch. The hairpins were so sharp that the buses couldn’t take them in one go. I was sitting at the very back, and wasn’t less than a little scared when I seemed to be hovering in mid air, as the buses backed up till their tires were dangerously close to the edge, so that they could make the turn.

The treacherous climb was well worth the boredom and scares as we saw when we came to our destination. We pulled up somewhere close to the top of a hill, and hiked up the rest of the way. We came across a tea plantation interspersed with spices like pepper. Most people were interested in this, although it was something I used to see in my backyard: being a local sure doesn’t help sightseeing. We saw several exotic plants on the way, the most memorable being one with red leaves, which, when seen from a distance, look like flowers. There were several rock faces that begged us to climb them, and several that looked out of the hill, and into the sea of green far down below, and the hills and the trees in the horizon, silhouetted against the dim white of a cloudy sky. I’m cutting this paragraph short for want of words.

We made our way back down to have lunch at a KTDC restaurant. There was a bus waiting for us. A few volunteers were already in it, and the other contestants made their way in. My college mates and I were the last to get there, so we were left with no seats. Seeing this, the staff from the host college started asking them to get down, so that we may take seats. After having leached off their hospitality for the past three days, we felt like rich little bastards throwing their weight around. We tried telling the staff that we were quite willing and able to stand for a while, but they were relentless. We even told the students that we really didn’t want them to vacate for us, and despite our sincerest efforts, they merely smiled politely and left the bus, saying it was no trouble at all. I could only think of what would have happened in a similar situation in a college like mine. The faculty would just stand around talking on their cell phones, order the students to get down once they had finished discussing their family matters, the students would have been quite unwilling to give up their hard earned seats, and at best, would’ve started trickling out sneering at the visitors. I realized I had written an All India examination, and after so much effort landed up in a place that treats virtues as vice, and holds no values dear.

After lunch, we visited the adventure zone, which had a lot of fun stuff to do, such as mountain biking, boating, shooting and river crossing. Shooting was fun, because I got to show up Suren, who was a reputed rifler, having gone to an NCC camp and everything. I made him wish he hadn’t given me advice about the calibration. River crossing was more of a pond crossing. I don’t think the water made any difference. The robotic Kazakh coaching darting across the river (pond) on a flying fox cheered up the ladies.

We returned to college after having snacks from the same KTDC restaurant. The driver we had for our bus was quite a Schumacher in the making. We were scheduled to get back to college by 9:45 pm, but he made it by 8:45 and that after taking some five minutes out to refuel. We just had enough energy left to have dinner, pack up and go to sleep. Suren had left that night itself, and I, the next day morning, leaving Nutty to stay on till the evening.

A Word of Thanks (well, two of them)

I really appreciate the amount of toil our hosts had undergone to put up a great show. Being a Keralite, I’m no stranger to the widely acclaimed Malayalee Hospitality, having been on either end of it myself, but what we saw there was really something else. It felt really nice to walk up to a help desk, and find that the volunteer there actually cares about your predicament, and didn’t think twice before going out of his/her way to tell you what you wanted to know, or get you what you wanted to have. To see that the students were doing what they did of their own accord, as exemplified by the bus drama, and not as a result of threats from the staff was quite inspiring.

Credit must go to my teammates for putting up with a lifeless git like me. I learnt a lot from the two over the last few months when we were preparing, although, apparently, not quite enough. I began to see the pros in Suren’s use of macros to reduce code size and subtle errors in the process. Nutty’s resilience with problems and his command over math are things you wouldn’t fail to notice. I can’t help but feel more than partly at fault for the bad contest. I broke under the pressure I had mounted on myself.

The Epilogue

The four days have left quite a mark. I saw how many people from different parts of the continent are so much better than me at what I have always tried to excel at. I saw how complacent I had become, when there was so much more to do and so much more to be. I saw how different, and how much healthier the environment at what one might consider a lesser college could be. I saw how much of my own self I had forgotten in the last two years and a half since I got shipped off to college.

Now, my goals seem well defined, my path well etched out. I saw the reality that certain people’s ill-advised or ill-meaning flattery was blinding me to, and it turns out it’s time to turn a blind eye to them. It’s time to shake off meaningless responsibilities that I never had to break a sweat to earn, and that I earn nothing from, save for a few half witted critics and around the same number of imbecilic enemies. It’s time I realized my full potential.

This marks the end of an old beginning.

2 comments:

Sathya said...

dude .. hw do u recollect all those details precisely .. no wonder u knw C++ in ur finger tips :)
and btw... nice one.. think u r on the prep for GRE too chk out my ACM post at http://sathyaphoenix.wordpress.com

ruggedrat said...

Yeah, well, everyone remembers what they care about, I guess.
And no, the way I write is just the way I write, and has nothing to do with the GRE!
And yeah, I'd read your version already :)