제출 #748338

#제출 시각아이디문제언어결과실행 시간메모리
748338Sharky이상한 기계 (APIO19_strange_device)C++17
컴파일 에러
0 ms0 KiB
#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;
}

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

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;
      |                   ^~~~