events.cpp:16:4: error: 'MAXN' was not declared in this scope
16 | }v[MAXN];
| ^~~~
events.cpp: In member function 'void query::scan(int)':
events.cpp:21:25: error: 'l' was not declared in this scope
21 | scanf("%d %d", &l, &r);
| ^
events.cpp:21:29: error: 'r' was not declared in this scope
21 | scanf("%d %d", &l, &r);
| ^
events.cpp:22:9: error: 'id' was not declared in this scope; did you mean '_id'?
22 | id = _id;
| ^~
| _id
events.cpp: In member function 'bool query::operator<(interval)':
events.cpp:25:12: error: 'r' was not declared in this scope
25 | if(r == x.r) return l < x.l;
| ^
events.cpp:25:29: error: 'l' was not declared in this scope
25 | if(r == x.r) return l < x.l;
| ^
events.cpp:26:16: error: 'r' was not declared in this scope
26 | return r < x.r;
| ^
events.cpp: At global scope:
events.cpp:28:4: error: 'MAXN' was not declared in this scope
28 | }v[MAXN];
| ^~~~
events.cpp: In function 'int main()':
events.cpp:33:9: error: 'v' was not declared in this scope
33 | v[i].scan(i);
| ^
events.cpp:36:10: error: 'v' was not declared in this scope
36 | sort(v + 1, v + 1 + n);
| ^
events.cpp:37:25: error: expected primary-expression before ')' token
37 | for(int i = 1; i <= )
| ^
events.cpp:37:24: error: expected ';' before ')' token
37 | for(int i = 1; i <= )
| ^~
| ;
events.cpp:38:1: error: expected primary-expression before '}' token
38 | }
| ^
events.cpp:31:10: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
31 | scanf("%d %d", &n, &q);
| ~~~~~^~~~~~~~~~~~~~~~~