220982026-01-14 16:59:51algoproBájital (80 pont)cpp17Wrong answer 0/8035ms512 KiB
// UUID: 414688f8-62b4-4a36-8204-9c1544b7f867
#include <bits/stdc++.h>
#include <cmath>
using namespace std;

int main() {
	long long n, x; cin >> n >> x;
    long long a = 0, r = 0;
	long long bro;
	for (long long i = 0; i < n; i++) {
		cin >> bro;
		a += bro / 3;
		r += bro % 3;
	}

	if (a > r) a -= ceil((a - r)/(x+1));
	
	cout << a;
}
SubtaskSumTestVerdictTimeMemory
base0/80
1Accepted0/01ms316 KiB
2Wrong answer0/01ms508 KiB
3Wrong answer0/21ms316 KiB
4Wrong answer0/21ms316 KiB
5Wrong answer0/21ms316 KiB
6Wrong answer0/21ms316 KiB
7Wrong answer0/42ms316 KiB
8Wrong answer0/41ms316 KiB
9Wrong answer0/235ms396 KiB
10Wrong answer0/235ms396 KiB
11Wrong answer0/235ms396 KiB
12Wrong answer0/235ms404 KiB
13Wrong answer0/235ms316 KiB
14Wrong answer0/235ms512 KiB
15Wrong answer0/235ms400 KiB
16Wrong answer0/235ms368 KiB
17Wrong answer0/234ms396 KiB
18Wrong answer0/235ms508 KiB
19Wrong answer0/235ms316 KiB
20Wrong answer0/235ms316 KiB
21Wrong answer0/235ms400 KiB
22Wrong answer0/235ms512 KiB
23Wrong answer0/41ms500 KiB
24Wrong answer0/41ms316 KiB
25Wrong answer0/41ms316 KiB
26Wrong answer0/419ms500 KiB
27Wrong answer0/435ms508 KiB
28Wrong answer0/435ms396 KiB
29Wrong answer0/435ms396 KiB
30Wrong answer0/234ms316 KiB
31Wrong answer0/234ms316 KiB
32Wrong answer0/235ms400 KiB
33Wrong answer0/235ms392 KiB