Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Today is Ivana's birthday. On the party are N enraged children. When 2 children with angers A and B meet, violence with power of A*B arises. The total violence of the party is the sum of all violences of the pairs of children. Optimally rearrange the children into pairs such that the violence is minimized! N is even.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement