This puzzle is based on a competitive programming problem in SG NOI 2019.
Let's assume there are $100$ balls with some labels (e.g. with $100$ different marks on them) having different weights of integers $1$ to $100$. You don't know which ball has which weight. You want to know them by using a unique weighing machine as few as possible times.
This machine needs a sack as an input. This sack must contain exactly $50$ boxes. Each box must contain exactly $2$ balls. Thus, all balls will be inserted to the machine but "separated" in boxes. The machine will then report all weights of all balls and return the sack back to you.
The tricky part is that: when the machine scans the input, the boxes may be shuffled inside the sack and the balls inside each boxes may be shuffled as well. After the scanning, they may be shuffled again before retrieved by you.
For example, let's say you only have $6$ balls from $A$ to $F$. Their weights are $1$ to $6$ respectively but you don't know yet about this. When you insert a sack with $3$ boxes each containing $(A,B) - (C,D) - (E,F)$ to the machine, it may be shuffled to $(D,C) - (A,B) - (F,E)$ when scanned. Therefore, the machine will report $(4,3) - (1,2) - (6,5)$. After that, the sack may be shuffled again, for example to $(F,E) - (B,A) - (C,D)$, as you retrieved it.
So, for $100$ balls, what is the minimum number of times to use the machine to know which ball has which weight?