i have just started getting involved in codechef…
merely reading the practice questions i am not able to understand the way to approach the programmming.
someone please help
You can start from monthly competitions
Start with the questions categorized under Easy section, in that too start from bottom to top. For eg. http://www.codechef.com/problems/FCTRL
in this question, after understanding the question, we just have to find number of trailing zeros.
Involve some of your mathematics & you’ll observe that one 2 and one 5 will form one zero. i.e. 2*5 = 10
There’s one trailing zero in the end of 10. Now number of two’s are greater than number of five’s alright. So the purpose of the question has broken down & we merely have to find how many times 5 is occurring.
That’s how we normally approach a question. Now its up to you to find the way of finding how many times 5 is in there.
Welcome to the amazing world of algorithmic programming.
P.S.:never give up & simply copy someone else’s solution,seeing the AC (Correct Answer) is an amazing feeling when you solve it on your own.
i second his last line … seeing AC after writing your own code is an amazing feeling !!
Hello @potentialsoul : You can go to the discuss section and there go to wiki . You will find some tutorials there but more importantly you will find links to editorials of problems that have appeared in previous contests . All problems hosted at CodeChef have at some moment appeared in a contest hence editorials exists for all practice problems ( except peer problems ) . Whenever you have a problem in a practice problem and you are not understanding it look at its editorial , or other way directly look at a problem and its editorial and if you feel you understand the problem and its solution go ahead and code it and submit it . It will help you learn new concepts and practice at the same time . Whenever you have problem that your code is not accepted even though you are following the editorial , you can post a question here on the Forum giving link to the problem and a link to your solution which was judged incorrect . Then me or someone else here will help you out . There are many people here ( including me ) who regularly help other people debug their programs through this forum .
Besides if you want you could read some good books . Like Algorithms by Cormen et. al. is excellent and you could also buy a good book for programming language of your choice .
Best of luck and happy coding . Cheers .
Nice answer just a little correction: most of the problems have editorials but those that come directly from SPOJ and those from the early contests don’t have editorials