56262023-08-09 23:56:34999Bájital (80 pont)cpp17Wrong answer 4/8048ms4840 KiB
#include <iostream>
#include <algorithm>

int main() {
    int N, x;
    std::cin >> N >> x;
    int A[N];
    for (int i = 0; i < N; ++i) {
        std::cin >> A[i];
    }
    std::sort(A, A + N);

    int maxAdag = 0;
    for (int i = 0; i < N; ++i) {
        int liternyi = A[i];
        if (x <= liternyi) {
            ++maxAdag;
            --liternyi;
        }
        int hozzaontott = liternyi / x;
        maxAdag += hozzaontott;
    }
    std::cout << maxAdag << std::endl;
    return 0;
}
SubtaskSumTestVerdictTimeMemory
base4/80
1Wrong answer0/03ms1872 KiB
2Wrong answer0/03ms2076 KiB
3Wrong answer0/23ms2160 KiB
4Wrong answer0/23ms2292 KiB
5Wrong answer0/23ms2496 KiB
6Wrong answer0/23ms2468 KiB
7Wrong answer0/43ms2612 KiB
8Wrong answer0/43ms2692 KiB
9Wrong answer0/246ms3584 KiB
10Wrong answer0/246ms3672 KiB
11Wrong answer0/246ms3784 KiB
12Wrong answer0/246ms3796 KiB
13Wrong answer0/246ms3884 KiB
14Wrong answer0/246ms3884 KiB
15Wrong answer0/246ms4128 KiB
16Wrong answer0/246ms4204 KiB
17Wrong answer0/246ms4456 KiB
18Wrong answer0/246ms4448 KiB
19Wrong answer0/246ms4664 KiB
20Wrong answer0/246ms4744 KiB
21Wrong answer0/246ms4680 KiB
22Wrong answer0/246ms4656 KiB
23Wrong answer0/42ms3888 KiB
24Wrong answer0/42ms3888 KiB
25Wrong answer0/42ms3888 KiB
26Accepted4/428ms4656 KiB
27Wrong answer0/446ms4680 KiB
28Wrong answer0/446ms4656 KiB
29Wrong answer0/446ms4720 KiB
30Wrong answer0/248ms4720 KiB
31Wrong answer0/246ms4748 KiB
32Wrong answer0/246ms4732 KiB
33Wrong answer0/246ms4840 KiB