elephants.cpp:61:11: error: 'int query()' redeclared as different kind of entity
61 | int query(){
| ^
elephants.cpp:11:54: note: previous declaration 'int query'
11 | int n, L, x[MAX], block[MAX], T, dist[MAX], dp[MAX], query;
| ^~~~~
elephants.cpp: In function 'int query()':
elephants.cpp:64:36: error: 't' was not declared in this scope
64 | for(int i = 0; i <= (n - 1) / T, t = -1; i++){
| ^
elephants.cpp:71:21: error: no match for 'operator[]' (operand types are 'int [1015]' and 'std::vector<int>')
71 | int curPos = x[blocks[i]][m];
| ^
elephants.cpp: In function 'int update(int, int)':
elephants.cpp:91:23: error: 'begin' was not declared in this scope
91 | for(auto x : block[i]){
| ^
elephants.cpp:91:23: note: suggested alternatives:
In file included from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:95,
from elephants.cpp:2:
/usr/include/c++/10/valarray:1224:5: note: 'std::begin'
1224 | begin(const valarray<_Tp>& __va)
| ^~~~~
In file included from /usr/include/c++/10/filesystem:46,
from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:129,
from elephants.cpp:2:
/usr/include/c++/10/bits/fs_dir.h:549:3: note: 'std::filesystem::__cxx11::begin'
549 | begin(recursive_directory_iterator __iter) noexcept
| ^~~~~
elephants.cpp:91:23: error: 'end' was not declared in this scope
91 | for(auto x : block[i]){
| ^
elephants.cpp:91:23: note: suggested alternatives:
In file included from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:95,
from elephants.cpp:2:
/usr/include/c++/10/valarray:1244:5: note: 'std::end'
1244 | end(const valarray<_Tp>& __va)
| ^~~
In file included from /usr/include/c++/10/filesystem:46,
from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:129,
from elephants.cpp:2:
/usr/include/c++/10/bits/fs_dir.h:554:3: note: 'std::filesystem::__cxx11::end'
554 | end(recursive_directory_iterator) noexcept
| ^~~
elephants.cpp:116:16: error: 'query' cannot be used as a function
116 | return query();
| ^