Computer Science Canada

New Season

Author:  crossley7 [ Tue Oct 25, 2011 1:19 pm ]
Post subject:  New Season

Well, it appears that the new dwite season is upon us and there is no longer Cyril to come in and win every single one. Who is going to be involved tomorrow?

My friends and I are all planning on going solo, myself under the name "Better than Drew and Paul". Looking forward to a good warm up contest to get the year kicked off.

Author:  Cyril [ Wed Oct 26, 2011 4:47 am ]
Post subject:  RE:New Season

-_-

I'll have to enjoy this one vicariously; good luck!

Author:  crossley7 [ Wed Oct 26, 2011 5:53 pm ]
Post subject:  RE:New Season

Ok that was pathetic, but just wondering if you could check my second solution for question 1. I misread it on the first submission, but it seems it used the same result for the second submission when I know I submitted a different solution and had saved the file.

I just tested it now against the example data and it ran 4 out 5 test cases correct. Just wondering what happened.

Author:  Tony [ Wed Oct 26, 2011 6:21 pm ]
Post subject:  RE:New Season

Seems that your current Q1 mark is from your first submission. The judge catching up on marking all of the submissions. Ping us if this doesn't get resolved.

Author:  Dan [ Wed Oct 26, 2011 6:29 pm ]
Post subject:  RE:New Season

The judge should be done and the marks update now.

crossley7, you seem to have the same issue as in: http://compsci.ca/v3/viewtopic.php?p=245665#245665 with the extra line breaks and only 3 cases output.

Author:  crossley7 [ Wed Oct 26, 2011 8:23 pm ]
Post subject:  RE:New Season

Hmm, that is weird. I had only 1 line break in each loop. Oh well, I'm glad that I checked and know I have the algorithm correct(the issue with the 5th test case was just a small fault on not updating some code for the first word decoded.

Good thing that was warm up. Can't have a day like that once we get to ECOO and CCC.

Thanks for the replies, I will look at my code again later and see if i forgot to take out an extra line break or something, but don't think i did.

EDIT:
Tony @ Wed Oct 26, 2011 7:38 pm wrote:
the output suggests that \r\n newlines are not handled properly. If getline grabs just the first separator, the second one will be left in the buffer, which would produce blank lines on the following reads.


Seems that might have been my issue. getline() probably doesn't handle those as it should. Still should have got 1/5 for the first case though...

EDIT #2:
Thanks for those test cases for #5 Cyril, I quite enjoyed reading them. I keep realizing other blunders I made and am pretty pissed at my stupidity (getchar() in a solution still...)


: