Transcribed Image Text: It’s final exam week of Jack’s cooking class

Transcribed Image Text: It’s final exam week of Jack’s cooking class. His class of N students are busy
studying for it. Unfortunately, being crammers, each student is only able to study
one topic. The i-th student studied topic S. Topics are numbered 1 to 106. Jack
prepared N tasks for exam. He intends to assign each task to exactly one student.
Each task requires exactly one topic to pass. The j-th task requires topic Tj. Tom is a
sadistic teacher; he doesn’t want the students to pass! Therefore, he wants to
assign the tasks in such that the number of students assigned to the topic he/she
studied for is minimized. Can you Jack in developing a C++ code to
find any such assignment? If there are multiple possible assignments, you may
output anyone.
Input:
1
100 100 200
100 100 200
Output:
1
321

-25-


Buy plagiarism free, original and professional custom paper online now at a cheaper price. Submit your order proudly with us



Essay Hope