56182023-08-09 21:47:18999Bájital (80 pont)cpp17Wrong answer 12/8041ms4436 KiB
// Source: https://usaco.guide/general/io

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

signed main() {
	int n,x;cin>>n>>x;
	int s3=0,sk=0;
	while(n--){
		int a;cin>>a;
		sk+=a%x;
		a-=a%x;
		s3+=a/x;
	}
	if(s3>=sk){
		int ss=sk;
		s3-=sk;
		ss+=s3/(x+1);
		cout<<ss/2<<endl;
	}
	else{
		cout<<s3<<endl;
	}
}
SubtaskSumTestVerdictTimeMemory
base12/80
1Accepted0/03ms1748 KiB
2Wrong answer0/03ms2056 KiB
3Wrong answer0/23ms2128 KiB
4Wrong answer0/23ms2272 KiB
5Wrong answer0/23ms2480 KiB
6Wrong answer0/23ms2568 KiB
7Wrong answer0/43ms2760 KiB
8Wrong answer0/43ms2848 KiB
9Wrong answer0/239ms2976 KiB
10Wrong answer0/239ms3056 KiB
11Wrong answer0/239ms3184 KiB
12Wrong answer0/239ms3264 KiB
13Wrong answer0/239ms3268 KiB
14Wrong answer0/239ms3512 KiB
15Wrong answer0/239ms3464 KiB
16Wrong answer0/239ms3460 KiB
17Wrong answer0/239ms3460 KiB
18Wrong answer0/241ms3708 KiB
19Wrong answer0/239ms3784 KiB
20Wrong answer0/239ms3672 KiB
21Wrong answer0/239ms3676 KiB
22Wrong answer0/241ms3924 KiB
23Wrong answer0/43ms4012 KiB
24Accepted4/42ms4092 KiB
25Wrong answer0/42ms4092 KiB
26Accepted4/425ms4340 KiB
27Wrong answer0/439ms4352 KiB
28Wrong answer0/439ms4352 KiB
29Wrong answer0/439ms4320 KiB
30Accepted2/239ms4312 KiB
31Accepted2/239ms4316 KiB
32Wrong answer0/239ms4436 KiB
33Wrong answer0/239ms4428 KiB