![]() |
| Forums | Gaming News | Videos | Downloads | Today's Posts | Mark Forums Read | Chat | FAQ | Members List | Contact |
| ||||||
This is a discussion on past CCC contests questions within the PSP Development Forum forums, part of the PSP Development, Hacks, and Homebrew category; http://www.cemc.uwaterloo.ca/ccc/pas...contests.shtml More info: http://www.cemc.uwaterloo.ca/ccc/com...idelines.shtml Just for anyone who wants to test some of their programming and algorithm knowledge with these ...
![]() |
|
|
LinkBack | Thread Tools |
|
|
#1 |
![]() |
http://www.cemc.uwaterloo.ca/ccc/pas...contests.shtml
More info: http://www.cemc.uwaterloo.ca/ccc/com...idelines.shtml Just for anyone who wants to test some of their programming and algorithm knowledge with these questions from past contests of the CCC. The CCC stands for the Canadian Computing Competition, and is held every year, courtesy of Waterloo University. Anyways, these questions are meant for the PC, but I suppose you could try using different input methods other than the keyboard. There are 2 divisions, junior and senior. Senior is for more advanced programmers. I suggest downloading at least 1 of the junior contests pdfs first. I get stumped on the third problem of the junior almost every time I try doing some of these. ![]() Anyways, just wanted to show these to everyone. I found them a good way of brushing up on programming skills.
__________________
[I][U]QJ took away my sig. :([/U][/I] |
|
|
|
|
|
#2 |
![]() |
The third junior is just some dumbed down pathfinding, think of a 2d array and then have a value for current letter and a value subd out for nextletter and do absolute value differences between them, add it up, go to next letter. Four and five are tricky but doable. This is similar to Google Codejam, which sadly I missed out on this year. Oh well.
|
|
|
|
|
|
#3 |
![]() ![]() Developer
|
topcoder.com <-- if you want some good challenges, their practice rooms are pretty good, and if u feel good enough u can even enter a competition(i've never entered since i'd probably fail compared to others their)
__________________
1. Failed....again... 2. http://slicer.gibbocool.com/ stay updated on all my projects |
|
|
|
|
|
#4 | |
![]() |
Quote:
__________________
[I][U]QJ took away my sig. :([/U][/I] |
|
|
|
|
|
|
#6 |
![]() No longer a community member.
|
Turtlespwn the algorithm you described isnt quite right, for number three you use Heuristics, which is a pseudo distance that is simple and used for fast inaccurate distance finding. Basically the algorithm in 2D is dist = abs(startx-endx)+abs(starty-endy), for the challenge you would just run this for each letter.
If you were to do it you way and the string was "AG" you would return way to large of a number as A's location is 0 and G's is 6, when the real distance is 1. |
|
|
|
|
|
#7 |
![]() |
I wasn't laying everything out, I was simply saying it's dumbed down pathfinding - using heuristics, just like most pathfinding algorithms do.
"abs(startx-endx)+abs(starty-endy)" = "do absolute value differences between them" "for the challenge you would just run this for each letter." = "add it up, go to next letter." |
|
|
|
|
|
#8 |
![]() No longer a community member.
|
Well the way you described it is still wrong as a 2D array takes 1 value not 2 (ie x and y) therefor if you only read your post the reader would Assume the string "AG" to be 6 like I posted above. When it is truely 1.
Also with the not laying everything out, you wrote more text to write the wrong thing in eglish than the actual math was. Im not saying you didnt know the math im just saying it seems you may confuse readers, who may be trying the challenges and are looking for help. |
|
|
|
![]() |
| Tags |
| ccc , contests , past , questions |
| Thread Tools | |
|
|