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

Username:   Password: 
 RegisterRegister   
 CCC 05
Index -> Contests
Goto page Previous  1, 2, 3, 4, 5, 6, 7, 8  Next
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
zylum




PostPosted: Tue Mar 01, 2005 11:19 pm   Post subject: (No subject)

wtf? #5 was easy as hell... obviously you dont just loop to find the rank... well im not going to give the answer but i believe you just do something that starts with binary and rhymes with earch... Wink first 2 were easy... seeing as i couldnt install java on the computers (i tried but not enough drive space) i had to use turing so 3 was tricky... i ended up using 2d arrays of size 1024x1024... im not sure whether its correct but it passed the two sample cases.
Sponsor
Sponsor
Sponsor
sponsor
Drakain Zeil




PostPosted: Wed Mar 02, 2005 7:08 am   Post subject: (No subject)

I'll post up my answers to 1, 2 and 3 for the jr contest on Friday.
VC




PostPosted: Wed Mar 02, 2005 11:06 am   Post subject: (No subject)

Hey... about S5.

A couple of us stayed after school to mark it the other day; what's interesting is that there are three test cases (of the 10) that threw everyone's algorithms off (one of which, I believe, resulted in a negative answer for our output!!!).

So, what's interesting then... the markers expect the S5 program to give output within one minute of running time - I was sitting there marking mine, and the output came up at 59 seconds of run time (heh). Oh wait, but that answer was wrong... Sad

To anyone who has already gotten theirs marked, do your teachers allow you to hard-code/brute-force a program to yield specific output? I mean like, do your teachers not deduct the marks you could get for anticipating the exact input file in the example being used in the test case, and then just having a program output exactly what it wants...?

Jes wondering...
bugzpodder




PostPosted: Wed Mar 02, 2005 1:57 pm   Post subject: (No subject)

obviously there was no way to get your hands on the data unless you cheat. besides your program gets sent in to waterloo if you make stage 2, and you'll get disqualified when they look at your program.
person




PostPosted: Wed Mar 02, 2005 3:48 pm   Post subject: (No subject)

ill post the answers for j5 on friday

j4 was f***ing hard i spent 50 minutes on it and still didnt know where to start
Drakain Zeil




PostPosted: Wed Mar 02, 2005 4:09 pm   Post subject: (No subject)

j5 is the one I should have done instead.

For j4 I made a 2-d array of 0s and 1s, then a "movement" to ones for as many steps to the most clockwise position (by doing a if, elsif, end if selection) and if no movement can be made, or you are out of steps, then exit and give your position on the grid of 0s and 1s.

Saddly, I ran into a few errors, and could either get a wrong number (bad logic, fixed it), move nowhere (I was running my checks backwards), or only moved a maximum of 2 spaces... then I ran out of time. Confused
Andy




PostPosted: Wed Mar 02, 2005 4:46 pm   Post subject: (No subject)

for some reason c++ wont allow you to have two d arrays with sizes over 512 by 512.... and my number three messed up... dunno why but it did.. damn... and holy crap.. who the hell said it was easy to do s5... did you look at the datas??? they're frigging huge... no way you can calculate it in 1 min unless you used some sort of binary search
thegoose




PostPosted: Wed Mar 02, 2005 5:34 pm   Post subject: (No subject)

No.5 was actually a well-known problem (if you have looked at foreigh Olympiads). The solution that I think the creaters of the problem had in mind was NlogN. I will put up my solution which ran for <1 second on all cases sometimes next week.
It would really be unfair for the people who actually coded a NlogN or a Nsqrt(N) if a N^2 solution was allowed to run in time and get full points. I'm pretty sure that even with Turing, my code would run in about 5 seconds.
Sponsor
Sponsor
Sponsor
sponsor
Andy




PostPosted: Wed Mar 02, 2005 6:09 pm   Post subject: (No subject)

hmm well at least my program was sent off.. to remark.. but i just thought that they should've told us the time limit... anyways, what do you guys think the cut off wll be this year? i really want to go to stage 2 but i dun think my score was high enough Crying or Very sad
bugzpodder




PostPosted: Wed Mar 02, 2005 6:40 pm   Post subject: (No subject)

massey has 8 apperances in stage 2 in the last 6 years. i dont think this is gonna extend.
bugzpodder




PostPosted: Wed Mar 02, 2005 6:42 pm   Post subject: (No subject)

thegoose wrote:
No.5 was actually a well-known problem (if you have looked at foreigh Olympiads). The solution that I think the creaters of the problem had in mind was NlogN. I will put up my solution which ran for <1 second on all cases sometimes next week.
It would really be unfair for the people who actually coded a NlogN or a Nsqrt(N) if a N^2 solution was allowed to run in time and get full points. I'm pretty sure that even with Turing, my code would run in about 5 seconds.


my 15 line N^2 solution ran in <1 second for largest test case. i dont see the need to write a 100 line N log N solution.
Andy




PostPosted: Wed Mar 02, 2005 6:43 pm   Post subject: (No subject)

lol yea... not until nxt yr when andy kong makes it... hes really good.. if it werent for stupid mistakes.. he would've got 65
thegoose




PostPosted: Wed Mar 02, 2005 7:38 pm   Post subject: (No subject)

bugzpodder wrote:

my 15 line N^2 solution ran in <1 second for largest test case. i dont see the need to write a 100 line N log N solution.

I somehow doubt that a N^2 would run in less than 1 second for S5, after all, the input data has N=100,000. Can you please send me the code of your program via. E-mail?
bugzpodder




PostPosted: Wed Mar 02, 2005 8:59 pm   Post subject: (No subject)

bugzpodder wrote:
massey has 8 apperances in stage 2 in the last 6 years. i dont think this is gonna extend.


10 appearences. I cant count.

Jessie Lei x3
Me x3
John Doe, Rui Me, Wissam Bishara, and Gary Lambing one each. a couple of others were close to making it too
zylum




PostPosted: Wed Mar 02, 2005 9:04 pm   Post subject: (No subject)

thegoose wrote:
bugzpodder wrote:

my 15 line N^2 solution ran in <1 second for largest test case. i dont see the need to write a 100 line N log N solution.

I somehow doubt that a N^2 would run in less than 1 second for S5, after all, the input data has N=100,000. Can you please send me the code of your program via. E-mail?


yeah i was gonna say that too... turng takes about 3 seconds to loop through an empty loop up to ten million on my 800mhz. i doubt it will run in under a minute
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 8  [ 114 Posts ]
Goto page Previous  1, 2, 3, 4, 5, 6, 7, 8  Next
Jump to:   


Style:  
Search: