← CSES Better

Processor Scheduling

INOI · 2019 · Indian National Olympiad in Informatics · INOI1901

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 · greedy · deadlines

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

job timeline

Public jobs must cover their interrupt instants

Each public job occupies one continuous interval containing its assigned signal time; classified jobs must retain their order.

classified job C_i
0–3
public job P_j
1–4
required time t_j
2–5
  1. 1

    Place signal jobs

    Place public jobs around their required interrupt instants, respecting their processing lengths.
  2. 2

    Schedule ordered jobs

    Insert the ordered classified chain into the remaining timeline without overlap.
  3. 3

    Minimize completion time

    Minimize the finish time while checking every signal falls during its matching public job.
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.