Borderou de evaluare (job #3263290)
Utilizator | Data | 14 decembrie 2024 10:08:43 | |
---|---|---|---|
Problema | Puteri | Status | done |
Runda | Arhiva de probleme | Compilator | cpp-64 | Vezi sursa |
Scor | 0 |
Raport evaluator
Eroare de compilare:
main.cpp: In function 'int main()':
main.cpp:51:14: error: 'a2' was not declared in this scope
51 | cin>>a2>>b3>>c5;
| ^~
main.cpp:51:18: error: 'b3' was not declared in this scope
51 | cin>>a2>>b3>>c5;
| ^~
main.cpp:51:22: error: 'c5' was not declared in this scope
51 | cin>>a2>>b3>>c5;
| ^~
main.cpp:52:11: error: no match for 'operator[]' (operand types are 'std::map<nr, int>' and '<brace-enclosed initializer list>')
52 | mp[{a2,b3,c5}]++;
| ^
In file included from /usr/include/c++/12.2.1/map:61,
from main.cpp:2:
/usr/include/c++/12.2.1/bits/stl_map.h:502:7: note: candidate: 'std::map<_Key, _Tp, _Compare, _Alloc>::mapped_type& std::map<_Key, _Tp, _Compare, _Alloc>::operator[](const key_type&) [with _Key = nr; _Tp = int; _Compare = std::less<nr>; _Alloc = std::allocator<std::pair<const nr, int> >; mapped_type = int; key_type = nr]'
502 | operator[](const key_type& __k)
| ^~~~~~~~
/usr/include/c++/12.2.1/bits/stl_map.h:502:34: note: no known conversion for argument 1 from '<brace-enclosed initializer list>' to 'const std::map<nr, int>::key_type&' {aka 'const nr&'}
502 | operator[](const key_type& __k)
| ~~~~~~~~~~~~~~~~^~~
/usr/include/c++/12.2.1/bits/stl_map.h:522:7: note: candidate: 'std::map<_Key, _Tp, _Compare, _Alloc>::mapped_type& std::map<_Key, _Tp, _Compare, _Alloc>::operator[](key_type&&) [with _Key = nr; _Tp = int; _Compare = std::less<nr>; _Alloc = std::allocator<std::pair<const nr, int> >; mapped_type = int; key_type = nr]'
522 | operator[](key_type&& __k)
| ^~~~~~~~
/usr/include/c++/12.2.1/bits/stl_map.h:522:29: note: no known conversion for argument 1 from '<brace-enclosed initializer list>' to 'std::map<nr, int>::key_type&&' {aka 'nr&&'}
522 | operator[](key_type&& __k)
| ~~~~~~~~~~~^~~
Non zero exit status: 1
Ceva nu functioneaza?
- Citeste despre borderoul de evaluare.
- Daca tot nu e bine, contacteaza-ne pe forum !