QJ.NET | Videos | Forums | iPhone | MMORPG | Nintendo DS | Wii | PlayStation 3 | PSP | Xbox 360 | PC | Downloads | Contact Us
Forums | Gaming News | Videos | Downloads | Today's Posts | Mark Forums Read | Chat | FAQ | Members List | Contact

QJ.net Game Discussion - PSP, Xbox, Wii, PS3, PSP Homebrew, and PSP Guides

Go Back   QJ.net Game Discussion - PSP, Xbox, Wii, PS3, PSP Homebrew, and PSP Guides > Developers Corner > PSP Development, Hacks, and Homebrew > PSP Development Forum
The above video goes away if you are a member and logged in, so log in now!

past CCC contests questions

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 ...

Reply
 
LinkBack Thread Tools
Old 08-06-2008, 01:33 PM   #1
 
Join Date: Mar 2007
Posts: 755
Trader Feedback: 0
Default past CCC contests questions

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]
michaelp is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 08-06-2008, 02:36 PM   #2
 
Join Date: Jan 2008
Posts: 612
Trader Feedback: 0
Default

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.
TurtlesPwn is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 08-06-2008, 02:38 PM   #3

Developer
 
slicer4ever's Avatar
 
Join Date: Jul 2005
Location: everywhere
Posts: 3,357
Trader Feedback: 0
Default

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
slicer4ever is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 08-06-2008, 02:57 PM   #4
 
Join Date: Mar 2007
Posts: 755
Trader Feedback: 0
Default

Quote:
Originally Posted by TurtlesPwn View Post
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.
Are you talking about a specific year, or just in general for all of them?
__________________
[I][U]QJ took away my sig. :([/U][/I]
michaelp is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 08-06-2008, 03:04 PM   #5
 
Join Date: Jan 2008
Posts: 612
Trader Feedback: 0
Default

Most recent. 2008 stage 1 junior pdf english from the top link you provided
TurtlesPwn is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 08-06-2008, 08:46 PM   #6
No longer a community member.
 
a_noob's Avatar
 
Join Date: Sep 2006
Location: Over there.
Posts: 666
Trader Feedback: 0
Default

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.
a_noob is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 08-06-2008, 08:53 PM   #7
 
Join Date: Jan 2008
Posts: 612
Trader Feedback: 0
Default

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."
TurtlesPwn is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 08-07-2008, 08:00 AM   #8
No longer a community member.
 
a_noob's Avatar
 
Join Date: Sep 2006
Location: Over there.
Posts: 666
Trader Feedback: 0
Default

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.
a_noob is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 08-07-2008, 09:05 AM   #9
 
Join Date: Jan 2008
Posts: 612
Trader Feedback: 0
Default

"2D array takes 1 value not 2"

Umm, 2d arrays require two indexes to access a value.
TurtlesPwn is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 08-13-2008, 06:28 PM   #10
 
Join Date: Mar 2007
Posts: 755
Trader Feedback: 0
Default

I managed to do my first junior #3! :P
2004 junior problem 3 was not very hard, should have been a question #2.
__________________
[I][U]QJ took away my sig. :([/U][/I]
michaelp is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 08-13-2008, 06:55 PM   #11
 
Join Date: Jan 2008
Posts: 612
Trader Feedback: 0
Default

that sure is easy lol
even #4 of 04 is easy
TurtlesPwn is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply

Tags
ccc , contests , past , questions

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off



All times are GMT -8. The time now is 06:24 PM.



Use of this Web site constitutes acceptance of the TERMS & CONDITIONS and PRIVACY POLICY
Copyright © 2009, QJ.NET. All Rights Reserved.
Contact Us