Language: C++

#include <algorithm>
#include <iostream>
#include <map>
#include <cstdio>
inline int getInt(){ int s; scanf("%d", &s); return s

#define REP(i,n) for(int i=0; i<(int)(n); i++)

#include <queue>
#include <set>
#include <stack>
using namespace std;

struct Number{
  vector<int> cand;
  Number(int s, int e){
    for(int i = s; i <= e; i++)
      cand.push_back(i);
  }
  Number(int n){
    cand.push_back(n);
  }
  Number(){}
};

Number operator + (const Number &lhs, const Number &r
  Number ret;
  REP(i,lhs.cand.size()) REP(j,rhs.cand.size()){
    ret.cand.push_back((lhs.cand[i] + rhs.cand[j]) %
    sort(ret.cand.begin(), ret.cand.end());
    ret.cand.erase(unique(ret.cand.begin(), ret.cand.
  }
  return ret;
}

Number operator - (const Number &lhs, const Number &r
  Number ret;
  REP(i,lhs.cand.size()) REP(j,rhs.cand.size()){
    ret.cand.push_back((lhs.cand[i] - rhs.cand[j] + 2
    sort(ret.cand.begin(), ret.cand.end());
    ret.cand.erase(unique(ret.cand.begin(), ret.cand.
  }
  return ret;
}

Number operator * (const Number &lhs, const Number &r
  Number ret;
  REP(i,lhs.cand.size()) REP(j,rhs.cand.size()){
    ret.cand.push_back((lhs.cand[i] * rhs.cand[j]) %
    sort(ret.cand.begin(), ret.cand.end());
    ret.cand.erase(unique(ret.cand.begin(), ret.cand.
  }
  return ret;
}

Number operator / (const Number &lhs, const Number &r
  Number ret;
  REP(i,lhs.cand.size()) REP(j,rhs.cand.size()){
    if(rhs.cand[j] == 0) throw 0;
    ret.cand.push_back((lhs.cand[i] / rhs.cand[j]) %
    sort(ret.cand.begin(), ret.cand.end());
    ret.cand.erase(unique(ret.cand.begin(), ret.cand.
  }
  return ret;
}

int main(){
  stack<Number> st;
  const int m = getInt();
  map<string, Number> v;

  REP(i,m){
    char buff[256];
    int lb, ub;
    scanf("%s%d%d", buff, &lb, &ub);
    v[buff] = Number(lb, ub);
  }

  const int n = getInt();

  try{
    REP(i,n){
      char buff[256];
      scanf("%s", buff);
      if(v.count(buff)){
        st.push(v[buff]);
      }else if(!isdigit(*buff)){
        const Number rhs = st.top(); st.pop();
        const Number lhs = st.top(); st.pop();
        switch(*buff){
        case '+': st.push(lhs + rhs); break;
        case '-': st.push(lhs - rhs); break;
        case '*': st.push(lhs * rhs); break;
        case '/': st.push(lhs / rhs); break;
        }
      }else{
        int d; sscanf(buff, "%d", &d);
        st.push(d);
      }
    }
    puts("correct");
  }catch(int e){
    puts("error");
  }

  return 0;
}

Compiler output:
a.cc: In function 'int getInt()':
a.cc:5:54: error: expected ';' before 'namespace'
    5 | inline int getInt(){ int s; scanf("%d", &s); return s
      |                                                      ^
      |                                                      ;
In file included from /usr/include/c++/14/bits/stl_algobase.h:59,
                 from /usr/include/c++/14/algorithm:60,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_uninitialized.h:70:15: error: expected '=' before '__attribute__'
   70 | namespace std _GLIBCXX_VISIBILITY(default)
      |               ^~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/bits/stl_uninitialized.h:70:15: error: expected identifier before '__attribute__'
In file included from /usr/include/c++/14/deque:65,
                 from /usr/include/c++/14/queue:62,
                 from a.cc:9:
/usr/include/c++/14/bits/stl_uninitialized.h:70:14: error: expected ';' before '__attribute__'
   70 | namespace std _GLIBCXX_VISIBILITY(default)
      |              ^
      |              ;
/usr/include/c++/14/bits/stl_uninitialized.h:71:1: error: expected primary-expression before '{' token
   71 | {
      | ^
/usr/include/c++/14/bits/stl_deque.h:72:15: error: expected '=' before '__attribute__'
   72 | namespace std _GLIBCXX_VISIBILITY(default)
      |               ^~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/bits/stl_deque.h:72:15: error: expected identifier before '__attribute__'
In file included from /usr/include/c++/14/deque:66:
/usr/include/c++/14/bits/stl_deque.h:72:14: error: expected ';' before '__attribute__'
   72 | namespace std _GLIBCXX_VISIBILITY(default)
      |              ^
      |              ;
/usr/include/c++/14/bits/stl_deque.h:73:1: error: expected primary-expression before '{' token
   73 | {
      | ^
/usr/include/c++/14/bits/deque.tcc:61:15: error: expected '=' before '__attribute__'
   61 | namespace std _GLIBCXX_VISIBILITY(default)
      |               ^~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/bits/deque.tcc:61:15: error: expected identifier before '__attribute__'
In file included from /usr/include/c++/14/deque:69:
/usr/include/c++/14/bits/deque.tcc:61:14: error: expected ';' before '__attribute__'
   61 | namespace std _GLIBCXX_VISIBILITY(default)
      |              ^
      |              ;
/usr/include/c++/14/bits/deque.tcc:62:1: error: expected primary-expression before '{' token
   62 | {
      | ^
/usr/include/c++/14/deque:82:15: error: expected '=' before '__attribute__'
   82 | namespace std _GLIBCXX_VISIBILITY(default)
      |               ^~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/deque:82:15: error: expected identifier before '__attribute__'
/usr/include/c++/14/deque:82:14: error: expected ';' before '__attribute__'
   82 | namespace std _GLIBCXX_VISIBILITY(default)
      |              ^
      |              ;
/usr/include/c++/14/deque:83:1: error: expected primary-expression before '{' token
   83 | {
      | ^
/usr/include/c++/14/bits/stl_vector.h:77:15: error: expected '=' before '__attribute__'
   77 | namespace std _GLIBCXX_VISIBILITY(default)
      |               ^~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/bits/stl_vector.h:77:15: error: expected identifier before '__attribute__'
In file included from /usr/include/c++/14/vector:66,
                 from /usr/include/c++/14/queue:63:
/usr/include/c++/14/bits/stl_vector.h:77:14: error: expected ';' before '__attribute__'
   77 | namespace std _GLIBCXX_VISIBILITY(default)
      |              ^
      |              ;
/usr/include/c++/14/bits/stl_vector.h:78:1: error: expected primary-expression before '{' token
   78 | {
      | ^
/usr/include/c++/14/bits/stl_bvector.h:68:15: error: expected '=' before '__attribute__'
   68 | namespace std _GLIBCXX_VISIBILITY(default)
      |               ^~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/bits/stl_bvector.h:68:15: error: expected identifier before '__attribute__'
In file included from /usr/include/c++/14/vector:67:
/usr/include/c++/14/bits/stl_bvector.h:68:14: error: expected ';' before '__attribute__'
   68 | namespace std _GLIBCXX_VISIBILITY(default)
      |              ^
      |              ;
/usr/include/c++/14/bits/stl_bvector.h:69:1: error: expected primary-expression before '{' token
   69 | {
      | ^
/usr/include/c++/14/bits/vector.tcc:59:15: error: expected '=' before '__attribute__'
   59 | namespace std _GLIBCXX_VISIBILITY(default)
      |               ^~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/bits/vector.tcc:59:15: error: expected identifier before '__attribute__'
In file included from /usr/include/c++/14/vector:72:
/usr/include/c++/14/bits/vector.tcc:59:14: error: expected ';' before '__attribute__'
   59 | namespace std _GLIBCXX_VISIBILITY(default)
      |              ^
      |              ;
/usr/include/c++/14/bits/vector.tcc:60:1: error: expected primary-expression before '{' token
   60 | {
      | ^
/usr/include/c++/14/bits/vector.tcc:1218:15: error: expected '=' before '__attribute__'
 1218 | namespace std _GLIBCXX_VISIBILITY(default)
      |               ^~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/bits/vector.tcc:1218:15: error: expected identifier before '__attribute__'
/usr/include/c++/14/bits/vector.tcc:1218:14: error: expected ';' before '__attribute__'
 1218 | namespace std _GLIBCXX_VISIBILITY(default)
      |              ^
      |              ;
/usr/include/c++/14/bits/vector.tcc:1219:1: error: expected primary-expression before '{' token
 1219 | {
      | ^
/usr/include/c++/14/vector:88:15: error: expected '=' before '__attribute__'
   88 | namespace std _GLIBCXX_VISIBILITY(default)
      |               ^~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/vector:88:15: error: expected identifier before '__attribute__'
/usr/include/c++/14/vector:88:14: error: expected ';' before '__attribute__'
   88 | namespace std _GLIBCXX_VISIBILITY(default)
      |              ^
      |              ;
/usr/include/c++/14/vector:89:1: error: expected primary-expression before '{' token
   89 | {
      | ^
/usr/include/c++/14/bits/stl_queue.h:65:15: error: expected '=' before '__attribute__'
   65 | namespace std _GLIBCXX_VISIBILITY(default)
      |               ^~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/bits/stl_queue.h:65:15: error: expected identifier before '__attribute__'
In file included from /usr/include/c++/14/queue:66:
/usr/include/c++/14/bits/stl_queue.h:65:14: error: expected ';' before '__attribute__'
   65 | namespace std _GLIBCXX_VISIBILITY(default)
      |              ^
      |              ;
/usr/include/c++/14/bits/stl_queue.h:66:1: error: expected primary-expression before '{' token
   66 | {
      | ^
/usr/include/c++/14/bits/stl_set.h:64:15: error: expected '=' before '__attribute__'
   64 | namespace std _GLIBCXX_VISIBILITY(default)
      |               ^~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/bits/stl_set.h:64:15: error: expected identifier before '__attribute__'
In file included from /usr/include/c++/14/set:63,
                 from a.cc:10:
/usr/include/c++/14/bits/stl_set.h:64:14: error: expected ';' before '__attribute__'
   64 | namespace std _GLIBCXX_VISIBILITY(default)
      |              ^
      |              ;
/usr/include/c++/14/bits/stl_set.h:65:1: error: expected primary-expression before '{' token
   65 | {
      | ^
/usr/include/c++/14/bits/stl_multiset.h:64:15: error: expected '=' before '__attribute__'
   64 | namespace std _GLIBCXX_VISIBILITY(default)
      |               ^~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/bits/stl_multiset.h:64:15: error: expected identifier before '__attribute__'
In file included from /usr/include/c++/14/set:64:
/usr/include/c++/14/bits/stl_multiset.h:64:14: error: expected ';' before '__attribute__'
   64 | namespace std _GLIBCXX_VISIBILITY(default)
      |              ^
      |              ;
/usr/include/c++/14/bits/stl_multiset.h:65:1: error: expected primary-expression before '{' token
   65 | {
      | ^
/usr/include/c++/14/set:81:15: error: expected '=' before '__attribute__'
   81 | namespace std _GLIBCXX_VISIBILITY(default)
      |               ^~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/set:81:15: error: expected identifier before '__attribute__'
/usr/include/c++/14/set:81:14: error: expected ';' before '__attribute__'
   81 | namespace std _GLIBCXX_VISIBILITY(default)
      |              ^
      |              ;
/usr/include/c++/14/set:82:1: error: expected primary-expression before '{' token
   82 | {
      | ^
/usr/include/c++/14/bits/stl_stack.h:65:15: error: expected '=' before '__attribute__'
   65 | namespace std _GLIBCXX_VISIBILITY(default)
      |               ^~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/bits/stl_stack.h:65:15: error: expected identifier before '__attribute__'
In file included from /usr/include/c++/14/stack:63,
                 from a.cc:11:
/usr/include/c++/14/bits/stl_stack.h:65:14: error: expected ';' before '__attribute__'
   65 | namespace std _GLIBCXX_VISIBILITY(default)
      |              ^
      |              ;
/usr/include/c++/14/bits/stl_stack.h:66:1: error: expected primary-expression before '{' token
   66 | {
      | ^
a.cc:15:3: error: 'vector' does not name a type
   15 |   vector<int> cand;
      |   ^~~~~~
a.cc: In constructor 'getInt()::Number::Number(int, int)':
a.cc:18:7: error: 'cand' was not declared in this scope; did you mean 'rand'?
   18 |       cand.push_back(i);
      |       ^~~~
      |       rand
a.cc: In constructor 'getInt()::Number::Number(int)':
a.cc:21:5: error: 'cand' was not declared in this scope; did you mean 'rand'?
   21 |     cand.push_back(n);
      |     ^~~~
      |     rand
a.cc: In function 'int getInt()':
a.cc:27:3: error: expected ',' or '...' before 'Number'
   27 |   Number ret;
      |   ^~~~~~
a.cc:27:13: error: expected ')' before ';' token
   27 |   Number ret;
      |             ^
      |             )
a.cc:26:19: note: to match this '('
   26 | Number operator + (const Number &lhs, const Number &r
      |                   ^
a.cc:28:9: error: 'lhs' was not declared in this scope
   28 |   REP(i,lhs.cand.size()) REP(j,rhs.cand.size()){
      |         ^~~
a.cc:7:39: note: in definition of macro 'REP'
    7 | #define REP(i,n) for(int i=0; i<(int)(n); i++)
      |                                       ^
a.cc:28:32: error: 'rhs' wa