doll.cpp:62:13: error: 'std::vector<long long int> time' redeclared as different kind of entity
62 | vector<int> time;
| ^~~~
In file included from /usr/include/c++/10/ctime:42,
from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:49,
from doll.cpp:2:
/usr/include/time.h:75:15: note: previous declaration 'time_t time(time_t*)'
75 | extern time_t time (time_t *__timer) __THROW;
| ^~~~
doll.cpp: In function 'void create_circuit(int, std::vector<int>)':
doll.cpp:76:9: error: assignment of function 'time_t time(time_t*)'
76 | time=vector<int>(MAXN,-1);
| ~~~~^~~~~~~~~~~~~~~~~~~~~
doll.cpp:78:15: warning: pointer to a function used in arithmetic [-Wpointer-arith]
78 | time[i] = timer(i);
| ^
doll.cpp:78:17: error: assignment of read-only location '*(time + ((sizetype)i))'
78 | time[i] = timer(i);
| ~~~~~~~~^~~~~~~~~~
doll.cpp: In lambda function:
doll.cpp:100:22: warning: pointer to a function used in arithmetic [-Wpointer-arith]
100 | return time[a]<time[b];
| ^
doll.cpp:100:30: warning: pointer to a function used in arithmetic [-Wpointer-arith]
100 | return time[a]<time[b];
| ^
In file included from /usr/include/c++/10/cassert:44,
from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:33,
from doll.cpp:2:
doll.cpp: In function 'void create_circuit(int, std::vector<int>)':
doll.cpp:107:24: warning: comparison of integer expressions of different signedness: 'std::vector<long long int>::size_type' {aka 'long unsigned int'} and 'long long int' [-Wsign-compare]
107 | assert(elems.size()==N);
| ~~~~~~~~~~~~^~~
doll.cpp:108:20: warning: comparison of integer expressions of different signedness: 'long long int' and 'std::vector<long long int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
108 | for (int i=0; i<elems.size(); i++) {
| ~^~~~~~~~~~~~~
doll.cpp:116:20: warning: comparison of integer expressions of different signedness: 'long long int' and 'std::vector<long long int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
116 | for (int i=0; i<C.size(); i++) {
| ~^~~~~~~~~