시간 제한 | 메모리 제한 | 제출 | 정답 | 맞힌 사람 | 정답 비율 |
---|---|---|---|---|---|
5 초 | 512 MB | 15 | 6 | 4 | 30.769% |
The most adventurous part of skiing is the journey onto the mountain-top, between trees and through clouds, and past all sorts of enchanting views.
Naturally, the skiers at the foot of the lift can hardly wait to take their turns (although they are a little disappointed that the climb will eventually terminate). They all know exactly which times they plan to catch a lift on the tireless rotary machine.
Unfortunately, there are only so many gondolas available at the start of the day to attach to the track loop. The track loop takes 2 · T minutes to cycle around (T on the way up and then T on the way back down). Given that you can arrange the gondolas on the track however you see fit, what is the minimum summed waiting time of all skiers that you can achieve?
4 10 2 0 15 30 45
10
4 10 3 0 15 30 45
5
5 16 3 16 7 5 8 1
4
ICPC > Regionals > Europe > Northwestern European Regional Contest > The UK & Ireland Programming Contest > UKIEPC 2016 G번