Hi all please help me how to solve solve hard program i am not good in math tell me, should i read some maths before solving these programs

Hi all please help me how to solve solve hard program i am not good in math tell me, should i read some maths before solving these programs.

Math has lots of branches, you don’t need all for programming on codechef. You need to study following topics-

  1. Number theory
  2. Graph theory (most important)
  3. Set theory
  4. Matrices
  5. Vector calculus (not sure)

Algorithms in computer graphics are also important. BTW even all these topics are not sufficient, but good enough for lots of problems.

Youtube videos are easiest way to learn.

you can share your favorite links with us :wink:

3 Likes

Meh, I say do lots of problems that have tutorials if you can’t get them out. That way every time you run into a problem that you can’t do you learn something new, and immediately have a problem on which to apply the thing that you just learned to cement your knowledge.

After learning the fundamentals (bfs, dijkstra, the really basic dps, max flow), the contests I did to learn most of what I know is all the NWERC contests. Those things are amazing for editorials, and their problems are really nicely written. NWERC taught me Strongly Connected Components etc. Also, look at all of the model solutions, even if you get the problem out. I learned how to properly code a binary search by looking at others solutions. I could always code a binary search, but it was this ugly thing that took a while to code.

With regards to math specifically, I again say learn it as you go. CodeChef will teach you the majority of what you know in that department, I find the problems here very mathsy. The problems last month really hammered home the fast exponentiation topic. Really, just go back through the months here on codechef and solve every problem that was solved by 100 or more people. If you are having trouble then read the editorial. If you are still having trouble pick up one of the many AC’d solutions that are all visible.

4 Likes
//