

-----------------------------------

mseo

Sat Feb 20, 2010 12:56 pm


2009 Ccc S4

-----------------------------------

I realized when I was testing my program with the test data, there were some numbers that were out of bounds, and my 

program threw array index out of bounds exception (I used Java and created array dynamically)

If it was a real contest, I probably could not have gotten any mark for this question.

So I have a question: does this mean that for every problem in CCC, do i have to error trap the input?


-----------------------------------

USEC_OFFICER

Sat Feb 20, 2010 6:51 pm


RE:2009 Ccc S4

-----------------------------------

If I understand what you're saying (Which I really don't) I believe that CCC intentually sends in numbers that are out of bounds, and it would therefore be a good idea to error trap the input. However I really don't understand what you are saying, though if you understand, you're welcome.


-----------------------------------

Zampano

Sat Feb 20, 2010 9:24 pm


Re: 2009 Ccc S4

-----------------------------------

This is in fact the case; if you go to the mmhs solutions site
http://access.mmhs.ca/ccc/index.htm
you will see that the guy's program notes and accounts for this.

Also, if you read the problem statement very carefully, you'll see that no bounds for the cities are ever given.
The sneaky problem writers tried to screw us over. Bastards.


-----------------------------------

bbi5291

Sat Feb 20, 2010 11:29 pm


Re: RE:2009 Ccc S4

-----------------------------------

If I understand what you're saying (Which I really don't) I believe that CCC intentually sends in numbers that are out of bounds, and it would therefore be a good idea to error trap the input. However I really don't understand what you are saying, though if you understand, you're welcome. No, they don't do anything of the sort. Whatever this erratum was, it was an isolated incident. Should this occur in the future, your proctor should be able to sort things out.

No algorithm contest that requires competitors to detect invalid input is worth writing.

