ID 5908259
Пользователь Пигидин Игорь
Время 12.12.2021 19:22<< 13.12.2021 19:54 (9 д. 19:54) 19:55>>
Обработка 19:54 ... 19:54 (3,30 сек.)
Файл 5908259.cpp (CLang++ 5.0.0 + Address Sanitizer)
Турнир 2 курс. Программирование на C++. Турнир 3, осень 2021
Задача D: Graph visitor
Набор тестов
Ограничения Время: 1с Память: 4000Мб
Состояние  [?]
CE Ошибка компиляции
код | результаты
In file included from main.cpp:55:0:
visitor.h:42:5: error: 'unordered_map' does not name a type
     unordered_map<Vertex, Vertex>* p;
     ^~~~~~~~~~~~~
visitor.h: In constructor 'BfsVisitor<Vertex>::BfsVisitor()':
visitor.h:7:9: error: 'p' was not declared in this scope
         p = new std::unordered_map<Vertex, Vertex>();
         ^
visitor.h: In member function 'void BfsVisitor<Vertex>::DiscoverVertex(const Vertex&)':
visitor.h:19:13: error: 'p' was not declared in this scope
             p->insert({ vertex, vertex });
             ^
visitor.h:22:9: error: 'p' was not declared in this scope
         p->insert({ vertex, *v });
         ^
visitor.h: In member function 'size_t BfsVisitor<Vertex>::DistanceTo(const Vertex&) const':
visitor.h:27:39: error: 'p' was not declared in this scope
         for (Vertex i = target;  i != p->at(i); i = p->at(i))
                                       ^
visitor.h: In member function 'Vertex BfsVisitor<Vertex>::Parent(const Vertex&) const':
visitor.h:32:16: error: 'p' was not declared in this scope
         return p->at(vertex);
                ^
visitor.h: In destructor 'BfsVisitor<Vertex>::~BfsVisitor()':
visitor.h:37:16: error: 'p' was not declared in this scope
         delete p;
                ^
[печатать | |
]
(970 b)
0.041s 0.010s 10