Borderou de evaluare (job #3354086)
| Utilizator | Data | 15 mai 2026 00:45:03 | |
|---|---|---|---|
| Problema | Trie | Status | done |
| Runda | Arhiva educationala | Compilator | cpp-64 | Vezi sursa |
| Scor | 0 | ||
Raport evaluator
Eroare de compilare:
main.cpp:20:9: error: 'vector' does not name a type
20 | vector<shared_ptr<Node>> next;
| ^~~~~~
main.cpp: In constructor 'Trie::Node::Node(char)':
main.cpp:27:13: error: class 'Trie::Node' does not have any field named 'next'
27 | next(Trie::ASCII_END - Trie::ASCII_START + 1, nullptr) {}
| ^~~~
main.cpp: In member function 'std::shared_ptr<Trie::Node> Trie::Node::get_node(size_t) const':
main.cpp:47:24: error: invalid types '<unresolved overloaded function type>[size_t {aka long unsigned int}]' for array subscript
47 | return next[i];
| ^
main.cpp: In member function 'void Trie::Node::add_node(size_t, char)':
main.cpp:50:17: error: invalid types '<unresolved overloaded function type>[size_t {aka long unsigned int}]' for array subscript
50 | next[i] = make_shared<Node>(val);
| ^
main.cpp: In member function 'void Trie::Node::remove_node(size_t)':
main.cpp:53:17: error: invalid types '<unresolved overloaded function type>[size_t {aka long unsigned int}]' for array subscript
53 | next[i] = nullptr;
| ^
main.cpp: In member function 'bool Trie::Node::has_children() const':
main.cpp:57:37: error: unable to deduce 'auto&&' from 'std::next'
57 | for(const auto& child : next)
| ^~~~
main.cpp:57:37: note: couldn't deduce template parameter 'auto'
Non zero exit status: 1
Ceva nu functioneaza?
- Citeste despre borderoul de evaluare.
- Daca tot nu e bine, contacteaza-ne pe forum !
