Borderou de evaluare (job #3348776)

Utilizator WiseAndrei4Vetrila Andrei WiseAndrei4 Data 23 martie 2026 22:47:31
Problema Fotbal2 Status done
Runda Teme Pregatire ACM Unibuc 2014, Anul I, Semestrul 2 Compilator cpp-64 | Vezi sursa
Scor 0

Raport evaluator

Eroare de compilare: main.cpp: In function 'void euler(int)': main.cpp:19:8: error: no match for 'operator[]' (operand types are 'std::map<std::pair<int, int>, bool>' and 'int') 19 | viz[x]=1; | ^ In file included from /usr/include/c++/12.2.1/map:61, from main.cpp:5: /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 = bool; _Compare = std::less<std::pair<int, int> >; _Alloc = std::allocator<std::pair<const std::pair<int, int>, bool> >; mapped_type = bool; 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 'int' to 'const std::map<std::pair<int, int>, bool>::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 = bool; _Compare = std::less<std::pair<int, int> >; _Alloc = std::allocator<std::pair<const std::pair<int, int>, bool> >; mapped_type = bool; 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 'int' to 'std::map<std::pair<int, int>, bool>::key_type&&' {aka 'std::pair<int, int>&&'} 522 | operator[](key_type&& __k) | ~~~~~~~~~~~^~~ Non zero exit status: 1

Ceva nu functioneaza?