| Problem | GSS |
|---|---|
| User | R9q5P8 |
| Submission Time | 2025-11-18 13:13:14 |
| Score | 0 |
| Max Time | N/A |
| Max Memory | N/A |
Owl Get a Life
GSS.cpp: In function ‘int main()’:
GSS.cpp:21:2: error: expected ‘,’ or ‘;’ before ‘for’
21 | for (int i = 0; i < costs.size()/4; ++i)
| ^~~
GSS.cpp:21:18: error: ‘i’ was not declared in this scope
21 | for (int i = 0; i < costs.size()/4; ++i)
| ^
GSS.cpp:29:22: error: invalid use of non-static member function ‘std::multiset<_Key, _Compare, _Alloc>::iterator std::multiset<_Key, _Compare, _Alloc>::begin() const [with _Key = int; _Compare = std::less<int>; _Alloc = std::allocator<int>; std::multiset<_Key, _Compare, _Alloc>::iterator = std::_Rb_tree_const_iterator<int>]’
29 | sum += *next(costs.begin, i)
| ~~~~~~^~~~~
In file included from /usr/include/c++/9/set:62,
from GSS.cpp:2:
/usr/include/c++/9/bits/stl_multiset.h:340:7: note: declared here
340 | begin() const _GLIBCXX_NOEXCEPT
| ^~~~~