Borderou de evaluare (job #2971336)

Utilizator lolismekAlex Jerpelea lolismek Data 27 ianuarie 2023 00:32:03
Problema Jolteon 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:110:9: error: request for member 'resize' in 'prefix', which is of non-class type 'std::vector<long long int> [100001]' 110 | prefix.resize(n); | ^~~~~~ main.cpp:134:21: error: no match for 'operator[]' (operand types are '__gnu_cxx::__alloc_traits<std::allocator<std::unordered_map<long long int, short int> >, std::unordered_map<long long int, short int> >::value_type' {aka 'std::unordered_map<long long int, short int>'} and 'std::vector<long long int>') 134 | f[bucketId(pos)][prefix[j]]--; | ^ In file included from /usr/include/c++/10/unordered_map:47, from main.cpp:1: /usr/include/c++/10/bits/unordered_map.h:983:7: note: candidate: 'std::unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::mapped_type& std::unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::operator[](const key_type&) [with _Key = long long int; _Tp = short int; _Hash = std::hash<long long int>; _Pred = std::equal_to<long long int>; _Alloc = std::allocator<std::pair<const long long int, short int> >; std::unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::mapped_type = short int; std::unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::key_type = long long int]' 983 | operator[](const key_type& __k) | ^~~~~~~~ /usr/include/c++/10/bits/unordered_map.h:983:34: note: no known conversion for argument 1 from 'std::vector<long long int>' to 'const key_type&' {aka 'const long long int&'} 983 | operator[](const key_type& __k) | ~~~~~~~~~~~~~~~~^~~ /usr/include/c++/10/bits/unordered_map.h:987:7: note: candidate: 'std::unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::mapped_type& std::unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::operator[](std::unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::key_type&&) [with _Key = long long int; _Tp = short int; _Hash = std::hash<long long int>; _Pred = std::equal_to<long long int>; _Alloc = std::allocator<std::pair<const long long int, short int> >; std::unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::mapped_type = short int; std::unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::key_type = long long int]' 987 | operator[](key_type&& __k) | ^~~~~~~~ /usr/include/c++/10/bits/unordered_map.h:987:29: note: no known conversion for argument 1 from 'std::vector<long long int>' to 'std::unordered_map<long long int, short int>::key_type&&' {aka 'long long int&&'} 987 | operator[](key_type&& __k) | ~~~~~~~~~~~^~~ main.cpp:135:15: error: no match for 'operator^=' (operand types are 'std::vector<long long int>' and 'long long int') 135 | prefix[j] ^= x; | ~~~~~~~~~~^~~~ In file included from /usr/include/c++/10/ios:42, from /usr/include/c++/10/ostream:38, from /usr/include/c++/10/iostream:39, from main.cpp:2: /usr/include/c++/10/bits/ios_base.h:107:3: note: candidate: 'const std::_Ios_Fmtflags& std::operator^=(std::_Ios_Fmtflags&, std::_Ios_Fmtflags)' 107 | operator^=(_Ios_Fmtflags& __a, _Ios_Fmtflags __b) | ^~~~~~~~ /usr/include/c++/10/bits/ios_base.h:107:29: note: no known conversion for argument 1 from 'std::vector<long long int>' to 'std::_Ios_Fmtflags&' 107 | operator^=(_Ios_Fmtflags& __a, _Ios_Fmtflags __b) | ~~~~~~~~~~~~~~~^~~ /usr/include/c++/10/bits/ios_base.h:149:3: note: candidate: 'const std::_Ios_Openmode& std::operator^=(std::_Ios_Openmode&, std::_Ios_Openmode)' 149 | operator^=(_Ios_Openmode& __a, _Ios_Openmode __b) | ^~~~~~~~ /usr/include/c++/10/bits/ios_base.h:149:29: note: no known conversion for argument 1 from 'std::vector<long long int>' to 'std::_Ios_Openmode&' 149 | operator^=(_Ios_Openmode& __a, _Ios_Openmode __b) | ~~~~~~~~~~~~~~~^~~ /usr/include/c++/10/bits/ios_base.h:189:3: note: candidate: 'const std::_Ios_Iostate& std::operator^=(std::_Ios_Iostate&, std::_Ios_Iostate)' 189 | operator^=(_Ios_Iostate& __a, _Ios_Iostate __b) | ^~~~~~~~ /usr/include/c++/10/bits/ios_base.h:189:28: note: no known conversion for argument 1 from 'std::vector<long long int>' to 'std::_Ios_Iostate&' 189 | operator^=(_Ios_Iostate& __a, _Ios_Iostate __b) | ~~~~~~~~~~~~~~^~~ main.cpp:136:21: error: no match for 'operator[]' (operand types are '__gnu_cxx::__alloc_traits<std::allocator<std::unordered_map<long long int, short int> >, std::unordered_map<long long int, short int> >::value_type' {aka 'std::unordered_map<long long int, short int>'} and 'std::vector<long long int>') 136 | f[bucketId(pos)][prefix[j]]++; | ^ In file included from /usr/include/c++/10/unordered_map:47, Non zero exit status: 1

Ceva nu functioneaza?