#K60027. Task Assignment Based on Duration

    ID: 30995 Type: Default 1000ms 256MiB

Task Assignment Based on Duration

Task Assignment Based on Duration

You are given three tasks with durations (d_1), (d_2), and (d_3). Each task must be assigned to a worker based on their experience level. The worker with the highest experience (level 1) gets the task with the longest duration, the worker with the second highest experience (level 2) gets the task with the second longest duration, and the worker with the lowest experience (level 3) gets the shortest task. In case of ties, the tasks preserve their input order (i.e. stable sorting applies). Formally, if we sort the tasks such that (d_{\sigma(1)} \ge d_{\sigma(2)} \ge d_{\sigma(3)}), then assign rank (i) (starting from 1) to the task at position (\sigma(i)). The output should list the experience level assignments in the same order as the input tasks.

inputFormat

Standard input (stdin) consists of a single line containing three space-separated integers (d_1), (d_2), and (d_3), representing the durations of the three tasks.

outputFormat

Standard output (stdout) should contain three space-separated integers representing the experience level assignments for the tasks in the order they were given.## sample

20 15 25
2 3 1