answer.code:5:30: error: ‘int select [100005]’ redeclared as different kind of entity
5 | int l[N], r[N],c[N], select[N];
| ^
In file included from /usr/include/x86_64-linux-gnu/sys/types.h:179,
from /usr/include/stdlib.h:394,
from /usr/include/c++/13/cstdlib:79,
from /usr/include/x86_64-linux-gnu/c++/13/bits/stdc++.h:42,
from answer.code:1:
/usr/include/x86_64-linux-gnu/sys/select.h:101:12: note: previous declaration ‘int select(int, fd_set*, fd_set*, fd_set*, timeval*)’
101 | extern int select (int __nfds, fd_set *__restrict __readfds,
| ^~~~~~
answer.code: In function ‘int solve()’:
answer.code:11:18: warning: pointer to a function used in arithmetic [-Wpointer-arith]
11 | select[i] = 0;
| ^
answer.code:11:20: error: assignment of read-only location ‘*(select + ((sizetype)i))’
11 | select[i] = 0;
| ~~~~~~~~~~^~~
answer.code:29:32: warning: pointer to a function used in arithmetic [-Wpointer-arith]
29 | int minn = select[j] | (1 << i);
| ^
answer.code:29:34: error: invalid operands of types ‘int(int, fd_set*, fd_set*, fd_set*, timeval*)’ and ‘int’ to binary ‘operator|’
29 | int minn = select[j] | (1 << i);
| ~~~~~~~~~ ^ ~~~~~~~~
| | |
| | int
| int(int, fd_set*, fd_set*, fd_set*, timeval*)
answer.code:30:32: warning: pointer to a function used in arithmetic [-Wpointer-arith]
30 | int maxx = select[j] | ((1 << i+1) - 1);
| ^
answer.code:30:34: error: invalid operands of types ‘int(int, fd_set*, fd_set*, fd_set*, timeval*)’ and ‘int’ to binary ‘operator|’
30 | int maxx = select[j] | ((1 << i+1) - 1);
| ~~~~~~~~~ ^ ~~~~~~~~~~~~~~~~
| | |
| | int
| int(int, fd_set*, fd_set*, fd_set*, timeval*)
answer.code:36:25: warning: pointer to a function used in arithmetic [-Wpointer-arith]
36 | select[j] |= 1 << i;
| ^
answer.code:36:27: error: invalid operands of types ‘int(int, fd_set*, fd_set*, fd_set*, timeval*)’ and ‘int’ to binary ‘operator|’
36 | select[j] |= 1 << i;
| ~~~~~~~~~~^~~~~~~~~
answer.code:36:27: note: in evaluation of ‘operator|=(int(int, struct fd_set*, struct fd_set*, struct fd_set*, struct timeval*), int)’
answer.code:41:36: warning: pointer to a function used in arithmetic [-Wpointer-arith]
41 | int minn = select[j] | (1 << i);
| ^
answer.code:41:38: error: invalid operands of types ‘int(int, fd_set*, fd_set*, fd_set*, timeval*)’ and ‘int’ to binary ‘operator|’
41 | int minn = select[j] | (1 << i);
| ~~~~~~~~~ ^ ~~~~~~~~
| | |
| | int
| int(int, fd_set*, fd_set*, fd_set*, timeval*)
answer.code:42:36: warning: pointer to a function used in arithmetic [-Wpointer-arith]
42 | int maxx = select[j] | ((1 << i+1) - 1);
| ^
answer.code:42:38: error: invalid operands of types ‘int(int, fd_set*, fd_set*, fd_set*, timeval*)’ and ‘int’ to binary ‘operator|’
42 | int maxx = select[j] | ((1 << i+1) - 1);
| ~~~~~~~~~ ^ ~~~~~~~~~~~~~~~~
| | |
| | int
| int(int, fd_set*, fd_set*, fd_set*, timeval*)
answer.code:44:33: warning: pointer to a function used in arithmetic [-Wpointer-arith]
44 | select[j] |= 1 << i;
| ^
answer.code:44:35: error: invalid operands of types ‘int(int, fd_set*, fd_set*, fd_set*, timeval*)’ and ‘int’ to binary ‘operator|’
44 | select[j] |= 1 << i;
| ~~~~~~~~~~^~~~~~~~~
answer.code:44:35: note: in evaluation of ‘operator|=(int(int, struct fd_set*, struct fd_set*, struct fd_set*, struct timeval*), int)’
answer.code:52:1: warning: no return statement in function returning non-void [-Wreturn-type]
52 | }
| ^