ID 5945105
Пользователь Скопин Семён Андреевич
Время 31.12.2021 16:56 (27 д. 16:57)
Обработка 16:56 ... 16:56 (2,91 сек.)
Файл 5945105.cpp (CLang++ 5.0.0 + Address Sanitizer)
Турнир 2 курс. Программирование на C++. Турнир 3, осень 2021
Задача A: Slicer
Набор тестов
Ограничения Время: 1с Память: 4000Мб
Состояние  [?]
CE Ошибка компиляции
код | результаты
main.cpp:3:2: error: #error "don't use iostream or stdio in solution"
 #error "don't use iostream or stdio in solution"
  ^~~~~
In file included from /usr/include/c++/7/cassert:44:0,
                 from main.cpp:12:
main.cpp: In function 'void TestPageCounts()':
main.cpp:25:10: error: 'Slice' was not declared in this scope
   assert(Slice(v, 1).size() == v.size());
          ^
main.cpp: In function 'void TestLooping()':
main.cpp:38:3: error: 'Slicer' was not declared in this scope
   Slicer<vector<int>::iterator> slice_v(v.begin(), v.end(), 6);
   ^~~~~~
main.cpp:38:31: error: expected primary-expression before '>' token
   Slicer<vector<int>::iterator> slice_v(v.begin(), v.end(), 6);
                               ^
main.cpp:38:33: error: 'slice_v' was not declared in this scope
   Slicer<vector<int>::iterator> slice_v(v.begin(), v.end(), 6);
                                 ^~~~~~~
main.cpp:38:33: note: suggested alternative: 'ssize_t'
   Slicer<vector<int>::iterator> slice_v(v.begin(), v.end(), 6);
                                 ^~~~~~~
                                 ssize_t
main.cpp:40:27: error: unable to deduce 'auto&&' from 'slice_v'
   for (const auto& page : slice_v) {
                           ^~~~~~~
main.cpp:41:18: error: unable to deduce 'auto&&' from 'page'
     for (int x : page) {
                  ^~~~
main.cpp: In function 'void TestModification()':
main.cpp:52:20: error: 'Slice' was not declared in this scope
   for (auto page : Slice(vs, 2)) {
                    ^~~~~
main.cpp:53:23: error: unable to deduce 'auto&&' from 'page'
     for (auto& word : page) {
                       ^~~~
main.cpp: In function 'void TestPageSizes()':
main.cpp:65:3: error: 'Slicer' was not declared in this scope
   Slicer letters_slices(letters.begin(), letters.end(), 11);
   ^~~~~~
main.cpp:67:27: error: 'letters_slices' was not declared in this scope
   for (const auto& page : letters_slices) {
                           ^~~~~~~~~~~~~~
main.cpp:67:27: note: suggested alternative: 'letters'
   for (const auto& page : letters_slices) {
                           ^~~~~~~~~~~~~~
                           letters
main.cpp: In function 'void TestConstContainer()':
main.cpp:79:27: error: 'Slice' was not declared in this scope
   for (const auto& page : Slice(letters, 10)) {
                           ^~~~~
main.cpp: In function 'void TestPagination()':
main.cpp:92:33: error: 'Slice' was not declared in this scope
   for (const auto& split_by_9 : Slice(v, 9)) {
                                 ^~~~~
main.cpp:95:23: error: unable to deduce 'auto&&' from 'split_by_4'
       for (int item : split_by_4) {
                       ^~~~~~~~~~
[печатать | |
]
(998 b)
0.182s 0.008s 10