시간 제한 | 메모리 제한 | 제출 | 정답 | 맞힌 사람 | 정답 비율 |
---|---|---|---|---|---|
1 초 | 128 MB | 9 | 7 | 6 | 100.000% |
We are given n independent and indivisible jobs numbered from 1 to n. 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 i is hi(t) = ait + bi, if we start it in the moment t. We assume that 0 ≤ ai ≤ 1, 0 ≤ bi ≤ 1.
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 1, ..., n; one number per line.
5 0.002000 0.003000 0.016000 0.001000 0.100000 0.300000 0.016000 0.005000 0.030000 0.060000
2 4 1 5 3
Olympiad > Polish Olympiad in Informatics > POI 1994/1995 > Stage 3 5번