events.cpp:5:22: warning: extra tokens at end of #include directive
5 | #include <algorithm> a#include <cstdio>
| ^
events.cpp:139:11: error: redefinition of 'const int LOG'
139 | const int LOG = 18;
| ^~~
events.cpp:21:11: note: 'const int LOG' previously defined here
21 | const int LOG = 18;
| ^~~
events.cpp:140:11: error: redefinition of 'const int OFF'
140 | const int OFF = 1 << LOG;
| ^~~
events.cpp:22:11: note: 'const int OFF' previously defined here
22 | const int OFF = 1 << LOG;
| ^~~
events.cpp:142:5: error: redefinition of 'int n'
142 | int n, t;
| ^
events.cpp:24:5: note: 'int n' previously declared here
24 | int n, t;
| ^
events.cpp:142:8: error: redefinition of 'int t'
142 | int n, t;
| ^
events.cpp:24:8: note: 'int t' previously declared here
24 | int n, t;
| ^
events.cpp:143:5: error: redefinition of 'int S [262144]'
143 | int S[OFF], E[OFF], up[OFF][LOG], T[2 * OFF];
| ^
events.cpp:25:5: note: 'int S [262144]' previously declared here
25 | int S[OFF], E[OFF], up[OFF][LOG], T[2 * OFF];
| ^
events.cpp:143:13: error: redefinition of 'int E [262144]'
143 | int S[OFF], E[OFF], up[OFF][LOG], T[2 * OFF];
| ^
events.cpp:25:13: note: 'int E [262144]' previously declared here
25 | int S[OFF], E[OFF], up[OFF][LOG], T[2 * OFF];
| ^
events.cpp:143:21: error: redefinition of 'int up [262144][18]'
143 | int S[OFF], E[OFF], up[OFF][LOG], T[2 * OFF];
| ^~
events.cpp:25:21: note: 'int up [262144][18]' previously declared here
25 | int S[OFF], E[OFF], up[OFF][LOG], T[2 * OFF];
| ^~
events.cpp:143:35: error: redefinition of 'int T [524288]'
143 | int S[OFF], E[OFF], up[OFF][LOG], T[2 * OFF];
| ^
events.cpp:25:35: note: 'int T [524288]' previously declared here
25 | int S[OFF], E[OFF], up[OFF][LOG], T[2 * OFF];
| ^
events.cpp:145:13: error: redefinition of 'std::vector<int> vri'
145 | vector<int> vri, sweep;
| ^~~
events.cpp:27:13: note: 'std::vector<int> vri' previously declared here
27 | vector<int> vri, sweep;
| ^~~
events.cpp:145:18: error: redefinition of 'std::vector<int> sweep'
145 | vector<int> vri, sweep;
| ^~~~~
events.cpp:27:18: note: 'std::vector<int> sweep' previously declared here
27 | vector<int> vri, sweep;
| ^~~~~
events.cpp:146:15: error: redefinition of 'std::map<int, int> mp'
146 | map<int, int> mp;
| ^~
events.cpp:28:15: note: 'std::map<int, int> mp' previously declared here
28 | map<int, int> mp;
| ^~
events.cpp:148:5: error: redefinition of 'int merge(int, int)'
148 | int merge(int a, int b) {
| ^~~~~
events.cpp:30:5: note: 'int merge(int, int)' previously defined here
30 | int merge(int a, int b) {
| ^~~~~
events.cpp:153:6: error: redefinition of 'void update(int, int)'
153 | void update(int a, int val) {
| ^~~~~~
events.cpp:35:6: note: 'void update(int, int)' previously defined here
35 | void update(int a, int val) {
| ^~~~~~
events.cpp:163:5: error: redefinition of 'int query(int, int, int, int, int)'
163 | int query(int l, int r, int lo = 0, int hi = OFF, int x = 1) {
| ^~~~~
events.cpp:45:5: note: 'int query(int, int, int, int, int)' previously defined here
45 | int query(int l, int r, int lo = 0, int hi = OFF, int x = 1) {
| ^~~~~
events.cpp:170:6: error: redefinition of 'bool comp(int, int)'
170 | bool comp(int a, int b) {
| ^~~~
events.cpp:52:6: note: 'bool comp(int, int)' previously defined here
52 | bool comp(int a, int b) {
| ^~~~
events.cpp:174:5: error: redefinition of 'pii climb(int, int)'
174 | pii climb(int a, int b) {
| ^~~~~
events.cpp:56:5: note: 'pii climb(int, int)' previously defined here
56 | pii climb(int a, int b) {
| ^~~~~
events.cpp:190:5: error: redefinition of 'int main()'
190 | int main() {
| ^~~~
events.cpp:72:5: note: 'int main()' previously defined here
72 | int main() {
| ^~~~
events.cpp: In function 'int main()':
events.cpp:76:7: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
76 | scanf("%d%d", &n, &t);
| ~~~~~^~~~~~~~~~~~~~~~
events.cpp:78:8: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
78 | scanf("%d%d", S + i, E + i);
| ~~~~~^~~~~~~~~~~~~~~~~~~~~~
events.cpp:111:8: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
111 | scanf("%d%d", &s, &e);
| ~~~~~^~~~~~~~~~~~~~~~
events.cpp: In function 'int main()':
events.cpp:194:7: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
194 | scanf("%d%d", &n, &t);
| ~~~~~^~~~~~~~~~~~~~~~
events.cpp:196:8: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
196 | scanf("%d%d", S + i, E + i);
| ~~~~~^~~~~~~~~~~~~~~~~~~~~~
events.cpp:229:8: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
229 | scanf("%d%d", &s, &e);
| ~~~~~^~~~~~~~~~~~~~~~