85702024-01-22 11:10:02IgnácBájital (80 pont)cpp17Accepted 80/8037ms4720 KiB
// Source: https://usaco.guide/general/io

#include <bits/stdc++.h>
using namespace std;

int main() {
	int n, x;
	cin >> n >> x;
	long long sum = 0, maxx = 0;
	for (int i = 0; i < n; i++) {
		int a;
		cin >> a;
		sum += a;
		maxx += a / x;
	}

	cout << min(maxx, sum / (x + 1));
}
SubtaskSumTestVerdictTimeMemory
base80/80
1Accepted0/03ms1876 KiB
2Accepted0/03ms2072 KiB
3Accepted2/23ms2300 KiB
4Accepted2/23ms2424 KiB
5Accepted2/23ms2636 KiB
6Accepted2/23ms2848 KiB
7Accepted4/43ms2996 KiB
8Accepted4/43ms3084 KiB
9Accepted2/237ms3212 KiB
10Accepted2/237ms3328 KiB
11Accepted2/237ms3340 KiB
12Accepted2/237ms3352 KiB
13Accepted2/237ms3600 KiB
14Accepted2/235ms3680 KiB
15Accepted2/237ms3776 KiB
16Accepted2/237ms3984 KiB
17Accepted2/237ms4072 KiB
18Accepted2/237ms4072 KiB
19Accepted2/237ms4072 KiB
20Accepted2/237ms4196 KiB
21Accepted2/237ms4284 KiB
22Accepted2/237ms4288 KiB
23Accepted4/43ms4436 KiB
24Accepted4/43ms4320 KiB
25Accepted4/43ms4400 KiB
26Accepted4/421ms4400 KiB
27Accepted4/437ms4392 KiB
28Accepted4/437ms4400 KiB
29Accepted4/435ms4396 KiB
30Accepted2/235ms4532 KiB
31Accepted2/237ms4648 KiB
32Accepted2/237ms4596 KiB
33Accepted2/237ms4720 KiB