Artificial intelligent assistant

Puzzle about convict who chooses length of his imprisonment This is the puzzle I deal with for few days right now and I can't figure it out. I translated it from other language if I can improve post please comment. In the end of a trial judge sentenced a convict for some years of prison, but he let the convict to choose how many years he will spend there. Judge placed 12 boxes in the circle. In clockwise order the numbers on the boxes were: 7, 10, 1, 3, 6, 11, 8, 4, 5, 9, 0, 2. Judge said that in every box there is a certain number of coins. In clockwise order amount of coins in boxes were: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11. Convict had to choose a box. The number of coins determined years of his/her imprisonment. Convict asked judge how many boxes have number equal to number of coins inside. Judge said he won't say because then convict could determine empty box. Convict selected empty box. **How he found out which box was empty?**

Call a box "accurately labeled" if it has the same number of coins in it as its label. There are several ways in which none of the boxes could be accurately labeled, so at least one of them must be accurately labeled. The sets of boxes that could be accurately labeled are $\\{0,6,8\\},\\{1\\},\\{2\\},\\{3,9\\},\\{4,5,10\\},\\{7\\},\\{11\\}$. The only one of these sets with a unique cardinality is $\\{3,9\\}$, so those must be the accurately labeled ones. This means the box labeled 7 has no coins in it.

xcX3v84RxoQ-4GxG32940ukFUIEgYdPy cb77cdfec8adb68cb785d352981b7f87