A. Sahiy Diyorbek

#include <bits/stdc++.h>

using namespace std;

#define int long long

signed main() {
    int n, k, m = 0, s = 0;
    cin >> n >> k;
    vector<int> a(n);
    for (int &i : a) cin >> i;
    for (int i : a) {
        s += k;
        if (s < i) m++;
        else s -= i;
    }
    cout << m;
    return 0;
}

B. Humoyun vs Muhammadaziz

#include <bits/stdc++.h>

using namespace std;

int main() {
    int n, m = 0;
    cin >> n;
    vector<int> a(n);
    for (int &i : a) cin >> i;
    for (int i = 1; i < n; ++i) m += a[i] < a[i - 1];
    cout << m;
    return 0;
}

C. Yutqazgan yutdi

#include <bits/stdc++.h>

using namespace std;

#define int long long

signed main() {
    int n, h = 0, m = 0;
    cin >> n;
    for (int i = 0, x; i < n; ++i) cin >> x, h += x != 1, m += x == 1;
    cout << h << ' ' << m;
    return 0;
}

D. DJ Odil

#include <bits/stdc++.h>

using namespace std;

#define int long long

signed main() {
    int n, sm1 = 0, sm2 = 0;
    cin >> n;
    vector<int> P(n), N(n);
    for (int &i : P) cin >> i, sm1 += i;
    for (int &i : N) cin >> i, sm2 += i;
    for (int i = 0; i < n; ++i) {
        if (sm1 - P[i] > sm2 - N[i]) cout << "p ";
        else if (sm1 - P[i] < sm2 - N[i]) cout << "n ";
        else cout << "d ";
    }
    return 0;
}

E. Saidkamol qiziqqan masala

#include <bits/stdc++.h>

using namespace std;

#define int long long

signed main() {
    int n, m, e = 0;
    cin >> n >> m;
    for (int i = 0, x; i < n; ++i) cin >> x, e = gcd(e, x);
    if (m % e) cout << "YO'Q";
    else cout << "HA";
    return 0;
}