juyomo   1년 전

고쳐야 할 부분을 bold & underline 으로 표시했습니다. 이유는 괄호 안에 있어요.

문제

During the Olympiad finals we usually serve pizza for the contestants. When the food arrives, the contestants to(이 단어 빠져야해요.) queue to get some pizza. Each contestant(갑자기 contestant 에서 student 로 바뀜) will be given a single slice of pizza when his/her turn arrives. The problem is that some people need more than one slice of pizza to be well fed so they need to queue again for more pizza after they get the first one.

Given a list of slices needed to feed(동사 원형 필요) each of the contestants, compute how long it will take to feed(동사원형필요) all of them. We can give a slice of pizza every second and when a contestant is well fed he does not return to the queue.

힌트

The contestants that get a slice are, in order: 1, 2, 3, 4, 2, 4, 2, 4, 4.

So at t=1s the first contestant gets(복수 단수) all the slices he/she needs(이해를 돕기 위해 부연설명 덧붙임), at t=3s the third contestant gets a slice, at t=7s the second contestant(갑자기 contestant 에서 student 로 바뀜) finishes and finally at t=9s the fourth contestant(아까와 동일) gets the last slice.

댓글을 작성하려면 로그인해야 합니다.