Computer Science Canada

Need some tips for the CCC.

Author:  CodeMonkey2000 [ Wed Nov 07, 2007 10:26 pm ]
Post subject:  Need some tips for the CCC.

I plan to do the CCC this year (after hearing about it a few months ago Razz). Anyway I read through the stage 1 questions, and I'm wondering how should one go about developing algorithms to solve the problems (they aren't too difficult but they do seem long)? How should I prepare myself?

Author:  HeavenAgain [ Wed Nov 07, 2007 11:03 pm ]
Post subject:  RE:Need some tips for the CCC.

program for 5 hours everyday, no jokes
and program i mean, find those problems, and just do them one by one

Author:  Tony [ Wed Nov 07, 2007 11:43 pm ]
Post subject:  Re: Need some tips for the CCC.

CodeMonkey2000 @ Wed Nov 07, 2007 10:26 pm wrote:
How should I prepare myself?

Preparing yourself for CCC is kind of the point behind DWITE -- sign up.

Author:  PaulButler [ Thu Nov 08, 2007 12:25 am ]
Post subject:  RE:Need some tips for the CCC.

- Practice a lot, start by taking your time and then move to practice competitions where you take an old CCC and go for three hours, and then test your results.

- The book Programming Challenges is good, and you still have time to ask Santa.

- Learn to break all your good habits. Don't comment, and even consider naming your variables alphabetically. Not because it is shorter to type them, but because it is less time you have to think about naming your variables.

- Consider learning to work without an IDE, You should at least be able to type a Hello World program without an IDE. If your IDE underlines errors before you compile, turn that feature off while you practice.

- The debugger and other development tools are generally too costly (in terms of time) to use on a contest, however they might come in handy so you should at least learn the basics.

- Make sure you are comfortable reading and writing to files. The ability to parse strings and numbers out of files is crucial, as well as output formatting (fprintf or the equivalent in your language)

- If you are in the habit of spitting out code and shaping it until it does what you want, get out of it. Ideally you want to be able to write a program with no bugs the first time. (Not that you should expect to get to that level, but that's what you should aim for)

- Use a pen and paper. Visualize the problem before you start coding. Try the sample input on paper and see if you understand exactly why the output is the way it is.

- Pay a lot of attention to the input specification. The test data will test the limits of your program. Don't even think about what your program should do if you get data that does not fit the specifications; it won't happen. However, you will have cases with lots of input and you will have to put a lot of thought into solving the problem in an efficient way.

- When given a problem I would first make several test cases and try them on paper, then type them in and save them. This way I had some extra test cases, and I have ensured that I have a thorough understanding of the question. You will need extra test cases, the tests they give you usually only cover trivial cases.

- Get to know the string and array functions for your language well; they will come in handy.

- If you are using a language with objects, don't bother using them unless you have a good reason to.

- I made an class called "ccc" that contained all the code I wanted to reuse for each question (mainly opening the input and output file streams, with a switch so I could do IO from the console instead). I would suggest doing that in advance, so that you can code it again from memory (not that you should memorize it, but you should know the language well enough that you can re-code it without thinking).

- Arrays and iteration tend to be overrepresented (so learn them), data structures, recursion and sorting tend to be underrepresented (but still learn them).

Author:  CodeMonkey2000 [ Thu Nov 08, 2007 9:04 pm ]
Post subject:  Re: Need some tips for the CCC.

Looks like I have to brush up on Pascal for this. C++ is just too big (and pointless) for this.

Author:  wtd [ Thu Nov 08, 2007 10:05 pm ]
Post subject:  Re: Need some tips for the CCC.

Learn how to program in several different programming languages. It'll help you break habits and think about the problem without thinking about code. For particular benefit, use something minimal like Scheme.

Author:  A.J [ Sun Jan 20, 2008 12:28 pm ]
Post subject:  Re: Need some tips for the CCC.

you should look up algorithms that will help you code
(like dp, recursion, prim's algorithm, warshall's algorithm, dfs, bfs, etc...)

i i am currently practicing myself, so we could do sums on the internet together

Author:  McKenzie [ Sun Jan 20, 2008 1:39 pm ]
Post subject:  Re: Need some tips for the CCC.

CodeMonkey, Pascal is a good choice, stick with it. If you are serious about training for CCC, then I assume you are hoping to go to stage 2. At stage 2, only C/C++ and Pascal are allowed. USACO is the best place to go for contest training.
http://train.usaco.org/usacogate

Author:  CodeMonkey2000 [ Sun Jan 20, 2008 4:00 pm ]
Post subject:  RE:Need some tips for the CCC.

Hmm... but pascal doesn't have the vector class which is very useful. Do I really need it? Or does pascal have it's own equivalent?

Author:  klopyrev [ Fri Feb 01, 2008 5:01 pm ]
Post subject:  Re: Need some tips for the CCC.

Best way to prepare that I know of is to finish USACO Training.

Author:  nike52 [ Tue Feb 12, 2008 10:00 pm ]
Post subject:  Re: Need some tips for the CCC.

Hey, are there any more great tips/great resources/books/bookmarks(especially great booksmarks!) related to CCC out there for aspiring CCC newbies?
Please give them to me, I plan to start from junior then to senior eventually. Razz

So far, what i know is that I need this book
Skiena and Revilla, Programming Challenges

Do USACO.

I need to know this stuff. Anybody have any teaching materials for this stuff?
Is there a certain order I should learn these?
Which ones should I especially focus on and which ones I shouldn't?
JUNIOR
selection
repetition
arrays
recursion
data structures (e.g., lists)
string manipulation
string manipulation

SENIOR
recursion
optimization
simulation
geometry
enumeration (i.e., counting)
sorting
searching
graph search
dynamic programming

What do you guys think of topcoder/DWITE/any other prog contest that's good prep for CCC?
What I like about topcoder it is that I can look at other people's answers.

Author:  HeavenAgain [ Tue Feb 12, 2008 10:16 pm ]
Post subject:  RE:Need some tips for the CCC.

you dont really NEED that book, its just a decent book with some helpful hints....
and yes, do usaco, better yet, finish it, if you can finish it, you are probably all set for IOI (which is more than enough for ccc)
not really an order, but there are a few things thats really basic, like sorting, working with strings.... of course you have to know those basics before moving on to the complicated algorithms
and yes, topcoder is a good place to test your hard trainning (and plus the money), and also good for practice, and they have very nice tutorials and editorials(analysis) or whatever it is.
good luck on your trainning, it will be brutal and time consuming, but in the end, its all worth it, start early, use your summer time! or the coming march break!

Author:  nike52 [ Tue Feb 12, 2008 10:44 pm ]
Post subject:  Re: Need some tips for the CCC.

Thanks for the advice heavenagain. Smile
I'm probably going to get the book anyways, anything that can help me for the ccc is a plus.
Ah and I see I should master usaco.
Yeah it will be brutal lol but i like it and I've got a whole year to prepare.

This is just stuff I found that might help others for CCC.
If you're starting to prepare for CCC/compsci, maybe wanna just talk,help each other out on ccc/be friends, here's my email nike-elevet@hotmail.com (remove the dash)

CCC Stage 2 # 1 COWS
http://compsci.ca/v3/viewtopic.php?t=16452&highlight=ccc

Also I would recommend the book Introduction to Algorithms, its a really good book covering a wide area of algorithms including Dynamic Programming
For Dynamic Programming (gives problems and solutions)
http://people.csail.mit.edu/bdean/6.046/dp/
http://compsci.ca/v3/viewtopic.php?t=16847

Solutions to CCC
http://access.mmhs.ca/ccc/index.htm

Programming Challenges: Contains problems from the UVA online judge, carefully placed into different chapters. Each chapter focuses on an essential algorithm or topic and is followed up by a list of problems from the UVA judge. The chapters can be found in a book with the same name or at http://www.cs.sunysb.edu/~skiena/392/audio/ and the website is located at http://www.programming-challenges.com/

UVA Online Judge: Contains problems from ACM programming competitions and different local competitions. It is a bit more difficult to get used to but has lots of problems. http://acm.uva.es/problemset/

CCC 1998 Stage 1
http://compsci.ca/v3/viewtopic.php?t=228&highlight=ccc
CCC 2000 Stage1: S2J4: Babbling Brooks
http://compsci.ca/v3/viewtopic.php?t=284&highlight=ccc
CCC 1997 Stage1: Problem A: Sentences
http://compsci.ca/v3/viewtopic.php?t=214&highlight=ccc
CCC 1996 Stage1: Problem A: Deficient, Perfect, and Abundan
http://compsci.ca/v3/viewtopic.php?t=213&highlight=ccc
CCC 2004 Answers to J5
http://compsci.ca/v3/viewtopic.php?t=3925&highlight=ccc
CCC 2003 Stage1: S1J3: Snakes and Ladders
http://compsci.ca/v3/viewtopic.php?t=433&highlight=ccc
Old CCC question
http://compsci.ca/v3/viewtopic.php?t=836&highlight=ccc
CCC 2003 Stage1: J2: Picture Perfect
http://compsci.ca/v3/viewtopic.php?t=431&highlight=ccc
CCC 2003 Stage1: J1: Trident
http://compsci.ca/v3/viewtopic.php?t=430&highlight=ccc

Man this forum is awesome.

Author:  Nick [ Wed Feb 13, 2008 7:33 am ]
Post subject:  RE:Need some tips for the CCC.

omg nice find with all these and with any luck I'll be seeing you at UW for stage 2 Very Happy


: