gondola.cpp: In function 'int valid(int, int*)':
gondola.cpp:6:3: error: 'set' was not declared in this scope
set<int> used;
^~~
gondola.cpp:6:3: note: suggested alternative:
In file included from /usr/include/c++/7/set:61:0,
from /usr/include/x86_64-linux-gnu/c++/7/bits/stdc++.h:87,
from gondola.cpp:2:
/usr/include/c++/7/bits/stl_set.h:93:11: note: 'std::set'
class set
^~~
gondola.cpp:6:7: error: expected primary-expression before 'int'
set<int> used;
^~~
gondola.cpp:24:9: error: 'used' was not declared in this scope
if (used.count(inputSeq[i])) {
^~~~
gondola.cpp:27:5: error: 'used' was not declared in this scope
used.insert(inputSeq[i]);
^~~~