Borderou de evaluare (job #780032)

Utilizator avatar bogdan1479 Luca Bogdan Alexandru bogdan1479 IP ascuns
Problemă Secv5 (clasa a 9-a) Compilator cpp-32
Rundă Arhiva de probleme Status evaluat
Dată 11 iun. 2024 08:28:43 Scor 0

Raport evaluator

Eroare de compilare: main.cpp:16:10: error: conflicting declaration 'unsigned int v [1048577]' 16 | unsigned v[NMAX]; | ^ main.cpp:13:3: note: previous declaration as 'element v [1048577]' 13 | } v[NMAX]; | ^ main.cpp: In function 'long long int calcul(int)': main.cpp:24:9: error: 'F' was not declared in this scope 24 | F[i] = 0; | ^ main.cpp:27:15: error: no match for 'operator[]' (operand types are 'std::unordered_map<int, int>' and 'element') 27 | if(++M[v[i]] == 1) | ^ In file included from /usr/lib/gcc/i686-pc-linux-gnu/13/include/g++-v13/unordered_map:41, from /usr/lib/gcc/i686-pc-linux-gnu/13/include/g++-v13/i686-pc-linux-gnu/bits/stdc++.h:188, from main.cpp:1: /usr/lib/gcc/i686-pc-linux-gnu/13/include/g++-v13/bits/unordered_map.h:986: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 = int; _Tp = int; _Hash = std::hash<int>; _Pred = std::equal_to<int>; _Alloc = std::allocator<std::pair<const int, int> >; mapped_type = int; key_type = int]' 986 | operator[](const key_type& __k) | ^~~~~~~~ /usr/lib/gcc/i686-pc-linux-gnu/13/include/g++-v13/bits/unordered_map.h:986:34: note: no known conversion for argument 1 from 'element' to 'const std::unordered_map<int, int>::key_type&' {aka 'const int&'} 986 | operator[](const key_type& __k) | ~~~~~~~~~~~~~~~~^~~ /usr/lib/gcc/i686-pc-linux-gnu/13/include/g++-v13/bits/unordered_map.h:990:7: note: candidate: 'std::unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::mapped_type& std::unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::operator[](key_type&&) [with _Key = int; _Tp = int; _Hash = std::hash<int>; _Pred = std::equal_to<int>; _Alloc = std::allocator<std::pair<const int, int> >; mapped_type = int; key_type = int]' 990 | operator[](key_type&& __k) | ^~~~~~~~ /usr/lib/gcc/i686-pc-linux-gnu/13/include/g++-v13/bits/unordered_map.h:990:29: note: no known conversion for argument 1 from 'element' to 'std::unordered_map<int, int>::key_type&&' {aka 'int&&'} 990 | operator[](key_type&& __k) | ~~~~~~~~~~~^~~ main.cpp:31:19: error: no match for 'operator[]' (operand types are 'std::unordered_map<int, int>' and 'element') 31 | if(--M[v[p]] == 0) | ^ /usr/lib/gcc/i686-pc-linux-gnu/13/include/g++-v13/bits/unordered_map.h:986: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 = int; _Tp = int; _Hash = std::hash<int>; _Pred = std::equal_to<int>; _Alloc = std::allocator<std::pair<const int, int> >; mapped_type = int; key_type = int]' 986 | operator[](const key_type& __k) | ^~~~~~~~ /usr/lib/gcc/i686-pc-linux-gnu/13/include/g++-v13/bits/unordered_map.h:986:34: note: no known conversion for argument 1 from 'element' to 'const std::unordered_map<int, int>::key_type&' {aka 'const int&'} 986 | operator[](const key_type& __k) | ~~~~~~~~~~~~~~~~^~~ /usr/lib/gcc/i686-pc-linux-gnu/13/include/g++-v13/bits/unordered_map.h:990:7: note: candidate: 'std::unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::mapped_type& std::unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::operator[](key_type&&) [with _Key = int; _Tp = int; _Hash = std::hash<int>; _Pred = std::equal_to<int>; _Alloc = std::allocator<std::pair<const int, int> >; mapped_type = int; key_type = int]' 990 | operator[](key_type&& __k) | ^~~~~~~~ /usr/lib/gcc/i686-pc-linux-gnu/13/include/g++-v13/bits/unordered_map.h:990:29: note: no known conversion for argument 1 from 'element' to 'std::unordered_map<int, int>::key_type&&' {aka 'int&&'} 990 | operator[](key_type&& __k) | ~~~~~~~~~~~^~~ main.cpp: In function 'int main()': main.cpp:49:5: error: 'normalizare' was not declared in this scope 49 | normalizare(); | ^~~~~~~~~~~