Borderou de evaluare (job #2381082)
Utilizator | Data | 15 martie 2019 23:38:36 | |
---|---|---|---|
Problema | Trie | Status | done |
Runda | Arhiva educationala | Compilator | cpp-64 | Vezi sursa |
Scor | 0 |
Raport evaluator
Eroare de compilare:
main.cpp:43:5: error: reference to 'unordered_map' is ambiguous
unordered_map children;
^~~~~~~~~~~~~
main.cpp:10:7: note: candidates are: class unordered_map
class unordered_map
^~~~~~~~~~~~~
In file included from /usr/include/c++/6/unordered_map:48:0,
from /usr/include/x86_64-linux-gnu/c++/6/bits/stdc++.h:117,
from main.cpp:1:
/usr/include/c++/6/bits/unordered_map.h:98:11: note: template<class _Key, class _Tp, class _Hash, class _Pred, class _Alloc> class std::unordered_map
class unordered_map
^~~~~~~~~~~~~
main.cpp: In member function 'void TrieNode::insert(std::__cxx11::string, int)':
main.cpp:49:19: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
if (index == s.size())
~~~~~~^~~~~~~~~~~
main.cpp:55:14: error: 'children' was not declared in this scope
if (!children.find(s[index]))
^~~~~~~~
main.cpp:58:9: error: 'children' was not declared in this scope
children[s[index]]->insert(s, index + 1);
^~~~~~~~
main.cpp: In member function 'bool TrieNode::remove(std::__cxx11::string, int)':
main.cpp:63:19: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
if (index == s.size())
~~~~~~^~~~~~~~~~~
main.cpp:66:32: error: 'children' was not declared in this scope
return cnt <= 0 && children.empty();
^~~~~~~~
main.cpp:69:13: error: 'children' was not declared in this scope
if (children.find(s[index]))
^~~~~~~~
main.cpp: In member function 'int TrieNode::count(std::__cxx11::string, int)':
main.cpp:81:19: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
if (index == s.size())
~~~~~~^~~~~~~~~~~
main.cpp:84:13: error: 'children' was not declared in this scope
if (children.find(s[index]))
^~~~~~~~
main.cpp: In member function 'int TrieNode::prefix(std::__cxx11::string, int)':
main.cpp:92:19: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
if (index == s.size())
~~~~~~^~~~~~~~~~~
main.cpp:95:13: error: 'children' was not declared in this scope
if (children.find(s[index]))
^~~~~~~~
Non zero exit status: 1
Ceva nu functioneaza?
- Citeste despre borderoul de evaluare.
- Daca tot nu e bine, contacteaza-ne pe forum !