Petya’s Exams

Source: Codeforces 978G

  1. Read the problem and summarise the task.
  2. Pick an order to approach the problem.
  3. What is the first choice to be made in your order?
  4. How will we determine whether we have failed to prepare adequately for an exam?

  5. Design an algorithm which determines whether Petya can pass all the exams, and if so, finds a satisfactory schedule.
  6. Implement this algorithm in code.
  7. Submit your program for judging!