Submission #1297385

#TimeUsernameProblemLanguageResultExecution timeMemory
1297385buiphucan2008Cultivation (JOI17_cultivation)C++20
Compilation error
0 ms0 KiB
#include <bits/stdc++.h>
using namespace std;
#define NAME "SIMULANTS"
#define int long long
#define pii pair < int , int >
#define piii pair < int , pii >
#define fi first
#define se second
const int N = 1e6 + 3;

int n, m, L, nQuery;
piii q[N];
pii a[N], b[N];
void solve() {
    int cnt = 0;
    int j = 1;
    for (int i = 1; i <= n; i++) {
        while (a[i].fi - b[j].fi > L && j <= m) j++;
        while ()
    }
}
signed main() {
    ios_base::sync_with_stdio(0);
    cin.tie(0); cout.tie(0);
    // freopen(NAME".inp","r",stdin);
    // freopen(NAME".out","w",stdout);

    cin >> nQuery >> L;
    for (int k = 1; k <= nQuery; k++) {
        int type, x, num;
        cin >> type >> x >> num;
        if (type == 1) n++;
        if (type == 2) m++;
        q[k] = {type, {x, num}};
        int cnta = 0;
        int cntb = 0;
        for (int i = 1; i <= k; i++) {
            if (q[i].fi == 1) a[++cnta] = q[i].se;
            else b[++cntb] = q[i].se;
        }
    }
}

Compilation message (stderr)

cultivation.cpp: In function 'void solve()':
cultivation.cpp:19:16: error: expected primary-expression before ')' token
   19 |         while ()
      |                ^
cultivation.cpp:20:5: error: expected primary-expression before '}' token
   20 |     }
      |     ^