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

Username:   Password: 
 RegisterRegister   
 so how did you guys do on this years CCC?
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
zylum




PostPosted: Thu Feb 26, 2004 5:19 pm   Post subject: (No subject)

i still dont see why my program doesnt work... can someone plz explain where it goes wrong?? (S4)

-zylum
Sponsor
Sponsor
Sponsor
sponsor
nis




PostPosted: Thu Feb 26, 2004 5:20 pm   Post subject: (No subject)

I did the senior contest and answered 1 2 3 and 4. for 5 i ran out of time and jsut ended up getting how ever many inputs were needed for the sample input and just putting to the screen the answer to the sample out put. hopfully i will get a couple marks for that.
limited_skillz




PostPosted: Thu Feb 26, 2004 6:11 pm   Post subject: (No subject)

did anyone finish j5?

ive been losing sleep over it Sad, im takin gr 12 (im in 11) and i know recursion in and out, but i really dont understand how to do it
bugzpodder




PostPosted: Thu Feb 26, 2004 7:26 pm   Post subject: (No subject)

zylum wrote:
i still dont see why my program doesnt work... can someone plz explain where it goes wrong?? (S4)

-zylum


you assumed the shortest distance is going to lie on a lattice point. not necessarily true. actually i think a nice way to approach this is that for segment AB, check A', B', two points that are really close to A, B. if distance is strictly decreasing/increasing then you could just take the shorter distance at A or B. otherwise just use the point to a line distance formula which is CA X AB / |AB|
of course the orientations much be maintained also
bugzpodder




PostPosted: Thu Feb 26, 2004 7:28 pm   Post subject: (No subject)

azndragon wrote:
This topic is very depressing for me. I always did good in Computer Science, and I considered myself to be pretty good. However, our teacher did not adequately prepare us, and the best programmer in our school only managed to finish 3 questions, while I finished 2. I need to work on my logic more Sad


you arent the only one who are depressed... but generally speaking everyone did pretty badly Wink
Tony




PostPosted: Thu Feb 26, 2004 8:39 pm   Post subject: (No subject)

limited_skillz wrote:
did anyone finish j5?

im takin gr 12 (im in 11)


what's going on? Confused I though junior contest had a restriction that allows you to write it just once and only if you have no more then 1 CS credit Confused ... Thinking
Latest from compsci.ca/blog: Tony's programming blog. DWITE - a programming contest.
gvc




PostPosted: Thu Feb 26, 2004 8:45 pm   Post subject: (No subject)

bugzpodder wrote:
zylum wrote:
i still dont see why my program doesnt work... can someone plz explain where it goes wrong?? (S4)

-zylum


you assumed the shortest distance is going to lie on a lattice point. not necessarily true. actually i think a nice way to approach this is that for segment AB, check A', B', two points that are really close to A, B. if distance is strictly decreasing/increasing then you could just take the shorter distance at A or B. otherwise just use the point to a line distance formula which is CA X AB / |AB|
of course the orientations much be maintained also


Bugs,

This is one of the unfortunate cases in which you were disadvantaged by thinking too much. Because the planet is on a grid location, and the turtle travels from grid location to grid location on straight lines, the closest point will always be when the turtle is at a grid location. So all you have to do is move one unit at a time and check the distance after each move.

If the planet were located at an arbitrary place, or if the turtle could travel on the diagonal, you would have to do the geometry you suggest.
Andy




PostPosted: Thu Feb 26, 2004 9:28 pm   Post subject: (No subject)

ya see he didnt take gr 10
Sponsor
Sponsor
Sponsor
sponsor
Brightguy




PostPosted: Thu Feb 26, 2004 9:41 pm   Post subject: Re: so how did you guys do on this years CCC?

tony wrote:
what's going on? Confused I though junior contest had a restriction that allows you to write it just once and only if you have no more then 1 CS credit Confused ... Thinking

My computer science teacher gave us both the junior and senior booklets and told us we could do either; he didn't mention any restrictions.

Apparently I slightly misunderstood S2. When it said to output the worst rank, I thought it meant the rank of the worst yodeller, not the winner's worst rank. Sad In the sample case when they explained the output they listed everyone's current rank, not their worst rank. And it just so happened that the winner's worst rank overall was the same as the loser's final rank. Rolling Eyes

So I lost 4 marks on that question. And in S3, my program took too long to run on the last two test cases. (And I had commented a line which would have allowed the program to run in time for the last test case! Mad )

So I got 15/15 in S1, 11/15 in S2, and 9/15 in S3, for a total of 35. I guess that's alright, but I know I could've done better. But I bet a lot of people are thinking that right now...
Overall I enjoyed it. Smile
Tony




PostPosted: Thu Feb 26, 2004 11:32 pm   Post subject: (No subject)

lol Laughing Well before they used to have those J3/S1, J4/S2, J5/S3 questions... where you basically do the common 3 and deside if you wanna pretend to be a junior and go for the highscore with first two easy questions, or play with the rest on the "senior" playfield... this year apparently it was not the case Rolling Eyes no common questions Confused
Latest from compsci.ca/blog: Tony's programming blog. DWITE - a programming contest.
amvbse




PostPosted: Thu Feb 26, 2004 11:34 pm   Post subject: (No subject)

azndragon wrote:
This topic is very depressing for me. I always did good in Computer Science, and I considered myself to be pretty good. However, our teacher did not adequately prepare us, and the best programmer in our school only managed to finish 3 questions, while I finished 2. I need to work on my logic more Sad


I know exactly what you mean. We weren't even taught recursion in gr12 (finished it 1st semester) by our teacher who I doubt even knows what it is. I definetaly need to hang around here more and pick up on things.
bugzpodder




PostPosted: Fri Feb 27, 2004 7:38 am   Post subject: (No subject)

tony wrote:
limited_skillz wrote:
did anyone finish j5?

im takin gr 12 (im in 11)


what's going on? Confused I though junior contest had a restriction that allows you to write it just once and only if you have no more then 1 CS credit Confused ... Thinking


i guess i should have taken the junior Embarassed
bugzpodder




PostPosted: Fri Feb 27, 2004 7:43 am   Post subject: (No subject)

gvc wrote:
bugzpodder wrote:
zylum wrote:
i still dont see why my program doesnt work... can someone plz explain where it goes wrong?? (S4)

-zylum


you assumed the shortest distance is going to lie on a lattice point. not necessarily true. actually i think a nice way to approach this is that for segment AB, check A', B', two points that are really close to A, B. if distance is strictly decreasing/increasing then you could just take the shorter distance at A or B. otherwise just use the point to a line distance formula which is CA X AB / |AB|
of course the orientations much be maintained also


Bugs,

This is one of the unfortunate cases in which you were disadvantaged by thinking too much. Because the planet is on a grid location, and the turtle travels from grid location to grid location on straight lines, the closest point will always be when the turtle is at a grid location. So all you have to do is move one unit at a time and check the distance after each move.

If the planet were located at an arbitrary place, or if the turtle could travel on the diagonal, you would have to do the geometry you suggest.


yeah you are right... i withdraw my previous comments... new to compsci.ca?? you would be??
zylum




PostPosted: Fri Feb 27, 2004 12:55 pm   Post subject: (No subject)

well of course if the planet is located on integers and you only move onto integers, the closest point will be an integer... so whats wrong with my program??
bugzpodder




PostPosted: Fri Feb 27, 2004 3:49 pm   Post subject: (No subject)

zylum wrote:
well of course if the planet is located on integers and you only move onto integers, the closest point will be an integer... so whats wrong with my program??


then probably your orientation then
Display posts from previous:   
   Index -> Contests
View previous topic Tell A FriendPrintable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

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


Style:  
Search: