Page not loading? Try clicking here.
Placeholder

#10427
Interactive
Grading on hold

Equal Sum 5s 1024MB

Problems

You are given a set of distinct integers. You need to separate them into two non-empty subsets such that each element belongs to exactly one of them and the sum of all elements of each subset is the same.

An anonymous tip told us that the problem above was unlikely to be solved in polynomial time (or something like that), so we decided to change it. Now you get to decide what half of the integers are!

This is an interactive problem with three phases. In phase 1, you choose \mathbf{N} distinct integers. In phase 2, you are given another \mathbf{N} integers that are distinct from each other and from the ones you chose in phase 1. In phase 3, you have to partition those 2\mathbf{N} integers into two subsets, both of which sum to the same amount. All 2\mathbf{N} integers are to be between 1 and 10^9, inclusive, and it is guaranteed that they sum up to an even number.


Source

GCJ 2022r1a B

You must sign in to write code.