xylophone.cpp: In function 'bool check_permutation(int)':
xylophone.cpp:5:5: error: 'set' was not declared in this scope
5 | set<int> s;
| ^~~
xylophone.cpp:5:5: note: suggested alternatives:
In file included from /usr/include/c++/10/set:61,
from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:87,
from xylophone.cpp:2:
/usr/include/c++/10/bits/stl_set.h:94:11: note: 'std::set'
94 | class set
| ^~~
In file included from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:87,
from xylophone.cpp:2:
/usr/include/c++/10/set:78:13: note: 'std::pmr::set'
78 | using set = std::set<_Key, _Cmp, polymorphic_allocator<_Key>>;
| ^~~
xylophone.cpp:5:9: error: expected primary-expression before 'int'
5 | set<int> s;
| ^~~
xylophone.cpp:6:34: error: 's' was not declared in this scope
6 | for (int i = 1; i <= n; ++i) s.insert(a[i]);
| ^
xylophone.cpp:7:9: error: 's' was not declared in this scope
7 | if (s.size() != n) return false;
| ^
xylophone.cpp:8:11: error: 's' was not declared in this scope
8 | if (*(s.begin()) != 1) return false;
| ^
xylophone.cpp:9:14: error: 's' was not declared in this scope
9 | auto k = s.end();
| ^
xylophone.cpp: In function 'void build_permutation1(int)':
xylophone.cpp:27:12: error: 'min_element' was not declared in this scope; did you mean 'std::min_element'?
27 | int mi = *min_element(a+1, a+n+1) - 1;
| ^~~~~~~~~~~
| std::min_element
In file included from /usr/include/c++/10/algorithm:74,
from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:65,
from xylophone.cpp:2:
/usr/include/c++/10/pstl/glue_algorithm_defs.h:520:1: note: 'std::min_element' declared here
520 | min_element(_ExecutionPolicy&& __exec, _ForwardIterator __first, _ForwardIterator __last);
| ^~~~~~~~~~~
xylophone.cpp: In function 'void build_permutation2(int)':
xylophone.cpp:42:12: error: 'min_element' was not declared in this scope; did you mean 'std::min_element'?
42 | int mi = *min_element(a+1, a+n+1) - 1;
| ^~~~~~~~~~~
| std::min_element
In file included from /usr/include/c++/10/algorithm:74,
from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:65,
from xylophone.cpp:2:
/usr/include/c++/10/pstl/glue_algorithm_defs.h:520:1: note: 'std::min_element' declared here
520 | min_element(_ExecutionPolicy&& __exec, _ForwardIterator __first, _ForwardIterator __last);
| ^~~~~~~~~~~