ID 6006573
Пользователь Муканян Анна
Время 17.01.2022 19:41 (4:56) 19:52>>
Обработка 19:41 ... 19:41 (10,60 сек.)
Файл 6006573.cpp (CLang++ 5.0.0 + Address Sanitizer)
Турнир 2 курс. Программирование на C++. Турнир 3, осень 2021
Задача A: Slicer
Набор тестов
Ограничения Время: 1с Память: 4000Мб
Состояние  [?]
CE Ошибка компиляции
код | результаты
In file included from main.cpp:1:0:
solution.h: In constructor 'Slicer<It>::Slicer(It, It, size_t)':
solution.h:29:13: error: class 'Slicer<It>' does not have any field named 'begin_'
             begin_(begin), end_(end), page_size_(page_size) {
             ^~~~~~
solution.h:29:28: error: class 'Slicer<It>' does not have any field named 'end_'
             begin_(begin), end_(end), page_size_(page_size) {
                            ^~~~
solution.h:29:39: error: class 'Slicer<It>' does not have any field named 'page_size_'
             begin_(begin), end_(end), page_size_(page_size) {
                                       ^~~~~~~~~~
solution.h:30:46: error: 'begin_' was not declared in this scope
             auto allElements = std::distance(begin_, end_);
                                              ^~~~~~
solution.h:30:46: note: suggested alternative: 'begin'
             auto allElements = std::distance(begin_, end_);
                                              ^~~~~~
                                              begin
solution.h:30:54: error: 'end_' was not declared in this scope
             auto allElements = std::distance(begin_, end_);
                                                      ^~~~
solution.h:30:54: note: suggested alternative: 'end'
             auto allElements = std::distance(begin_, end_);
                                                      ^~~~
                                                      end
solution.h:31:48: error: 'page_size_' was not declared in this scope
             unsigned int count = allElements / page_size_;
                                                ^~~~~~~~~~
solution.h:31:48: note: suggested alternative: 'page_size'
             unsigned int count = allElements / page_size_;
                                                ^~~~~~~~~~
                                                page_size
solution.h:35:17: error: 'pages_' was not declared in this scope
                 pages_.push_back(tmp);
                 ^~~~~~
solution.h:35:17: note: suggested alternative: 'page_size'
                 pages_.push_back(tmp);
                 ^~~~~~
                 page_size
solution.h:40:17: error: 'pages_' was not declared in this scope
                 pages_.push_back(tmp);
                 ^~~~~~
solution.h:40:17: note: suggested alternative: 'page_size'
                 pages_.push_back(tmp);
                 ^~~~~~
                 page_size
solution.h: In member function 'size_t Slicer<It>::size() const':
solution.h:45:16: error: 'pages_' was not declared in this scope
         return pages_.size();
                ^~~~~~
solution.h: In member function 'auto Slicer<It>::begin()':
solution.h:49:16: error: 'pages_' was not declared in this scope
         return pages_.begin();
                ^~~~~~
solution.h: In member function 'auto Slicer<It>::end()':
solution.h:53:16: error: 'pages_' was not declared in this scope
         return pages_.end();
                ^~~~~~
main.cpp: In function 'void TestLooping()':
main.cpp:40:27: error: 'void __for_begin' has incomplete type
   for (const auto& page : slice_v) {
                           ^~~~~~~
main.cpp:40:27: error: 'void __for_end' has incomplete type
main.cpp:41:18: error: unable to deduce 'auto&&' from 'page'
     for (int x : page) {
                  ^~~~
main.cpp: In function 'void TestModification()':
main.cpp:52:31: error: 'void __for_begin' has incomplete type
   for (auto page : Slice(vs, 2)) {
                               ^
main.cpp:52:31: error: 'void __for_end' has incomplete type
main.cpp:53:23: error: unable to deduce 'auto&&' from 'page'
     for (auto& word : page) {
                       ^~~~
main.cpp: In function 'void TestPageSizes()':
main.cpp:67:27: error: 'void __for_begin' has incomplete type
   for (const auto& page : letters_slices) {
                           ^~~~~~~~~~~~~~
main.cpp:67:27: error: 'void __for_end' has incomplete type
main.cpp: In function 'void TestConstContainer()':
main.cpp:79:44: error: 'void __for_begin' has incomplete type
   for (const auto& page : Slice(letters, 10)) {
                                            ^
main.cpp:79:44: error: 'void __for_end' has incomplete type
main.cpp: In function 'void TestPagination()':
main.cpp:92:43: error: 'void __for_begin' has incomplete type
   for (const auto& split_by_9 : Slice(v, 9)) {
                                           ^
main.cpp:92:43: error: 'void __for_end' has incomplete type
main.cpp:95:23: error: unable to deduce 'auto&&' from 'split_by_4'
       for (int item : split_by_4) {
                       ^~~~~~~~~~
[печатать | |
]
(1 395 b)
0.217s 0.008s 10