Computer Science Canada My solutions |
Author: | JSBN [ Tue Feb 25, 2003 11:01 am ] | ||||||
Post subject: | My solutions | ||||||
Ok, Many of you probably did the competition today. It was easy (for me) untill i hit the poetry question, which i did not finnish. here are my answers for the first 3 questions of the competition. I will try to put up what was required ASAP: Question 1 (Trident)
Question 2 (Pictures)
Question 3 (Snakes and Ladders)
|
Author: | Tony [ Tue Feb 25, 2003 11:28 am ] |
Post subject: | |
nice, thats 3*15 = 45? Id say better then half the people. I'll upload poetry, floorplan, subtrings when I get a comfirmation that they're correct. Unfortunatly I wasn't able to solve S5 - Trucks in the remaining 30 minutes and I'll be kicking myself... but mostly my teacher for the whole end of the year if that would cost me my stage 2 Right now my score suppost to be 60. Can someone post a solution to trucks problem?! |
Author: | Asok [ Tue Feb 25, 2003 12:06 pm ] | ||||
Post subject: | |||||
for amusement purposes take a look at my rediculously longer (still works) version of J2:
and JSBN, your J3 is incorrect, you're missing:
that way the sum of 2 dice is between 2 and 12, on yours you can do like 32 which is impossible in the scenario. |
Author: | Dan [ Tue Feb 25, 2003 1:36 pm ] |
Post subject: | ccc |
i got all of the question on j lvl done but 5, dam flooring!, i ran out of time i will post my awsers soon, i lefted my disk at school |
Author: | Tony [ Tue Feb 25, 2003 2:40 pm ] |
Post subject: | |
ya, the floor one was tricki and as far as I can tell, this year is MUCH harder then last years. Also, Asok... The problem didn't ask to verify the sum, so you assume the correct input. Maybe I'm playing with "special" dice? |
Author: | Asok [ Tue Feb 25, 2003 9:47 pm ] |
Post subject: | |
no the problem specifically said the roll was the sum of 2 dice from 2-12 I'll double check that today but I'm pretty sure of it. It makes more sence, also in the example they never used numbers above 12. |
Author: | Tony [ Wed Feb 26, 2003 2:30 am ] |
Post subject: | |
exactly... the input is 2-12 or 0, you dont need to double check that, although I do see your consern for rolling 99 on first move and winning the game. But since the program is designed to help "visualize" the game on the larger screen, we're to assume the correct input. I'm not saying you're wrong, its actually nice that you think of such details... but I'm just saying that program would work without that |
Author: | Delta [ Thu Mar 20, 2003 7:14 pm ] |
Post subject: | ???????????????????????????????????? |
What Test is this and where can I recieve the questions so that I can answer them and test my skills. If someone could send me them I'd much appreciate it. Thnx. :D |
Author: | Asok [ Fri Mar 21, 2003 11:56 am ] |
Post subject: | |
this is the Canadian Computing Competition, sadly their site hasn't been updated to post the questions however you can view the other questions from previous contests here: http://www.cmc.uwaterloo.ca/ccc/index.html |
Author: | bugzpodder [ Sat May 24, 2003 10:42 am ] |
Post subject: | |
you dont mind truck problem in C++ right tony? i figured you still want to see it after 3 month i dont want to touch turing before stage 2 next week. anwyazy i am working on the trucking thing right now. |
Author: | bugzpodder [ Sat May 24, 2003 12:07 pm ] | ||
Post subject: | |||
anywayz, here is my solution for truck. it worked for 3 test cases, so obvious there is a bug in it. this in theory works for me but i dont know why it doesnt work for test case 4 and 5. i spent about an hour debugging it. any one who can catch the error gets bits (i've never donated bits b4 but i suppose the donate bits function works?)
|
Author: | Asok [ Sat May 24, 2003 12:13 pm ] |
Post subject: | |
what are the 5 test cases so I can try to debug this. |
Author: | bugzpodder [ Sat May 24, 2003 12:26 pm ] | ||
Post subject: | |||
here is a *much much* faster version for the bigger test cases. instead of calculating flow seperately for each destination city, i do them all at once so in case of 1000 destination cities, i do not calculate things 1000 times repeatedly. the test cases are attached. truck.in, truck.out are sample I/O. the rest are contest I/O. it fails on truck4 and truck5.
|
Author: | Tony [ Sat May 24, 2003 12:57 pm ] |
Post subject: | |
hey bugz. can you please put some comments into your program... I kind of get lost in there and dont quite understand the logic |
Author: | bugzpodder [ Sat May 24, 2003 1:23 pm ] |
Post subject: | |
my 2nd program is almost same as the first program. the comments are all there in the first program (i think i only changed 2-3 lines) |
Author: | nate [ Sat May 24, 2003 1:49 pm ] |
Post subject: | Heres my Answers |
Here are my answers for the J2 and J3 questions I just want to know if they are right or almost right. They are pretty uneffeicent but I was wondering if they work and if I entered the contest what would my mark be for them? estamites are fine! -Nate |
Author: | JSBN [ Sat May 24, 2003 2:26 pm ] |
Post subject: | |
my answers are more efficient... (not as much code) also for your picture one, try putting in 456 for yours, and mine. Persoinally i dont like to have to cut my pictures...... |
Author: | nate [ Sat May 24, 2003 3:30 pm ] |
Post subject: | lol |
lol i know i was trying to fix that but w.e -nate |