There are 100 boxes in the room. In every box there is a note with some number from 1 to 100 (no repetitions).Person A comes into the room and checks all the boxes and notes inside them. He can (doesn't have to) choose 2 boxes and swap notes between them. After he finishes he exits the room. Person B comes to the room. He needs to find a note with some random number. In order to do it he can open only 50 boxes.
Question: how person A should switch 2 boxes in order to help person B to find the number? (person A doesn't know which note person B should find).