Six problems, and none of them says which tool it needs. Use the five steps from the lesson: read the statement twice, restate it in one sentence, check the limits, plan the data and the steps, then write small functions and trace a tiny case by hand.
- Several of these wrap a short task in a long story. Restate first; code second.
- Check the limits before you pick an idea. Where n reaches 2 · 10⁵, comparing every pair is too slow: ask what sorting, counting or a running total can do.
- In a simulation, follow the rules exactly as they are written, one step at a
time. Coordinates up to 10⁹, and sums of many of them, want
long long. - When the statement accepts any correct answer, printing one of them is enough.