|시간 제한||메모리 제한||제출||정답||맞은 사람||정답 비율|
|1 초 (추가 시간 없음)||512 MB||2||2||2||100.000%|
For his thesis in distributed systems, Drew is focusing on an underserved market ripe for disruption: the player piano, a genus of analogue device which, given a piece of paper of appropriate style and width, can play whatever song is copied onto it.
Drew is going to network these devices; they will communicate using their native medium of long pieces of paper.
He hit a snag immediately: pianos can only communicate directly if they take the same width of paper, and not all of the pianos in the computer science department take the same width of paper. Some will need to be retrofitted if his plans are to succeed.
Time is valuable and, in particular, the time of the expensive technician Drew has hired to carry out the work is eye-wateringly valuable. What is the smallest number of pianos he can get away with modifying to make his project work?
Output the minimum number of pianos that can be modified in order for all of the connections to become possible.
4 2 40 20 40 2 2 3 1 3