제출 #1146449

#제출 시각아이디문제언어결과실행 시간메모리
1146449PersiaMeteors (POI11_met)C11
컴파일 에러
0 ms0 KiB
#include <bits/stdc++.h>

using namespace std;

#define bit(i, x) (x >> i & 1)
#define ll long long
#define sz(x) (int)x.size()

const int N = 3e5 + 5;
const int mod = 998244353;

mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
ll rnd(ll l, ll r) {
    return uniform_int_distribution<ll>(l, r)(rng);
}

int n, m;
int o[N], p[N];
int k;
array<int, 3> q[N];

int res[N];
ll a[N];

signed main(int argc, char* argv[]) {
    ios_base::sync_with_stdio(0);
    cin.tie(0); cout.tie(0);

    cin >> n >> m;
    for(int i = 1; i <= m; i++) {
        cin >> o[i];
    }
    for(int i = 1; i <= n; i++) {
        cin >> p[i];
    }
    cin >> k;
    for(int i = 1; i <= k; i++) {
        int l, r, x; cin >> l >> r >> x;
        q[i] = {l, r, x};
    }

    for(int i = 1; i <= n; i++) res[i] = -1;
    for(int i = 1; i <= k; i++) {
        auto [l, r, x] = q[i];
        if(l <= r) {
            for(int j = l; j <= r; j++) {
                int u = o[j];
                if(a[u] < p[u]) {
                    a[u] += x;
                    if(a[u] >= p[u]) res[u] = i;
                }
            }
        }
        else {
            for(int j = l; j <= m; j++) {
                int u = o[j];
                if(a[u] < p[u]) {
                    a[u] += x;
                    if(a[u] >= p[u]) res[u] = i;
                }
            }
            for(int j = 1; j <= r; j++) {
                int u = o[j];
                if(a[u] < p[u]) {
                    a[u] += x;
                    if(a[u] >= p[u]) res[u] = i;
                }
            }
        }
    }
    for(int i = 1; i <= n; i++) {
        if(res[i] == -1) cout << "NIE";
        else cout << res[i];
        cout << "\n";
    }

    return 0 ^ 0;
}

컴파일 시 표준 에러 (stderr) 메시지

met.c:1:10: fatal error: bits/stdc++.h: No such file or directory
    1 | #include <bits/stdc++.h>
      |          ^~~~~~~~~~~~~~~
compilation terminated.