sprinkler.cpp:7:2: warning: #warning That's not AS, that's my AS [-Wcpp]
7 | #warning That's not AS, that's my AS
| ^~~~~~~
sprinkler.cpp:102:18: error: 'int time [200001]' redeclared as different kind of entity
102 | int time[NMAX + 1];
| ^
In file included from /usr/include/pthread.h:23,
from /usr/include/x86_64-linux-gnu/c++/10/bits/gthr-default.h:35,
from /usr/include/x86_64-linux-gnu/c++/10/bits/gthr.h:148,
from /usr/include/c++/10/ext/atomicity.h:35,
from /usr/include/c++/10/bits/ios_base.h:39,
from /usr/include/c++/10/ios:42,
from /usr/include/c++/10/ostream:38,
from /usr/include/c++/10/iostream:39,
from sprinkler.cpp:1:
/usr/include/time.h:75:15: note: previous declaration 'time_t time(time_t*)'
75 | extern time_t time (time_t *__timer) __THROW;
| ^~~~
sprinkler.cpp: In function 'void bfs()':
sprinkler.cpp:111:11: warning: pointer to a function used in arithmetic [-Wpointer-arith]
111 | time[u] = ++timer;
| ^
sprinkler.cpp:111:13: error: assignment of read-only location '*(time + ((sizetype)u))'
111 | time[u] = ++timer;
| ~~~~~~~~^~~~~~~~~
sprinkler.cpp:114:18: warning: pointer to a function used in arithmetic [-Wpointer-arith]
114 | if (!time[v]) {
| ^
sprinkler.cpp: In function 'int main()':
sprinkler.cpp:151:23: warning: pointer to a function used in arithmetic [-Wpointer-arith]
151 | aint.update(time[i], time[i], h);
| ^
sprinkler.cpp:151:32: warning: pointer to a function used in arithmetic [-Wpointer-arith]
151 | aint.update(time[i], time[i], h);
| ^
sprinkler.cpp:151:23: error: invalid conversion from 'time_t (*)(time_t*) noexcept' {aka 'long int (*)(long int*) noexcept'} to 'int' [-fpermissive]
151 | aint.update(time[i], time[i], h);
| ~~~~~~^
| |
| time_t (*)(time_t*) noexcept {aka long int (*)(long int*) noexcept}
sprinkler.cpp:90:19: note: initializing argument 1 of 'void segtree::update(int, int, int)'
90 | void update(int l, int r, int v) {
| ~~~~^
sprinkler.cpp:151:32: error: invalid conversion from 'time_t (*)(time_t*) noexcept' {aka 'long int (*)(long int*) noexcept'} to 'int' [-fpermissive]
151 | aint.update(time[i], time[i], h);
| ~~~~~~^
| |
| time_t (*)(time_t*) noexcept {aka long int (*)(long int*) noexcept}
sprinkler.cpp:90:26: note: initializing argument 2 of 'void segtree::update(int, int, int)'
90 | void update(int l, int r, int v) {
| ~~~~^
sprinkler.cpp:164:25: warning: pointer to a function used in arithmetic [-Wpointer-arith]
164 | aint.update(time[u], time[u], h);
| ^
sprinkler.cpp:164:34: warning: pointer to a function used in arithmetic [-Wpointer-arith]
164 | aint.update(time[u], time[u], h);
| ^
sprinkler.cpp:164:25: error: invalid conversion from 'time_t (*)(time_t*) noexcept' {aka 'long int (*)(long int*) noexcept'} to 'int' [-fpermissive]
164 | aint.update(time[u], time[u], h);
| ~~~~~~^
| |
| time_t (*)(time_t*) noexcept {aka long int (*)(long int*) noexcept}
sprinkler.cpp:90:19: note: initializing argument 1 of 'void segtree::update(int, int, int)'
90 | void update(int l, int r, int v) {
| ~~~~^
sprinkler.cpp:164:34: error: invalid conversion from 'time_t (*)(time_t*) noexcept' {aka 'long int (*)(long int*) noexcept'} to 'int' [-fpermissive]
164 | aint.update(time[u], time[u], h);
| ~~~~~~^
| |
| time_t (*)(time_t*) noexcept {aka long int (*)(long int*) noexcept}
sprinkler.cpp:90:26: note: initializing argument 2 of 'void segtree::update(int, int, int)'
90 | void update(int l, int r, int v) {
| ~~~~^
sprinkler.cpp:167:31: warning: pointer to a function used in arithmetic [-Wpointer-arith]
167 | int l = time[g[u][0]];
| ^
sprinkler.cpp:167:31: error: invalid conversion from 'time_t (*)(time_t*) noexcept' {aka 'long int (*)(long int*) noexcept'} to 'int' [-fpermissive]
sprinkler.cpp:168:35: warning: pointer to a function used in arithmetic [-Wpointer-arith]
168 | int r = time[g[u].back()];
| ^
sprinkler.cpp:168:35: error: invalid conversion from 'time_t (*)(time_t*) noexcept' {aka 'long int (*)(long int*) noexcept'} to 'int' [-fpermissive]
sprinkler.cpp:173:29: warning: pointer to a function used in arithmetic [-Wpointer-arith]
173 | aint.update(time[v], time[v], h);
| ^
sprinkler.cpp:173:38: warning: pointer to a function used in arithmetic [-Wpointer-arith]
173 | aint.update(time[v], time[v], h);
| ^
sprinkler.cpp:173:29: error: invalid conversion from 'time_t (*)(time_t*) noexcept' {aka 'long int (*)(long int*) noexcept'} to 'int' [-fpermissive]
173 | aint.update(time[v], time[v], h);
| ~~~~~~^
| |
| time_t (*)(time_t*) noexcept {aka long int (*)(long int*) noexcept}
sprinkler.cpp:90:19: note: initializing argument 1 of 'void segtree::update(int, int, int)'
90 | void update(int l, int r, int v) {
| ~~~~^
sprinkler.cpp:173:38: error: invalid conversion from 'time_t (*)(time_t*) noexcept' {aka 'long int (*)(long int*) noexcept'} to 'int' [-fpermissive]
173 | aint.update(time[v], time[v], h);
| ~~~~~~^
| |
| time_t (*)(time_t*) noexcept {aka long int (*)(long int*) noexcept}
sprinkler.cpp:90:26: note: initializing argument 2 of 'void segtree::update(int, int, int)'
90 | void update(int l, int r, int v) {
| ~~~~^
sprinkler.cpp:179:37: warning: pointer to a function used in arithmetic [-Wpointer-arith]
179 | std::cout << aint.query(time[u]) << '\n';
| ^
sprinkler.cpp:179:37: error: invalid conversion from 'time_t (*)(time_t*) noexcept' {aka 'long int (*)(long int*) noexcept'} to 'int' [-fpermissive]
179 | std::cout << aint.query(time[u]) << '\n';
| ~~~~~~^
| |
| time_t (*)(time_t*) noexcept {aka long int (*)(long int*) noexcept}
sprinkler.cpp:94:17: note: initializing argument 1 of 'int segtree::query(int)'
94 | int query(int p) {
| ~~~~^