Borderou de evaluare (job #2466304)

Utilizator TheGodFather2131Alexandru Miclea TheGodFather2131 Data 1 octombrie 2019 21:00:05
Problema Eq4 Status done
Runda Arhiva de probleme Compilator cpp-64 | Vezi sursa
Scor 0

Raport evaluator

Eroare de compilare: main.cpp: In function 'int cerinta(int)': main.cpp:31:17: error: 'v' was not declared in this scope for (auto& x : v[nr % mod]) { ^ main.cpp:31:24: error: 'mod' was not declared in this scope for (auto& x : v[nr % mod]) { ^~~ main.cpp: In function 'void add(int)': main.cpp:41:3: error: 'v' was not declared in this scope v[nr % mod].push_back(nr); ^ main.cpp:41:10: error: 'mod' was not declared in this scope v[nr % mod].push_back(nr); ^~~ main.cpp: In function 'void remove(int)': main.cpp:48:17: error: 'v' was not declared in this scope for (auto& x : v[nr % mod]) { ^ main.cpp:48:24: error: 'mod' was not declared in this scope for (auto& x : v[nr % mod]) { ^~~ main.cpp:53:2: error: 'v' was not declared in this scope v[nr % mod] = aux; ^ main.cpp:53:9: error: 'mod' was not declared in this scope v[nr % mod] = aux; ^~~ main.cpp: In function 'int main()': main.cpp:66:20: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] for (int i = 0; i < s.size(); i++) { ~~^~~~~~~~~~ main.cpp:81:14: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] if (i + 1 == s.size() || s[i+1] == '+' || s[i + 1] == '-') { ~~~~~~^~~~~~~~~~~ main.cpp:126:36: error: no match for 'operator!=' (operand types are 'std::unordered_map<long int, long int>::iterator {aka std::__detail::_Node_iterator<std::pair<const long int, long int>, false, false>}' and '<unresolved overloaded function type>') if (M.find(e - (k * z + l * t)) != end) { ~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~ In file included from /usr/include/c++/6/bits/stl_algobase.h:64:0, from /usr/include/c++/6/vector:60, from main.cpp:3: /usr/include/c++/6/bits/stl_pair.h:448:5: note: candidate: template<class _T1, class _T2> constexpr bool std::operator!=(const std::pair<_T1, _T2>&, const std::pair<_T1, _T2>&) operator!=(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y) ^~~~~~~~ /usr/include/c++/6/bits/stl_pair.h:448:5: note: template argument deduction/substitution failed: main.cpp:126:39: note: 'std::unordered_map<long int, long int>::iterator {aka std::__detail::_Node_iterator<std::pair<const long int, long int>, false, false>}' is not derived from 'const std::pair<_T1, _T2>' if (M.find(e - (k * z + l * t)) != end) { ^~~ In file included from /usr/include/c++/6/bits/stl_algobase.h:67:0, from /usr/include/c++/6/vector:60, from main.cpp:3: Non zero exit status: 1

Ceva nu functioneaza?