Search

الأربعاء، 13 يوليو 2011

Session Two: Ad-hoc

Instructor: Ahmed MamdouhMahmoud Fayyaz

What is Ad-hoc ??
        Ad-hoc is the kind of problems that won't be identified as another category. In another way , it is the problems that could not be formalized into standard general way to solve all of it. 

General Characteristics of Ad-hoc solution 
  • Simple approach, straight forward.
  • Easy to code.
  • large on order.
  • Does not depend on a large amount of knowledge and experience in competitive programming to reach a solution. 
How to Act .. ?
  • Identify the problem and get the basic idea of your solution
  • Go and see the constrains
  • do small amount of algorithms analysis.
  • If you got any observation , Hold it well but also be sure about it (Observations are double edged weapons, it can make you solve the problem in no time but also can destroy the whole problem )
Problems covered on sessions
(NB : The H.W is not done yet. Wait for the new ones they are coming :) )

الأحد، 10 يوليو 2011

Session One : Introduction

Instructor : Ahmed Mamdouh

Definitions Before we start ..
  • Algorithm: is a step by step solution for a given problem that can computerized.
  • Competitive Programming: Given well-known Computer Science problem , solve them as quickly as possible (Steven Halim ) . In another way , it is an efficient search for the correct solution .
  • Categories:
    • Ad-hoc
    • Brute force
    • Simulation
    • String Manipulation
    • Recursion
    • Search
    • Graph
    • Dynamic Programming
    • Number Theory
    • Geometry
    • Probability
  • Benefits:
    • it opens up the horizon for your brain to see problems differently  
    • gives you experiences upon working under pressure
    • it affects your coding stile
    • most of the companies ask about it in interviews to see the way you think 



What would you do to perfect it .. ?
          All top rated contestants nowadays along with all professionals related to algorithms and Competitive Programming agreed on the importance of practice. Practice is the core corner stone for any one interested in this field. So for now one you just hang on there and practice , practice and practice even more :)

         Second main thing to any beginner is to never get disappointed , never lose hope . the way along algorithms is long ; so get prepared with hope and motivation .  

Where to compete & practice ?
What is the problems ?
          the problems consists of a verbose definition (mainly a story about the problem) , constrains , sample input and sample output . You are required throw the given information to search and find the solution correctly and within range of limited time .

What are the judge responses?
  • Accepted : which implies that you got all the correct answers within time limited for the problem.
  • Wrong Answer : which implies that you got one or more answer that did not match the expected.
  • Presentation Error : which implies that you got the correct answer but the wrong output format.
  • Time Limit Exceeded:  which implies that your code did not end on the specific time (beware that you can do almost 10^7 computer instruction par second)
  • Compilation Error
  • Run-time Error