Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 Ccc 2007!
Index -> Contests
Goto page Previous  1, 2, 3, 4, 5, 6  Next
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
klopyrev




PostPosted: Tue Mar 06, 2007 9:50 pm   Post subject: Re: Ccc 2007!

Quote:
hey, I just got my results from the CCC senior, and it turn out that there seems to be some extra whitespace in many of the input files.
I was using the java BufferedReader to read the input line by line (I was using java 1.4, so I didnt have access to the scanner class)

I was just wondering, did anyone else have this problem?

This read error cuts my score by 30 points, but if the excess whitespace is removed, most of my programs run just fine. Is it too late to do anything about this?

thanks


My solutions had the same problem, but your teacher should have done something to correct it. First of all, there are other input files that lack this problem. Ask your teacher to download the unix files. The read error is not your fault, because BufferedReader is what they actually use in the example program on the CCC website. If your teacher still doesn't give you the marks for your problem, ask him to email the people at Waterloo and ask them. You should get the marks if your solution works with the correctly formatted files.

KL
Sponsor
Sponsor
Sponsor
sponsor
OneOffDriveByPoster




PostPosted: Tue Mar 06, 2007 10:29 pm   Post subject: Re: Ccc 2007!

Hi klopyrev, looks like you got your solutions posted on the MMHS website. Congrats on solving the problems.

The version posted on the website (J5) suffers from an int overflow problem though--I gather the website operator ported it to Turing from something else? For S5, getting the sum of the next "width" balls can be done right-to-left with a little less logic.

Just looking to share ideas. I got pretty much the same thing for both (but with motel back to zero for J5 and no "supersum" for S5).
klopyrev




PostPosted: Wed Mar 07, 2007 1:28 am   Post subject: Re: Ccc 2007!

For J5, the int overflow must have resulted from the port to Turing from Java. As for S5, what do you mean by getting the sum can be done from right-to-left with less logic.
As I gather, calculating the sum from left to right vs right to left would make no difference. Please share your way. As for the supersum thing, I thought it would make it slightly faster, but strangely enough, it actually makes it slightly slower. Anyway, the supersum thing made the first algorithm I implemented much faster and I just didn't remove it from the new one.

KL
OneOffDriveByPoster




PostPosted: Wed Mar 07, 2007 3:56 am   Post subject: Re: Ccc 2007!

klopyrev @ Wed Mar 07, 2007 1:28 am wrote:
For J5, the int overflow must have resulted from the port to Turing from Java.

Okay, because the max output is too large for a 32-bit signed int. The test data doesn't seem to go there though.

Quote:
As for S5, what do you mean by getting the sum can be done from right-to-left with less logic.
As I gather, calculating the sum from left to right vs right to left would make no difference. Please share your way.

I did say it is only slight less logic (maybe you or someone else could improve on it for us):
code:

void sumw(n, w, sum, pin)
        int n, w, *sum, *pin;
{
    // w <= n
    int i = n - 1, last = 0;
    for (; i >= n - w; --i) {
        sum[i] = last = last + pin[i];
    }
    for (; i >= 0; --i) {
        sum[i] = last = last - pin[i + w] + pin[i];
    }
}


Basically, if you want the sum to be for values to the right of your index, then go from right to left and vice versa.
klopyrev




PostPosted: Wed Mar 07, 2007 7:38 am   Post subject: Re: Ccc 2007!

That makes sense! Cool, thanks!

KL
PaulButler




PostPosted: Wed Mar 07, 2007 11:28 am   Post subject: RE:Ccc 2007!

I just noticed yesterday that there was a correction to the test data for S3, I lost some points to that. My teacher seems to think that they test all the programs on their side, but I don't think this is possible due to the number of languages accepted. Does anyone know if this is the case?
Cervantes




PostPosted: Wed Mar 07, 2007 2:08 pm   Post subject: RE:Ccc 2007!

As I recall, testing is done at the high school. The marks are then sent to Waterloo. The university might mark the top entries, though.
Clayton




PostPosted: Wed Mar 07, 2007 5:40 pm   Post subject: Re: Ccc 2007!

IIRC, all of the entries that make it to Stage 2 (sorry Juniors) get marked by Waterloo to ensure no one got in by a teacher's (mis) marking.
Sponsor
Sponsor
Sponsor
sponsor
whlue




PostPosted: Thu Mar 08, 2007 10:06 pm   Post subject: Re: Ccc 2007!

You know what sucks? When you mis-type information in the third question of the Junior competition. I mistyped 100000 as 1000000, and ended up having two 1000000's. Got my results back: 72/75
Omnipotence




PostPosted: Sun Mar 11, 2007 6:10 pm   Post subject: Re: Ccc 2007!

This year's junior got easier than last years. I actually scored perfect.
cool dude




PostPosted: Wed Mar 14, 2007 9:21 pm   Post subject: Re: Ccc 2007!

Omnipotence @ Sun Mar 11, 2007 6:10 pm wrote:
This year's junior got easier than last years. I actually scored perfect.


juniour this year was rediclously easy. much easier than last year where we had to program othello in the time limit given.

did anyone else get overflow errors on some of the senior programs? i guess i shouldn't have used vb. oh well.
PaulButler




PostPosted: Wed Mar 14, 2007 9:32 pm   Post subject: Re: Ccc 2007!

cool dude @ Wed Mar 14, 2007 9:21 pm wrote:
Omnipotence @ Sun Mar 11, 2007 6:10 pm wrote:
This year's junior got easier than last years. I actually scored perfect.


juniour this year was rediclously easy. much easier than last year where we had to program othello in the time limit given.

did anyone else get overflow errors on some of the senior programs? i guess i shouldn't have used vb. oh well.


Which questions gave you overflows? I got an overflow on S3 at first because there was a typo in the test data, but when I used the fixed data it went away.
PaulButler




PostPosted: Thu Mar 15, 2007 4:45 pm   Post subject: Re: Ccc 2007!

Freakman @ Wed Mar 07, 2007 5:40 pm wrote:
IIRC, all of the entries that make it to Stage 2 (sorry Juniors) get marked by Waterloo to ensure no one got in by a teacher's (mis) marking.


Actually, I just got an email from the CCC and it turns out this isn't the case. The mark your teacher gives you is final.
McKenzie




PostPosted: Fri Mar 16, 2007 8:26 am   Post subject: Re: Ccc 2007!

No, I think Freakman is right. Juniors under 55 and seniors under 40 get whatever the teacher marked them. At 55/40 and up all of the actual code get sent to Waterloo. I've seen marks change once it goes to Waterloo so they must re-mark them. For Example: Last year was the first year that Senior was supposed to read from file and print to screen. One student assumed that it was supposed to output to file. I e-mailed Troy, the CCC co-ordinator, he told me to apply a 5 mark penalty for the mistake. The official score Waterloo gave him did not have the 5 mark penalty on it.
PaulButler




PostPosted: Fri Mar 16, 2007 11:07 am   Post subject: RE:Ccc 2007!

Hmm, thats odd that the score was changed, I don't see how they could do this since they allow any language supported by the school.

I mis-read Freakman's post as saying that every submission is re-done. It would make sense for them to test the top 20 only.

That said, this was my first CCC so I can only go by what I have heard and the email from Troy. If you have experience with how the marking works there is a good chance you are right.
Display posts from previous:   
   Index -> Contests
View previous topic Tell A FriendPrintable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 5 of 6  [ 84 Posts ]
Goto page Previous  1, 2, 3, 4, 5, 6  Next
Jump to:   


Style:  
Search: