Borderou de evaluare (job #3191735)

Utilizator BuruianaRaresAndreiBuruiana Rares Andrei BuruianaRaresAndrei Data 10 ianuarie 2024 15:55:32
Problema Hashuri Status done
Runda Arhiva educationala Compilator cpp-64 | Vezi sursa
Scor 0

Raport evaluator

Eroare de compilare: main.cpp:15:14: error: 'interator' in 'class std::vector<int>' does not name a type 15 | vector<int>::interator find_value_hash(int x); | ^~~~~~~~~ main.cpp: In function 'int main()': main.cpp:30:16: error: 'find_value_hash' was not declared in this scope; did you mean 'insert_value_hash'? 30 | cout << (find_value_hash(x) != h[x % MOD].end()) << '\n'; | ^~~~~~~~~~~~~~~ | insert_value_hash main.cpp: In function 'std::vector<int>::iterator find_value_hash(int)': main.cpp:37:16: error: 'interator' is not a member of 'std::vector<int>' 37 | vector<int>::interator it; | ^~~~~~~~~ main.cpp:40:14: error: could not convert 'it' from 'int' to 'std::vector<int>::iterator' 40 | return it; | ^~ | | | int main.cpp: In function 'void erase_value_hash(int)': main.cpp:57:20: error: no matching function for call to 'std::vector<int>::erase(int&)' 57 | h[nrhash].erase(x); | ~~~~~~~~~~~~~~~^~~ In file included from /usr/include/c++/12.2.1/vector:64, from main.cpp:3: /usr/include/c++/12.2.1/bits/stl_vector.h:1529:7: note: candidate: 'constexpr std::vector<_Tp, _Alloc>::iterator std::vector<_Tp, _Alloc>::erase(const_iterator) [with _Tp = int; _Alloc = std::allocator<int>; iterator = std::vector<int>::iterator; const_iterator = std::vector<int>::const_iterator]' 1529 | erase(const_iterator __position) | ^~~~~ /usr/include/c++/12.2.1/bits/stl_vector.h:1529:28: note: no known conversion for argument 1 from 'int' to 'std::vector<int>::const_iterator' 1529 | erase(const_iterator __position) | ~~~~~~~~~~~~~~~^~~~~~~~~~ /usr/include/c++/12.2.1/bits/stl_vector.h:1557:7: note: candidate: 'constexpr std::vector<_Tp, _Alloc>::iterator std::vector<_Tp, _Alloc>::erase(const_iterator, const_iterator) [with _Tp = int; _Alloc = std::allocator<int>; iterator = std::vector<int>::iterator; const_iterator = std::vector<int>::const_iterator]' 1557 | erase(const_iterator __first, const_iterator __last) | ^~~~~ /usr/include/c++/12.2.1/bits/stl_vector.h:1557:7: note: candidate expects 2 arguments, 1 provided Non zero exit status: 1

Ceva nu functioneaza?