Sleeping in Class
1 Sec 64 MB |
59 | 160 |
通过 | 提交 |
题目描述
输入格式
输出格式
Please write T lines of output, giving the minimum number of modifications Elsie could perform to make all the log entries equal for each case.
样例输入 #1
3 6 1 2 3 1 1 1 3 2 2 3 5 0 0 0 0 0
样例输出 #1
3 2 0
提示
For the first test case in this example, Elsie can change her log to consist solely of 3s with 3 modifications.
1 2 3 1 1 1
-> 3 3 1 1 1
-> 3 3 2 1
-> 3 3 3
For the second test case, Elsie can change her log to 7 with 2 modifications.
2 2 3
-> 2 5
-> 7
For the last test case, Elsie doesn’t need to perform any operations; the log already consists of equal entries.
来源
USACO 2022 February Contest, Bronze