exhibit an of length n. He characterizes an exhibit to be acceptable in case it's absolutely impossible to parcel it into 2 aftereffects to such an extent that the amount of the components in the first is equivalent to the amount of the components in the second. Presently he needs to eliminate
Correct answer will be upvoted else downvoted.
He has an exhibit an of length n. He characterizes an exhibit to be acceptable in case it's absolutely impossible to parcel it into 2 aftereffects to such an extent that the amount of the components in the first is equivalent to the amount of the components in the second. Presently he needs to eliminate the base number of components in a so it turns into a decent exhibit. Would you be able to help him?
An arrangement b is an aftereffect of an exhibit an if b can be acquired from a by erasing a few (perhaps zero or all) components. An apportioning of an exhibit is a way of isolating it into 2 aftereffects with the end goal that each component has a place with precisely one aftereffect, so you should utilize every one of the components, and you can't share any components.
Input
The primary line contains an integer n (2≤n≤100) — the length of the cluster a.
The subsequent line contains n integers a1, a2, … , an (1≤
Output
The principal line ought to contain the base number of components you really wanted to eliminate.
The subsequent line ought to contain the files of the components you're eliminating, isolated by spaces.
We can show that an answer consistently exists. In case there are numerous arrangements, you can print any.
Step by step
Solved in 3 steps with 1 images