Submission #748338

# Submission time Handle Problem Language Result Execution time Memory
748338 2023-05-26T06:59:02 Z Sharky Strange Device (APIO19_strange_device) C++17
Compilation error
0 ms 0 KB
#include <bits/stdc++.h>
using namespace std;

#define int long long

int32_t main() {
    ios::sync_with_stdio(0); cin.tie(0);
    int n, A, B, ans = 0;
    cin >> n >> A >> B;
    map<int, bool> mp;
    int mul = 3E18;
    if (3E18 / A >= B) mul = A * B;
    for (int i = 0; i < n; i++) {
        int l, r;
        cin >> l >> r;
        for (int j = l; j <= r; j++) mp[j % mul] = 1;
    }
    for (bool x : seen) ans += x;
    cout << ans << '\n';
    return 0;
}

Compilation message

strange_device.cpp: In function 'int32_t main()':
strange_device.cpp:18:19: error: 'seen' was not declared in this scope
   18 |     for (bool x : seen) ans += x;
      |                   ^~~~