|시간 제한||메모리 제한||제출||정답||맞힌 사람||정답 비율|
|6.5 초 (추가 시간 없음)||1024 MB||15||7||6||42.857%|
The spy agency you are employed by1 has sent you and some fellow spies on an important mission deep in the jungles of Luxembourg. Your colleagues and you are currently waiting on an abandoned and overgrown airstrip, about to be picked up by the finest spy plane the Dutch bureaucracy can buy.
However, an urgent communication from the HQ has just come in to inform you counterintelligence has learned that during the mission, an infamous counter-spy called Jack the Mole was planted among you! You do a headcount and to your horror realize that while you started the mission with $n-1$ people, there are now $n$!2 Since you all take Covid regulations very seriously, you all wore masks, so it is not obvious who the imposter is.
Then you remember: the finest spy plane in question is thrown off balance rather easily, so the agency picked the $n-1$ agents so that it is possible to divide them into two groups of equal weight, but not necessarily of equal size, for the left and the right side of the plane respectively. However, it did not specify exactly which two groups (anonymity and all that). Of course you have a scale with you (doesn't any good spy?), so you can find which of the $n$ people on the mission is potentially the mole.
1When your family members ask, please lie to them and say you work as a computer programmer.
2Exclamation point, not factorial.
The input consists of:
3If those ranges seem odd, recall spies can be very muscular or very nimble.
Output a single number $k$, the number of spies that are potentially the mole, followed by $k$ integers, the suspects, in increasing order.
3 1 1 2
3 1 1 1
3 1 2 3
5 2 1 3 4 2
3 1 4 5
5 1 1 1 3 1
5 1 2 3 4 5
4 2 1 5 3
2 2 3