Main.cpp:25:5: error: 'int brk' redeclared as different kind of entity
25 | int brk = 0;
| ^~~
In file included from /usr/include/x86_64-linux-gnu/bits/sigstksz.h:24,
from /usr/include/signal.h:328,
from /usr/include/c++/11/csignal:42,
from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:43,
from Main.cpp:1:
/usr/include/unistd.h:1070:12: note: previous declaration 'int brk(void*)'
1070 | extern int brk (void *__addr) __THROW __wur;
| ^~~
Main.cpp: In function 'void push(int, int)':
Main.cpp:29:8: error: invalid types 'std::pair<int, int> [1500005][int(void*) noexcept]' for array subscript
29 | stk[brk].first = f;
| ^
Main.cpp:30:8: error: invalid types 'std::pair<int, int> [1500005][int(void*) noexcept]' for array subscript
30 | stk[brk].second = s;
| ^
Main.cpp:31:5: warning: ISO C++ forbids incrementing a pointer of type 'int (*)(void*) noexcept' [-Wpointer-arith]
31 | brk++;
| ^~~
Main.cpp:31:5: error: lvalue required as increment operand
Main.cpp: In lambda function:
Main.cpp:41:13: error: assignment of function 'int brk(void*)'
41 | brk = 0;
| ~~~~^~~
Main.cpp:53:23: error: invalid operands of types 'std::pair<int, int> [1500005]' and 'int(void*) noexcept' to binary 'operator+'
53 | sort(stk, stk + brk);
| ~~~ ^ ~~~
| | |
| | int(void*) noexcept
| std::pair<int, int> [1500005]
Main.cpp:54:26: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
54 | for(int i = 0; i < brk; i++)
| ~~^~~~~