Your SlideShare is downloading. ×
  • Like
  • Save

Loading…

Flash Player 9 (or above) is needed to view presentations.
We have detected that you do not have it on your computer. To install it, go here.

×

Now you can save presentations on your phone or tablet

Available for both IPhone and Android

Text the download link to your phone

Standard text messaging rates apply

Problem solving on acm international collegiate programming contest

  • 1,871 views
Published

 

Published in Education , Technology
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Be the first to comment
    Be the first to like this
No Downloads

Views

Total Views
1,871
On SlideShare
0
From Embeds
0
Number of Embeds
3

Actions

Shares
Downloads
0
Comments
0
Likes
0

Embeds 0

No embeds

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
    No notes for slide

Transcript

  • 1. Problem Solving on ACM International Collegiate Programming Contest Fedor Tsarev, ACM ICPC World Champion 2008 St. Petersburg University of IT, Mechanics & Optics 1 8 . 1 0.2010 ETH Zurich
  • 2. Epigraph
    • The whole is more than
    • the sum of its parts
    • ( Aristotle )
  • 3. Perfect Team
    • Common code-style (indents, variable naming, …)
    • Common patterns of algorithm implementation
    • Everyone should know strong and weak points of other members of the team
  • 4. Start of the Contest
    • Write a template
    • Read problem statements:
      • Starting with the first problem
      • Starting with the last problem
    • Do not try to solve the first problem you have read – find the simplest problem
    • Every member must know his role at the start of the contest
  • 5. Problems Status … + D + C + B Graph theory + A Comments Member 3 Member 2 Member 1 №
  • 6. One hour from the start of the contest… + + + … Geometry + + + D DP over subsets + + + C KMP + + + B Graph theory + A Comments Member 3 Member 2 Member 1 №
  • 7. How to solve a problem
    • Read the statement carefully
    • Invent an algorithm
    • Discuss the algorithm with another member of your team
    • Discuss the implementation with another member of your team
    • Write a program
    • Test your solution
  • 8. Submitting a Solution
    • Save the source file before submitting
    • Compile it
    • Always test the solution on example tests and on all tests you have:
      • Corner cases
      • Maximal tests (checking time limit and memory limit)
    • Print the source code after submitting ( on the official contest )
  • 9. If your solution is not accepted…
    • … then you have a bug in the program 
    • To find it carefully read the printout
    • Never read the code from the screen
    • If you find a bug do not fix it right now on the computer – there are more bugs in the program
    • Fix the bug in the printout
    • Try to explain your code to another member of your team
    • Write a slower solution and stress-test with it
  • 10. Debugging
    • Debugging is a very time-consuming process
    • You do not create code while debugging
    • Avoid using debugger!
    • Read the printout instead
  • 11. Programming in Pairs
    • If the implementation is too difficult for you…
    • If you are tired…
    • If the code is large…
    • Try programming in pairs:
      • One of the team members writes the code
      • Another one is looking for mistakes
    • This idea is from eXtreme Programming
  • 12. Last hour of the contest
    • Your goal is to get “Accepted” for all problems you have started
    • Do not start new problems if you have “old” ones
    • If you do not have enough time for all problems choose some of them
  • 13. Log of the contest
    • Only for trainings
    • Helps you to analyze the results of the contest
    … … … 300 … … … … … … … 60 Read F, G, H, I Read A, B, C, D. Wrote solution for B Wrote a template 30 Member 3 Member 2 Member 1 Time
  • 14. Thank you!
    • We wish you success in ACM ICPC!