ID 5934579
Пользователь Павлюк Роман Сергеевич
Время 03:43<< 25.12.2021 03:43 (21 д. 03:44) 03:46>>
Обработка 03:43 ... 03:43 (2,05 сек.)
Файл 5934579.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 instantiation of 'Slicer<It>::Slicer(It, It, std::size_t) [with It = __gnu_cxx::__normal_iterator<int*, std::vector<int> >; std::size_t = long unsigned int]':
main.cpp:38:62:   required from here
solution.h:34:20: error: comparison between signed and unsigned integer expressions [-Werror=sign-compare]
         while (end < std::distance(b, e)) {
                ~~~~^~~~~~~~~~~~~~~~~~~~~
solution.h:39:17: error: comparison between signed and unsigned integer expressions [-Werror=sign-compare]
         if (end >= std::distance(b, e)) {
             ~~~~^~~~~~~~~~~~~~~~~~~~~~
solution.h:40:39: error: comparison between signed and unsigned integer expressions [-Werror=sign-compare]
             end = std::distance(b, e) < end ? std::distance(b, e) : end;
                   ~~~~~~~~~~~~~~~~~~~~^~~~~
solution.h: In instantiation of 'Slicer<It>::Slicer(It, It, std::size_t) [with It = __gnu_cxx::__normal_iterator<char*, std::__cxx11::basic_string<char> >; std::size_t = long unsigned int]':
main.cpp:65:59:   required from here
solution.h:34:20: error: comparison between signed and unsigned integer expressions [-Werror=sign-compare]
         while (end < std::distance(b, e)) {
                ~~~~^~~~~~~~~~~~~~~~~~~~~
solution.h:39:17: error: comparison between signed and unsigned integer expressions [-Werror=sign-compare]
         if (end >= std::distance(b, e)) {
             ~~~~^~~~~~~~~~~~~~~~~~~~~~
solution.h:40:39: error: comparison between signed and unsigned integer expressions [-Werror=sign-compare]
             end = std::distance(b, e) < end ? std::distance(b, e) : end;
                   ~~~~~~~~~~~~~~~~~~~~^~~~~
solution.h: In instantiation of 'Slicer<It>::Slicer(It, It, std::size_t) [with It = __gnu_cxx::__normal_iterator<std::__cxx11::basic_string<char>*, std::vector<std::__cxx11::basic_string<char> > >; std::size_t = long unsigned int]':
solution.h:64:12:   required from 'Slicer<typename C::iterator> Slice(C&, std::size_t) [with C = std::vector<std::__cxx11::basic_string<char> >; typename C::iterator = __gnu_cxx::__normal_iterator<std::__cxx11::basic_string<char>*, std::vector<std::__cxx11::basic_string<char> > >; std::size_t = long unsigned int]'
main.cpp:52:31:   required from here
solution.h:34:20: error: comparison between signed and unsigned integer expressions [-Werror=sign-compare]
         while (end < std::distance(b, e)) {
                ~~~~^~~~~~~~~~~~~~~~~~~~~
solution.h:39:17: error: comparison between signed and unsigned integer expressions [-Werror=sign-compare]
         if (end >= std::distance(b, e)) {
             ~~~~^~~~~~~~~~~~~~~~~~~~~~
solution.h:40:39: error: comparison between signed and unsigned integer expressions [-Werror=sign-compare]
             end = std::distance(b, e) < end ? std::distance(b, e) : end;
                   ~~~~~~~~~~~~~~~~~~~~^~~~~
solution.h: In instantiation of 'Slicer<It>::Slicer(It, It, std::size_t) [with It = __gnu_cxx::__normal_iterator<const char*, std::__cxx11::basic_string<char> >; std::size_t = long unsigned int]':
solution.h:69:12:   required from 'Slicer<typename C::const_iterator> Slice(const C&, std::size_t) [with C = std::__cxx11::basic_string<char>; typename C::const_iterator = __gnu_cxx::__normal_iterator<const char*, std::__cxx11::basic_string<char> >; std::size_t = long unsigned int]'
main.cpp:79:44:   required from here
solution.h:34:20: error: comparison between signed and unsigned integer expressions [-Werror=sign-compare]
         while (end < std::distance(b, e)) {
                ~~~~^~~~~~~~~~~~~~~~~~~~~
solution.h:39:17: error: comparison between signed and unsigned integer expressions [-Werror=sign-compare]
         if (end >= std::distance(b, e)) {
             ~~~~^~~~~~~~~~~~~~~~~~~~~~
solution.h:40:39: error: comparison between signed and unsigned integer expressions [-Werror=sign-compare]
             end = std::distance(b, e) < end ? std::distance(b, e) : end;
                   ~~~~~~~~~~~~~~~~~~~~^~~~~
cc1plus: all warnings being treated as errors
[печатать | |
]
(1 677 b)
0.059s 0.013s 10