71212023-12-31 09:41:46MagyarKendeSZLGBájital (80 pont)cpp17Wrong answer 54/80300ms20192 KiB
#include <bits/stdc++.h>

#define speed cin.tie(0); ios::sync_with_stdio(0)
#define cinv(v) for (auto& e : v) cin >> e;
#define all(v) v.begin(), v.end()
#define has(s, e) s.count(e)

using namespace std;
using ll = long long;
using point = array<int, 2>;

int main() {
    speed;

    int N, x;
    cin >> N >> x;
    vector<int> v(N);
    cinv(v);
    
    int remS = 0, divS = 0;

    for (int b : v) {
        remS += b % x;
        divS += b / x;
    }

    while (divS > remS) {
        divS--;
        remS += x;
    }

    cout << divS;
}
SubtaskSumTestVerdictTimeMemory
base54/80
1Accepted0/03ms1972 KiB
2Accepted0/03ms2092 KiB
3Accepted2/24ms2364 KiB
4Accepted2/23ms2496 KiB
5Accepted2/23ms2680 KiB
6Accepted2/23ms2664 KiB
7Accepted4/44ms2888 KiB
8Accepted4/412ms2984 KiB
9Wrong answer0/214ms4348 KiB
10Wrong answer0/2143ms5164 KiB
11Wrong answer0/214ms6140 KiB
12Wrong answer0/252ms6772 KiB
13Wrong answer0/2128ms7712 KiB
14Wrong answer0/214ms8268 KiB
15Wrong answer0/214ms9124 KiB
16Wrong answer0/2119ms9732 KiB
17Wrong answer0/275ms10668 KiB
18Wrong answer0/246ms11640 KiB
19Wrong answer0/214ms12480 KiB
20Accepted2/241ms13444 KiB
21Accepted2/228ms14344 KiB
22Accepted2/224ms14928 KiB
23Accepted4/43ms14312 KiB
24Accepted4/43ms14284 KiB
25Accepted4/43ms14376 KiB
26Accepted4/410ms15328 KiB
27Accepted4/417ms15992 KiB
28Accepted4/414ms16576 KiB
29Accepted4/414ms17296 KiB
30Accepted2/214ms17976 KiB
31Accepted2/214ms18796 KiB
32Time limit exceeded0/2300ms18556 KiB
33Wrong answer0/2136ms20192 KiB