Problem potatosalad
User MintTea
Submission Time 2024-01-12 15:12:00
Score 0
Max Time N/A
Max Memory N/A

Compile Error

potatosalad.cpp: In function ‘int32_t main()’:
potatosalad.cpp:10:26: error: type/value mismatch at argument 2 in template parameter list for ‘template<class _Key, class _Compare, class _Alloc> class std::set’
10 | set<int, std::greater> c;
| ^
potatosalad.cpp:10:26: note: expected a type, got ‘greater’
potatosalad.cpp:12:11: error: request for member ‘insert’ in ‘c’, which is of non-class type ‘int’
12 | c.insert(1);
| ^~~~~~
potatosalad.cpp:16:22: error: request for member ‘rbegin’ in ‘c’, which is of non-class type ‘int’
16 | for (auto it = c.rbegin(); it != c.rend() && count < b; ++it, ++count) {
| ^~~~~~
potatosalad.cpp:16:40: error: request for member ‘rend’ in ‘c’, which is of non-class type ‘int’
16 | for (auto it = c.rbegin(); it != c.rend() && count < b; ++it, ++count) {
|