Borderou de evaluare (job #2133622)
Utilizator | Data | 17 februarie 2018 10:32:46 | |
---|---|---|---|
Problema | Armonica | Status | done |
Runda | Arhiva de probleme | Compilator | cpp | Vezi sursa |
Scor | 0 |
Raport evaluator
Eroare de compilare:
user.cpp:8:18: error: ‘std::vector<int> div’ redeclared as different kind of symbol
std::vector<int> div;
^
In file included from /usr/include/c++/5/cstdlib:72:0,
from /usr/include/c++/5/ext/string_conversions.h:41,
from /usr/include/c++/5/bits/basic_string.h:5249,
from /usr/include/c++/5/string:52,
from /usr/include/c++/5/bits/locale_classes.h:40,
from /usr/include/c++/5/bits/ios_base.h:41,
from /usr/include/c++/5/ios:42,
from /usr/include/c++/5/istream:38,
from /usr/include/c++/5/fstream:38,
from user.cpp:1:
/usr/include/stdlib.h:788:14: note: previous declaration ‘div_t div(int, int)’
extern div_t div (int __numer, int __denom)
^
user.cpp: In function ‘void prepare()’:
user.cpp:15:8: error: request for member ‘push_back’ in ‘div’, which is of non-class type ‘div_t(int, int) throw ()’
div.push_back(i);
^
user.cpp:16:8: error: request for member ‘push_back’ in ‘div’, which is of non-class type ‘div_t(int, int) throw ()’
div.push_back(b / i);
^
user.cpp: In function ‘void solve()’:
user.cpp:22:26: error: request for member ‘size’ in ‘div’, which is of non-class type ‘div_t(int, int) throw ()’
for (int i = 0; i < div.size(); ++i) {
^
user.cpp:23:27: error: request for member ‘size’ in ‘div’, which is of non-class type ‘div_t(int, int) throw ()’
for (int j = i; j < div.size(); ++j) {
^
user.cpp:24:29: warning: pointer to a function used in arithmetic [-Wpointer-arith]
long long p = 1LL * div[i] * div[j];
^
user.cpp:24:29: error: invalid operands of types ‘long long int’ and ‘div_t(int, int) throw ()’ to binary ‘operator*’
user.cpp:24:38: warning: pointer to a function used in arithmetic [-Wpointer-arith]
long long p = 1LL * div[i] * div[j];
^
user.cpp:26:28: warning: pointer to a function used in arithmetic [-Wpointer-arith]
long long a = (b / div[i]) * c / div[j];
^
user.cpp:26:28: error: invalid operands of types ‘int’ and ‘div_t(int, int) throw ()’ to binary ‘operator/’
user.cpp:26:42: warning: pointer to a function used in arithmetic [-Wpointer-arith]
long long a = (b / div[i]) * c / div[j];
^
Ceva nu functioneaza?
- Citeste despre borderoul de evaluare.
- Daca tot nu e bine, contacteaza-ne pe forum !