Borderou de evaluare (job #2271705)
Utilizator | Data | 29 octombrie 2018 09:22:39 | |
---|---|---|---|
Problema | Patrate | Status | done |
Runda | Arhiva de probleme | Compilator | cpp-64 | Vezi sursa |
Scor | 0 |
Raport evaluator
Eroare de compilare:
main.cpp:9:16: error: 'int y1' redeclared as different kind of symbol
int x1 = MAXN, y1 = MAXN, x2 = 0, y2 = 0;
^~
In file included from /usr/include/features.h:367:0,
from /usr/include/x86_64-linux-gnu/c++/6/bits/os_defines.h:39,
from /usr/include/x86_64-linux-gnu/c++/6/bits/c++config.h:507,
from /usr/include/c++/6/cassert:43,
from /usr/include/x86_64-linux-gnu/c++/6/bits/stdc++.h:33,
from main.cpp:1:
/usr/include/x86_64-linux-gnu/bits/mathcalls.h:251:1: note: previous declaration 'double y1(double)'
__MATHCALL (y1,, (_Mdouble_));
^
main.cpp: In function 'bool check(int)':
main.cpp:49:22: error: invalid conversion from 'double (*)(double) throw ()' to 'int' [-fpermissive]
if(ok(x1, y1, len)) {
^
main.cpp:16:13: note: initializing argument 2 of 'bool ok(int, int, int)'
inline bool ok(int x, int y, int len) {
^~
main.cpp:55:28: error: invalid conversion from 'double (*)(double) throw ()' to 'int' [-fpermissive]
if(ok(x2 - len, y1, len)) {
^
main.cpp:16:13: note: initializing argument 2 of 'bool ok(int, int, int)'
inline bool ok(int x, int y, int len) {
^~
main.cpp: In function 'int main()':
main.cpp:71:23: error: no matching function for call to 'min(double (&)(double) throw (), int&)'
y1 = min(y1, y), y2 = max(y2, y);
^
In file included from /usr/include/c++/6/bits/char_traits.h:39:0,
from /usr/include/c++/6/ios:40,
from /usr/include/c++/6/istream:38,
from /usr/include/c++/6/sstream:38,
from /usr/include/c++/6/complex:45,
from /usr/include/c++/6/ccomplex:39,
from /usr/include/x86_64-linux-gnu/c++/6/bits/stdc++.h:52,
from main.cpp:1:
/usr/include/c++/6/bits/stl_algobase.h:195:5: note: candidate: template<class _Tp> constexpr const _Tp& std::min(const _Tp&, const _Tp&)
min(const _Tp& __a, const _Tp& __b)
^~~
/usr/include/c++/6/bits/stl_algobase.h:195:5: note: template argument deduction/substitution failed:
main.cpp:71:23: note: deduced conflicting types for parameter 'const _Tp' ('double(double) throw ()' and 'int')
y1 = min(y1, y), y2 = max(y2, y);
^
In file included from /usr/include/c++/6/bits/char_traits.h:39:0,
from /usr/include/c++/6/ios:40,
from /usr/include/c++/6/istream:38,
from /usr/include/c++/6/sstream:38,
from /usr/include/c++/6/complex:45,
from /usr/include/c++/6/ccomplex:39,
Non zero exit status: 1
Ceva nu functioneaza?
- Citeste despre borderoul de evaluare.
- Daca tot nu e bine, contacteaza-ne pe forum !