Borderou de evaluare (job #3191262)
Utilizator | Data | 9 ianuarie 2024 10:18:14 | |
---|---|---|---|
Problema | Portale | Status | done |
Runda | Arhiva de probleme | Compilator | cpp-64 | Vezi sursa |
Scor | 0 |
Raport evaluator
Eroare de compilare:
main.cpp: In function 'void testcase()':
main.cpp:22:18: error: 'u' was not declared in this scope
22 | if (arb[{u,v}] != 0)
| ^
main.cpp:22:20: error: 'v' was not declared in this scope
22 | if (arb[{u,v}] != 0)
| ^
main.cpp:22:16: error: no match for 'operator[]' (operand types are 'std::map<std::pair<int, int>, int>' and '<brace-enclosed initializer list>')
22 | if (arb[{u,v}] != 0)
| ^
In file included from /usr/include/c++/12.2.1/map:61,
from /usr/include/c++/12.2.1/x86_64-pc-linux-gnu/bits/stdc++.h:81,
from main.cpp:1:
/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 = std::pair<int, int>; _Tp = int; _Compare = std::less<std::pair<int, int> >; _Alloc = std::allocator<std::pair<const std::pair<int, int>, int> >; mapped_type = int; key_type = std::pair<int, int>]'
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<std::pair<int, int>, int>::key_type&' {aka 'const std::pair<int, int>&'}
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 = std::pair<int, int>; _Tp = int; _Compare = std::less<std::pair<int, int> >; _Alloc = std::allocator<std::pair<const std::pair<int, int>, int> >; mapped_type = int; key_type = std::pair<int, int>]'
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<std::pair<int, int>, int>::key_type&&' {aka 'std::pair<int, int>&&'}
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 !