cave.cpp:2:1: error: 'include' does not name a type
2 | include <caves.h>
| ^~~~~~~
cave.cpp:16:13: error: variable or field 'answer' declared void
16 | void answer(vector<int> s, vector<int> d){
| ^~~~~~
cave.cpp:16:13: error: 'vector' was not declared in this scope
cave.cpp:16:13: note: suggested alternatives:
In file included from /usr/include/c++/9/vector:67,
from /usr/include/c++/9/functional:62,
from /usr/include/c++/9/pstl/glue_algorithm_defs.h:13,
from /usr/include/c++/9/algorithm:71,
from /usr/include/x86_64-linux-gnu/c++/9/bits/stdc++.h:65,
from cave.cpp:1:
/usr/include/c++/9/bits/stl_vector.h:386:11: note: 'std::vector'
386 | class vector : protected _Vector_base<_Tp, _Alloc>
| ^~~~~~
In file included from /usr/include/c++/9/functional:62,
from /usr/include/c++/9/pstl/glue_algorithm_defs.h:13,
from /usr/include/c++/9/algorithm:71,
from /usr/include/x86_64-linux-gnu/c++/9/bits/stdc++.h:65,
from cave.cpp:1:
/usr/include/c++/9/vector:90:13: note: 'std::pmr::vector'
90 | using vector = std::vector<_Tp, polymorphic_allocator<_Tp>>;
| ^~~~~~
cave.cpp:16:20: error: expected primary-expression before 'int'
16 | void answer(vector<int> s, vector<int> d){
| ^~~
cave.cpp:16:28: error: 'vector' was not declared in this scope
16 | void answer(vector<int> s, vector<int> d){
| ^~~~~~
cave.cpp:16:28: note: suggested alternatives:
In file included from /usr/include/c++/9/vector:67,
from /usr/include/c++/9/functional:62,
from /usr/include/c++/9/pstl/glue_algorithm_defs.h:13,
from /usr/include/c++/9/algorithm:71,
from /usr/include/x86_64-linux-gnu/c++/9/bits/stdc++.h:65,
from cave.cpp:1:
/usr/include/c++/9/bits/stl_vector.h:386:11: note: 'std::vector'
386 | class vector : protected _Vector_base<_Tp, _Alloc>
| ^~~~~~
In file included from /usr/include/c++/9/functional:62,
from /usr/include/c++/9/pstl/glue_algorithm_defs.h:13,
from /usr/include/c++/9/algorithm:71,
from /usr/include/x86_64-linux-gnu/c++/9/bits/stdc++.h:65,
from cave.cpp:1:
/usr/include/c++/9/vector:90:13: note: 'std::pmr::vector'
90 | using vector = std::vector<_Tp, polymorphic_allocator<_Tp>>;
| ^~~~~~
cave.cpp:16:35: error: expected primary-expression before 'int'
16 | void answer(vector<int> s, vector<int> d){
| ^~~
cave.cpp: In function 'void exploreCave(int)':
cave.cpp:21:5: error: 'vector' was not declared in this scope
21 | vector<int> cur(n,0), done(n,0), ans(n,0), ans2(n, 0);
| ^~~~~~
cave.cpp:21:5: note: suggested alternatives:
In file included from /usr/include/c++/9/vector:67,
from /usr/include/c++/9/functional:62,
from /usr/include/c++/9/pstl/glue_algorithm_defs.h:13,
from /usr/include/c++/9/algorithm:71,
from /usr/include/x86_64-linux-gnu/c++/9/bits/stdc++.h:65,
from cave.cpp:1:
/usr/include/c++/9/bits/stl_vector.h:386:11: note: 'std::vector'
386 | class vector : protected _Vector_base<_Tp, _Alloc>
| ^~~~~~
In file included from /usr/include/c++/9/functional:62,
from /usr/include/c++/9/pstl/glue_algorithm_defs.h:13,
from /usr/include/c++/9/algorithm:71,
from /usr/include/x86_64-linux-gnu/c++/9/bits/stdc++.h:65,
from cave.cpp:1:
/usr/include/c++/9/vector:90:13: note: 'std::pmr::vector'
90 | using vector = std::vector<_Tp, polymorphic_allocator<_Tp>>;
| ^~~~~~
cave.cpp:21:12: error: expected primary-expression before 'int'
21 | vector<int> cur(n,0), done(n,0), ans(n,0), ans2(n, 0);
| ^~~
cave.cpp:23:16: error: expected primary-expression before 'int'
23 | vector<int> mirror = cur;
| ^~~
cave.cpp:24:27: error: 'mirror' was not declared in this scope; did you mean 'perror'?
24 | if(tryCombination(mirror) == i){
| ^~~~~~
| perror
cave.cpp:24:12: error: 'tryCombination' was not declared in this scope
24 | if(tryCombination(mirror) == i){
| ^~~~~~~~~~~~~~
cave.cpp:26:21: error: 'done' was not declared in this scope
26 | if(!done[j])
| ^~~~
cave.cpp:27:21: error: 'cur' was not declared in this scope
27 | cur[j] ^=1;
| ^~~
cave.cpp:30:9: error: 'mirror' was not declared in this scope; did you mean 'perror'?
30 | mirror = cur;
| ^~~~~~
| perror
cave.cpp:30:18: error: 'cur' was not declared in this scope
30 | mirror = cur;
| ^~~
cave.cpp:35:21: error: 'done' was not declared in this scope
35 | if(!done[j])
| ^~~~
cave.cpp:39:21: error: 'tryCombination' was not declared in this scope
39 | int x = tryCombination(mirror);
| ^~~~~~~~~~~~~~
cave.cpp:62:9: error: 'done' was not declared in this scope
62 | done[lo] = 1;
| ^~~~
cave.cpp:63:9: error: 'ans' was not declared in this scope; did you mean 'abs'?
63 | ans[lo] = i;
| ^~~
| abs
cave.cpp:64:9: error: 'ans2' was not declared in this scope
64 | ans2[lo] = cur[lo];
| ^~~~
cave.cpp:70:12: error: 'ans2' was not declared in this scope
70 | answer(ans2, ans);
| ^~~~
cave.cpp:70:18: error: 'ans' was not declared in this scope; did you mean 'abs'?
70 | answer(ans2, ans);
| ^~~
| abs
cave.cpp:70:5: error: 'answer' was not declared in this scope
70 | answer(ans2, ans);
| ^~~~~~