71222023-12-31 09:43:45MagyarKendeSZLGBájital (80 pont)cpp17Wrong answer 54/80300ms4920 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, remS = 0, divS = 0;
    cin >> N >> x;

    while (N--) {
        int a;
        cin >> a;
        remS += a % x;
        divS += a / x;
    }

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

    cout << divS;
}
SubtaskSumTestVerdictTimeMemory
base54/80
1Accepted0/03ms1896 KiB
2Accepted0/03ms2080 KiB
3Accepted2/24ms2292 KiB
4Accepted2/23ms2508 KiB
5Accepted2/23ms2720 KiB
6Accepted2/23ms3080 KiB
7Accepted4/43ms3064 KiB
8Accepted4/410ms3160 KiB
9Wrong answer0/214ms3372 KiB
10Wrong answer0/2143ms3372 KiB
11Wrong answer0/214ms3456 KiB
12Wrong answer0/252ms3584 KiB
13Wrong answer0/2127ms3796 KiB
14Wrong answer0/214ms4048 KiB
15Wrong answer0/214ms4128 KiB
16Wrong answer0/2118ms4112 KiB
17Wrong answer0/275ms4356 KiB
18Wrong answer0/245ms4328 KiB
19Wrong answer0/214ms4188 KiB
20Accepted2/239ms4420 KiB
21Accepted2/228ms4504 KiB
22Accepted2/223ms4504 KiB
23Accepted4/43ms4500 KiB
24Accepted4/43ms4496 KiB
25Accepted4/43ms4744 KiB
26Accepted4/410ms4808 KiB
27Accepted4/416ms4712 KiB
28Accepted4/414ms4808 KiB
29Accepted4/414ms4920 KiB
30Accepted2/214ms4920 KiB
31Accepted2/214ms4912 KiB
32Time limit exceeded0/2300ms3948 KiB
33Wrong answer0/2136ms4820 KiB