ID 5474351
Пользователь Матвеев Ян Альбертович
Время 00:23<< 12.10.2021 00:25 (26 д. 14:59) 00:28>>
Обработка 00:25 ... 00:25 (6,46 сек.)
Файл 5474351.cpp (CLang++ 5.0.0 + Address Sanitizer)
Турнир 2 курс. Программирование на C++. Турнир 1, осень 2021
Задача C: Set
Набор тестов
Ограничения Время: 1с Память: 512Мб
Состояние  [?]
CE Ошибка компиляции
код | результаты
In file included from main.cpp:16:0:
set.h: In member function 'void Set::deleteEl(int)':
set.h:15:25: error: comparison between signed and unsigned integer expressions [-Werror=sign-compare]
   for (int j = i + 1; j < c.size(); j++) {
                       ~~^~~~~~~~~~
set.h: In member function 'void Set::Add(int64_t)':
set.h:22:21: error: comparison between signed and unsigned integer expressions [-Werror=sign-compare]
   for (int i = 1; i < c.size(); i++) {
                   ~~^~~~~~~~~~
set.h:23:14: error: comparison between signed and unsigned integer expressions [-Werror=sign-compare]
     while (i < c.size() && c[i] == c[i-1]) {
            ~~^~~~~~~~~~
set.h: In member function 'void Set::Remove(int64_t)':
set.h:32:21: error: comparison between signed and unsigned integer expressions [-Werror=sign-compare]
   for (int j = 1; j < c.size(); j++) {
                   ~~^~~~~~~~~~
set.h:33:14: error: comparison between signed and unsigned integer expressions [-Werror=sign-compare]
     while (j < c.size() && c[j] == c[j-1]) {
            ~~^~~~~~~~~~
set.h:38:17: error: comparison between signed and unsigned integer expressions [-Werror=sign-compare]
   for (i = 0; i < this->c.size(); i++) {
               ~~^~~~~~~~~~~~~~~~
set.h:41:9: error: comparison between signed and unsigned integer expressions [-Werror=sign-compare]
   if (i == this->c.size()) {
       ~~^~~~~~~~~~~~~~~~~
set.h: In member function 'bool Set::Contains(int64_t) const':
set.h:49:17: error: comparison between signed and unsigned integer expressions [-Werror=sign-compare]
   for (i = 0; i < this->c.size(); i++) {
               ~~^~~~~~~~~~~~~~~~
set.h: In member function 'Set Set::Union(const Set&) const':
set.h:58:21: error: comparison between signed and unsigned integer expressions [-Werror=sign-compare]
   for (int i = 0; i < other.c.size(); i++) {
                   ~~^~~~~~~~~~~~~~~~
set.h:60:23: error: comparison between signed and unsigned integer expressions [-Werror=sign-compare]
     for (int j = 0; j < c.size() && !flag; j++) {
                     ~~^~~~~~~~~~
set.h: In member function 'Set Set::Intersection(const Set&) const':
set.h:74:21: error: comparison between signed and unsigned integer expressions [-Werror=sign-compare]
   for (int i = 0; i < this->c.size(); i++) {
                   ~~^~~~~~~~~~~~~~~~
set.h:75:21: error: comparison between signed and unsigned integer expressions [-Werror=sign-compare]
   for (int j = 0; j < other.c.size(); j++)
                   ~~^~~~~~~~~~~~~~~~
set.h: In member function 'Set Set::Difference(const Set&) const':
set.h:86:21: error: comparison between signed and unsigned integer expressions [-Werror=sign-compare]
   for (int i = 0; i < this->c.size(); i++) {
                   ~~^~~~~~~~~~~~~~~~
set.h:88:21: error: comparison between signed and unsigned integer expressions [-Werror=sign-compare]
   for (int j = 0; j < other.c.size() && !flag; j++) {
                   ~~^~~~~~~~~~~~~~~~
cc1plus: all warnings being treated as errors
0.046s 0.015s 9