Submission #1365988

#TimeUsernameProblemLanguageResultExecution timeMemory
1365988iamhereforfunWorst Reporter 3 (JOI18_worst_reporter3)C++20
Compilation error
0 ms0 KiB
// Starcraft 2 enjoyer //

#include <bits/stdc++.h>

// #pragma GCC target("avx2")
// #pragma GCC optimize("O3")
// #pragma GCC optimize("unroll-loops")

using namespace std;

#define LSOne(X) ((X) & -(X))
#define int long long

const int N = 5e5 + 5;
const int M = 11;
const int B = 18;
const long long K = 2;
const int LG = 20;
const long long INF = 1e18 + 5;
const int P = 31;
const int MOD = 998244353;
const int nx[] = {0, 1, 0, -1}, ny[] = {-1, 0, 1, 0};

int n, q;
long long a[N];
vector<long long> val;

inline void solve()
{
    cin >> n >> q;
    for (int x = 1; x <= n; x++)
    {
        cin >> a[x];
    }
    val.push_back(1);
    for (int x = 1; x <= n; x++)
    {
        long long i = val.back();
        val.push_back(i * ((a[x] - 1) / i + 1));
    }
    reverse(val.begin(), val.end());
    for (int x = 0; x < q; x++)
    {
        int t, l, r, ans = 0;
        cin >> t >> l >> r;
        cout << max(0LL, (min(t, r) - max(t - n, l) + 1)) << "\n";
    }
}

signed main()
{=
    ios_base::sync_with_stdio(0);
    cin.tie(0);
    cout.tie(0);
    int t = 1;
    // cin >> t;
    for (int x = 1; x <= t; x++)
    {
        solve();
    }
    return 0;
}

Compilation message (stderr)

worst_reporter3.cpp: In function 'int main()':
worst_reporter3.cpp:51:2: error: expected primary-expression before '=' token
   51 | {=
      |  ^