Computer Science Canada 2009-2010 Round 6 Question 1 |
Author: | PropagandaPanda [ Wed Apr 28, 2010 5:55 pm ] | ||
Post subject: | 2009-2010 Round 6 Question 1 | ||
Hello. I'm not sure why the code below (Python) was judged as wrong. It was my second submission, so it didn't so up in the score sheet.
I'm guessing it was because there were trailing spaces in the test file, but I assumed this may have been allowed because the program was suppose to read the whole line. Would it be possible for you to attach a copy of the test file used on the judge machine? Thanks. |
Author: | Tony [ Wed Apr 28, 2010 6:59 pm ] |
Post subject: | RE:2009-2010 Round 6 Question 1 |
It might have had something to do with \r\n newlines on the Windows judge, vs. \n newlines on *nix machines. The test data is available online via http://dwite.org/home/contest/29, although you wouldn't see the system dependent newlines. |
Author: | Dan [ Wed Apr 28, 2010 9:44 pm ] |
Post subject: | RE:2009-2010 Round 6 Question 1 |
If you give me your team name I can look up in the judges logs about what might have happened. |
Author: | PropagandaPanda [ Thu Apr 29, 2010 3:33 pm ] |
Post subject: | RE:2009-2010 Round 6 Question 1 |
Hello. Quote: It might have had something to do with \r\n newlines on the Windows judge, vs. \n newlines on *nix machines. I don't think this is the issue. Python automatically convers \r\n to \n when reading and vice versa when writing.
The test data provided works fine with my program. Quote: If you give me your team name I can look up in the judges logs about what might have happened. Thanks for your time. |
Author: | Dan [ Thu Apr 29, 2010 8:49 pm ] | ||||
Post subject: | Re: 2009-2010 Round 6 Question 1 | ||||
For the fist submssion the judge reported the following error:
and the output file contained: Quote: QJVGR DHRFGVBA BAR CHAPGHNGVBA., EBG13 <GBAL> Note that all the line breaks are wrong. The second submssion had no errors but the output file contained the following: Quote: QUESTION ONE <TONY> ROT13 PUNCTUATION., DWITE This is the contents of the data1.txt file. The code you submited for the second submission is diffrent from what you posted here and looks like so:
note the last line: WriteLine(Next()) is diffrent then what you posted and just copies the contents of data1.txt to out1.txt. |
Author: | PropagandaPanda [ Sun May 02, 2010 7:13 pm ] |
Post subject: | RE:2009-2010 Round 6 Question 1 |
Hello Dan. Sorry for wasting your time. The mistake was completely mine. I had submitted the a bad copy of my code. Thanks. |