← CSES Better

Triathlon

INOI · 2012 · Indian National Olympiad in Informatics · INOI1201

Open official problem ↗
Ask AI

Open a hint-first prompt in a new AI chat. Grok may ask you to confirm before sending.

Open Claude Desktop

scheduling · dynamic-programming · ordering

The organizer’s problem statement is available at the official source link.

pipeline

Order the first stage, then overlap later stages

Only the first activity is serialized; each person’s later stages proceed after their own previous stage.

person i: computer -> pole vault -> donutsshared computer orderparallel finish frontier
  1. 1

    Order the first stage

    For a proposed order, compute each person’s ready time after the shared computer.
  2. 2

    Overlap later stages

    Carry the finish frontier through the two parallel activities.
  3. 3

    Compare finish times

    Choose the computer order that minimizes the final completion time.
Tools
1
2
3
4
5
6
7
8
9
10
11
12
Draft saved locally
|12 lines, 156 chars

Run output

Run your code to see output.