글
다음주 월요일 저녁에 다들 모여서 빡세게 굴러가기 위한 회의를
하고 싶습니다.
다들 시간되는지요?
성우는 피곤해서 안될려나?
안되는 사람 많으면 화욜로 미룰려고 합니다.
맘을 다잡고 빡세게 돌아가기 위한 준비라고 생각하고 모두들
답글 달아주세요
다음주 월요일 저녁에 다들 모여서 빡세게 굴러가기 위한 회의를
하고 싶습니다.
다들 시간되는지요?
성우는 피곤해서 안될려나?
안되는 사람 많으면 화욜로 미룰려고 합니다.
맘을 다잡고 빡세게 돌아가기 위한 준비라고 생각하고 모두들
답글 달아주세요
http://acm.kaist.ac.kr/Problems/2000a.pdf
Car Racing
이거야 원 정렬문제는 매년 한문제 이상씩 나오느거 같네
본선 a번 문제인듯 하지만
그리 어렵진 않음
이때는 테스트케이스 입력이 파일 입출력
두자리씩 한번에 이전 자리와 비교해서 +1 한 값이 없으면
NO
있으면 계속 오름차순 정렬
그리고 YES
Source Code
Sample Input
A group of NP (2 ≤ NP ≤ 10) uniquely named friends has decided to exchange gifts of money. Each of these friends might or might not give some money to any or all of the other friends. Likewise, each friend might or might not receive money from any or all of the other friends. Your goal in this problem is to deduce how much more money each person gives than they receive.
The rules for gift-giving are potentially different than you might expect. Each person sets aside a certain amount of money to give and divides this money evenly among all those to whom he or she is giving a gift. No fractional money is available, so dividing 3 among 2 friends would be 1 each for the friends with 1 left over -- that 1 left over stays in the giver's "account".
In any group of friends, some people are more giving than others (or at least may have more acquaintances) and some people have more money than others.
Given a group of friends, no one of whom has a name longer than 14 characters, the money each person in the group spends on gifts, and a (sub)list of friends to whom each person gives gifts, determine how much more (or less) each person in the group gives than they receive.
The grader machine is a Linux machine that uses standard Unix conventions: end of line is a single character often known as '\n'. This differs from Windows, which ends lines with two charcters, '\n' and '\r'. Do not let your program get trapped by this!
Line 1: | The single integer, NP | |||
Lines 2..NP+1: | Each line contains the name of a group member | |||
Lines NP+2..end: | NP groups of lines organized like this:
|
RECENT COMMENT