Borderou de evaluare (job #790261)
Utilizator |
|
IP | ascuns |
---|---|---|---|
Problemă | Bravo, ai şir! (Clasa a 6-a) | Compilator | cpp-32 |
Rundă | Arhiva de probleme | Status | evaluat |
Dată | 17 oct. 2024 01:07:29 | Scor | 0 |
Raport evaluator
Eroare de compilare:
main.cpp: In function 'int main()':
main.cpp:61:34: warning: structured bindings only available with '-std=c++17' or '-std=gnu++17' [-Wc++17-extensions]
61 | for (const auto& [factor, count] : xFactors) {
| ^
main.cpp:64:53: error: passing 'const std::map<int, int>' as 'this' argument discards qualifiers [-fpermissive]
64 | totalCount += factors[factor];
| ^
In file included from /usr/lib/gcc/i686-pc-linux-gnu/13/include/g++-v13/map:63,
from main.cpp:3:
/usr/lib/gcc/i686-pc-linux-gnu/13/include/g++-v13/bits/stl_map.h:504:7: note: in call to 'std::map<_Key, _Tp, _Compare, _Alloc>::mapped_type& std::map<_Key, _Tp, _Compare, _Alloc>::operator[](const key_type&) [with _Key = int; _Tp = int; _Compare = std::less<int>; _Alloc = std::allocator<std::pair<const int, int> >; mapped_type = int; key_type = int]'
504 | operator[](const key_type& __k)
| ^~~~~~~~
main.cpp:84:38: warning: structured bindings only available with '-std=c++17' or '-std=gnu++17' [-Wc++17-extensions]
84 | for (const auto& [factor, count] : xFactors) {
| ^
main.cpp:88:29: error: decrement of read-only reference 'count'
88 | count--;
| ^~~~~