ID 5458121
Пользователь Костюков Максим Сергеевич
Время 14:11<< 08.10.2021 14:12 (23 д. 04:46) 14:13>>
Обработка 14:12 ... 14:12 (3,03 сек.)
Файл 5458121.cpp (CLang++ 5.0.0 + Address Sanitizer)
Турнир 2 курс. Программирование на C++. Турнир 1, осень 2021
Задача B: Finite Field (Hard version)
Набор тестов
Ограничения Время: 5с Память: 512Мб
Состояние  [?]
CE Ошибка компиляции
код | результаты
In file included from main.cpp:8:0:
num.cpp: In member function 'Num Num::operator*(int)':
num.cpp:13:3: error: 'int64' was not declared in this scope
   int64 answer = 0;
   ^~~~~
num.cpp:13:3: note: suggested alternative: 'int64_t'
   int64 answer = 0;
   ^~~~~
   int64_t
num.cpp:14:14: error: expected ';' before 'i'
   for (int64 i = 0; i < num; i++) {
              ^
num.cpp:14:21: error: 'i' was not declared in this scope
   for (int64 i = 0; i < num; i++) {
                     ^
num.cpp:15:5: error: 'answer' was not declared in this scope
     answer = (answer + value % modulo) % modulo;
     ^~~~~~
num.cpp:15:5: note: suggested alternative: 'assert'
     answer = (answer + value % modulo) % modulo;
     ^~~~~~
     assert
num.cpp:17:28: error: 'answer' was not declared in this scope
   return {static_cast<int>(answer), this->modulo};
                            ^~~~~~
num.cpp:17:28: note: suggested alternative: 'assert'
   return {static_cast<int>(answer), this->modulo};
                            ^~~~~~
                            assert
num.cpp:17:49: error: could not convert '{<expression error>, ((Num*)this)->Num::modulo}' from '<brace-enclosed initializer list>' to 'Num'
   return {static_cast<int>(answer), this->modulo};
                                                 ^
num.cpp: In member function 'Num& Num::operator*=(int)':
num.cpp:21:3: error: 'int64' was not declared in this scope
   int64 answer = 0;
   ^~~~~
num.cpp:21:3: note: suggested alternative: 'int64_t'
   int64 answer = 0;
   ^~~~~
   int64_t
num.cpp:22:14: error: expected ';' before 'i'
   for (int64 i = 0; i < num; i++) {
              ^
num.cpp:22:21: error: 'i' was not declared in this scope
   for (int64 i = 0; i < num; i++) {
                     ^
num.cpp:23:5: error: 'answer' was not declared in this scope
     answer = (answer + value % modulo) % modulo;
     ^~~~~~
num.cpp:23:5: note: suggested alternative: 'assert'
     answer = (answer + value % modulo) % modulo;
     ^~~~~~
     assert
num.cpp:25:34: error: 'answer' was not declared in this scope
   this->value = static_cast<int>(answer);
                                  ^~~~~~
num.cpp:25:34: note: suggested alternative: 'assert'
   this->value = static_cast<int>(answer);
                                  ^~~~~~
                                  assert
[печатать | |
]
(1 886 b)
0.104s 0.011s 10