4 1 7 4 8
3 2 3 1 2 4 1 4 1 4 In this sample output, the operations are executed as follows: 1. Take $1$ candy from child $2$ and give it to child $3$. Immediately after this, the number of candies each child has is $1,6,5,8$. 2. Take $1$ candy from child $2$ and give it to child $4$. Immediately after this, the number of candies each child has is $1,5,5,9$. 3. Take $4$ candies from child $4$ and give them to child $1$. Immediately after this, the number of candies each child has is $5,5,5,5$. Eventually, all $N$ children have exactly five candies each.
2 100 3
\-1
{
"problem": {
"name": "Candy Redistribution",
"description": {
"content": "There are $N$ children, numbered $1$ to $N$. Child $i$ has $A_i$ candies. Your goal is to execute the following operation as few times as possible so that eventually all $N$ children have the same num",
"description_type": "Markdown"
},
"platform": "AtCoder",
"limit": {
"time_limit": 2000,
"memory_limit": 262144
},
"difficulty": "None",
"is_remote": true,
"is_sync": true,
"sync_url": null,
"sign": "abc432_f"
},
"statements": [
{
"statement_type": "Markdown",
"content": "There are $N$ children, numbered $1$ to $N$.\nChild $i$ has $A_i$ candies.\nYour goal is to execute the following operation as few times as possible so that eventually all $N$ children have the same num...",
"is_translate": false,
"language": "English"
}
]
}