W razie problemów technicznych ze Szkopułem, prosimy o kontakt mailowy pod adresem [email protected].
Jeśli chciałbyś porozmawiać o zadaniach, rozwiązaniach lub problemach technicznych, zapraszamy na serwery Discord. Są one moderowane przez społeczność, ale członkowie zespołu technicznego też są tam aktywni.
We are given independent and indivisible jobs numbered from to . They should be executed sequentially in any order. The later the execution of a job starts the longer it lasts - precisely, the time of execution of the job is , if we start it in the moment . We assume that , .
The goal is to schedule the jobs so that the total execution time is the shortest.
Write a program that:
One should write in the standard output the scheduling of the jobs, i.e. an appropriate permutation of numbers ; one number per line.
For the input data:
5 0.002000 0.003000 0.016000 0.001000 0.100000 0.300000 0.016000 0.005000 0.030000 0.060000
the correct result is:
2 4 1 5 3
Task author: Marcin Jurdzinski.