Nowcoder University has 4n students and n dormitories . Students numbered from 1 to 4n. And in the first year, the i-th dormitory 's students are , now in the second year, Students need to decide who to live with. In the second year, you get n tables such as denote these four students want to live together. Now you need to decide which dormitory everyone lives in to minimize the number of students who change dormitory.
Nowcoder University has 4n students and n dormitories ( Four students per dormitory). Students numbered from 1 to 4n. And in the first year, the i-th dormitory 's students are (x1[i],x2[i],x3[i],x4[i]), now in the second year, Students need to decide who to live with. In the second year, you get n tables such as (y1,y2,y3,y4) denote these four students want to live together. Now you need to decide which dormitory everyone lives in to minimize the number of students who change dormitory.
标签: HBC17411room题解