220952026-01-14 16:57:42algoproBájital (80 pont)cpp17Wrong answer 0/8035ms512 KiB
// UUID: 61b73c6e-c8ad-4aaa-9d0e-073f05c5ce6e
#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/01ms316 KiB
3Wrong answer0/21ms316 KiB
4Wrong answer0/21ms316 KiB
5Wrong answer0/21ms316 KiB
6Wrong answer0/21ms316 KiB
7Wrong answer0/42ms316 KiB
8Wrong answer0/42ms512 KiB
9Runtime error0/235ms396 KiB
10Wrong answer0/235ms500 KiB
11Wrong answer0/235ms500 KiB
12Wrong answer0/235ms396 KiB
13Wrong answer0/235ms316 KiB
14Wrong answer0/235ms316 KiB
15Wrong answer0/235ms396 KiB
16Wrong answer0/235ms396 KiB
17Wrong answer0/235ms508 KiB
18Wrong answer0/235ms396 KiB
19Wrong answer0/235ms400 KiB
20Wrong answer0/235ms500 KiB
21Wrong answer0/235ms316 KiB
22Wrong answer0/235ms512 KiB
23Wrong answer0/41ms316 KiB
24Wrong answer0/42ms316 KiB
25Wrong answer0/41ms316 KiB
26Wrong answer0/419ms396 KiB
27Wrong answer0/435ms396 KiB
28Wrong answer0/434ms404 KiB
29Wrong answer0/434ms316 KiB
30Wrong answer0/235ms396 KiB
31Wrong answer0/234ms400 KiB
32Runtime error0/235ms400 KiB
33Runtime error0/235ms316 KiB