Monday, December 18, 2006

ACM ICPC 2006, Coimbatore Regionals

I intend to describe the contest details in this little blog, and will put up another one on how I had two days of bad travelling a little later:)

So for the uninitiated this is the ACM International Collegiate Programming Contest Regionals, held at Amrita Viswa Vidyapeetham in Coimbatore. Its a team event and Team CMI was Kshitij,Nivedita and myself.

Accomodation, Food blah blah blah


Admittedly all that was good.

Warning: Technical terms follow. Meant for Contest Coders only.

The Contest


There were two practice sessions on Saturday. We sort of skipped the second so that we could get some sleep. The systems were set up in a highly insecure manner: We were given the same system during the two practice sessions and the final contest. The same username and password. And none of the files that we created during the practice sessions were deleted! We had a car(Compile and Run), kar(a Kshitij car), and a code template in place.

So then came the contest. 7 problems. 4 of them simple to implement brute-forces. 1 ultra simple DP. 1 that made no sense at all. At least they had 1 apparently good problem (I don't have a solution till now).

Oh! So you think we did the easy five. Ha! Think again! Trust Amrita to mess things up.

Firstly, consider the fact that there were a lot of typos. In problem D, in the sample input a line read 63 which was crossed off by pen and replaced by 705 on all the question papers. Although being one of the simplest to code, we coded it a little late. By then a lot of people had submitted queries to the judges telling them that the answer should be 63 and not 705. They adamantly said that their test data was correct. We too got 63. And we stopped working on it. Later they sent a Judge warning saying "Please stop working on Problem D, until further clarifications." A long time later they fixed it. This was just one of the errors we encountered there were many others. And most of the time the judges took ages to admit their mistakes.

When you make a submission and you get a runtime error whose description is "close $fd", what do you expect? What do you expect when you get your status as "Invalid Function" (No, not as a runtime error - but as a submission status). What do you expect when the contest environment docs don't mention such things ANYWHERE!?

Lets go through this again. We got the close $fd, on a very simple code which simulates a brainvita game. It was obvious that this was a line from the Mooshak (that was the contest environment software) scripts. Hmmm. Something to do with files?

We didn't come close to guessing it was due to a SIGABRT until the last 5 minutes.

I distinctly remember the day before during the practice session, they had some wrong testdata and in order to test whether it was a testdata problem, we used an assert. As expected the assert failed and we got a Runtime Error with description "SIGABRT".
They seem to have tried to hack Mooshak, or as we had asked the judges during the contest - Are you using a beta version of Mooshak?

The Invalid Function. Well this was got by Kshitij on the DP problem. It sounds so much as though we are using some system call. Ok, so lets remove #include <cassert> and try. Nope not that. Lets ask the judges. Oh you know their reply - something like "Please check your code." Fuck you. What the hell are we supposed to be looking for??? Invalid Function!? We asked something similar to them. We can understand P.E. or W.A. but THIS!?

We spent time debugging, we tried looking for god-knows-what. In the last 15 minutes, we changed the strategy. We were out of the race. We binary searched on the code by commenting and submitting, and eventually found that "Invalid Function" was because of too much output. Wha...!!?? During the course of binary searching an assert failed, we now got "close $fd". We at last found out what they meant in the last five minutes of coding. And why the hell is the error description for SIGABRT changed so drastically from the practice session!!??

It was a very dissapointing day. We were no where near the tops.

Xtc++, the team of Pradhan, Shankar and Rahul from IIT Madras who came second in the Kanpur ACM regionals, were also very far from the top. They had done four problems. They too encoutered one of the "close $fd" or "Invalid Function" problems. Maybe they can still get through using a wildcard because of the Kanpur ACM.

We have to be contented with a crappy T-shirt and bag.


During the "prize distribution" ceremony, one of the guys behind it made a small speech where he said something to the effect: "Last year we had lot of problems with evaluating submissions on time. I think our greatest achievement this year was that all submissions were evaluated immediately." Agreed. I don't think he is aware that most other contests have it that way. I remember last year submissions took more than half an hour to evaluate. Rumours are that the submissions were checked by hand.

Anyway congrats to acmesolvers for coming first.

In the feedback form Kshitij wrote: Either you conduct it properly, or don't conduct it at all. And in my feedback form I controlled myself from using obscene language.

Xtc++ suggested that we all mail some ACM big-guy (I forgot the name they used) and tell them about the Amrita ACM. We don't want an Amrita ACM next year.

2 comments:

Krishnan K said...

a nice experience to read...

Unknown said...

this blog is helpfull to me. our team is going for acm icpc 2007 . during the mock test (online)while submitting the solution there came the msg " invalid function". we spent about the whole time for understanding that. i didnt get wat u said about this. what is " too much output " ?? please help me immediately... plzzzzzzzz.