为防止广告,目前nocow只有登录用户能够创建新页面。如要创建页面请先登录/注册(新用户需要等待1个小时才能正常使用该功能)。

Sgu/127

来自NOCOW
< Sgu
跳转到: 导航, 搜索

模拟

#include <stdio.h>
using namespace std;
int k, n, ans, num, cnt[10];
int main()
{
    scanf("%d %d", &k, &n);
    while (n--) {
          scanf("%d", &num);
          cnt[num/1000]++;
    }
    for (int i = 1; i < 10; ++i)
        if (cnt[i]) ans += (cnt[i] - 1) / k + 1;
    printf("%d", ans + 2);
    return 0;
}
// From FingerSed
个人工具