Borderou de evaluare (job #985925)
Utilizator | Data | 17 august 2013 14:35:23 | |
---|---|---|---|
Problema | Rectangles | Status | done |
Runda | Concursul Mihai Patrascu 2013 | Compilator | cpp | Vezi sursa |
Scor | 0 |
Raport evaluator
Eroare de compilare:
user.cpp:8:9: error: ‘int y1’ redeclared as different kind of symbol
int x1, y1, x2, y2, d[NMAX][NMAX], Sol, n, Maxx, Maxy, ap[NMAX];
^
In file included from /usr/include/features.h:346:0,
from /usr/include/stdio.h:28,
from user.cpp:1:
/usr/include/bits/mathcalls.h:242:1: error: previous declaration of ‘double y1(double)’
__MATHCALL (y1,, (_Mdouble_));
^
user.cpp: In function ‘int main()’:
user.cpp:16:48: warning: format ‘%d’ expects argument of type ‘int*’, but argument 3 has type ‘double (*)(double)throw ()’ [-Wformat=]
scanf("%d %d %d %d", &x1, &y1, &x2, &y2);
^
user.cpp:18:30: warning: pointer to a function used in arithmetic [-Wpointer-arith]
for(int k = y1 + 1; k <= y2 + 1; ++ k)
^
user.cpp:18:28: error: invalid conversion from ‘double (*)(double)throw ()’ to ‘int’ [-fpermissive]
for(int k = y1 + 1; k <= y2 + 1; ++ k)
^
user.cpp:22:31: warning: pointer to a function used in arithmetic [-Wpointer-arith]
Maxy = max(Maxy, y1 + 1);
^
user.cpp:22:32: error: no matching function for call to ‘max(int&, double (*)(double)throw ())’
Maxy = max(Maxy, y1 + 1);
^
user.cpp:22:32: note: candidates are:
In file included from /usr/local/include/c++/4.8.0/algorithm:61:0,
from user.cpp:2:
/usr/local/include/c++/4.8.0/bits/stl_algobase.h:216:5: note: template<class _Tp> const _Tp& std::max(const _Tp&, const _Tp&)
max(const _Tp& __a, const _Tp& __b)
^
/usr/local/include/c++/4.8.0/bits/stl_algobase.h:216:5: note: template argument deduction/substitution failed:
user.cpp:22:32: note: deduced conflicting types for parameter ‘const _Tp’ (‘int’ and ‘double (*)(double)throw ()’)
Maxy = max(Maxy, y1 + 1);
^
In file included from /usr/local/include/c++/4.8.0/algorithm:61:0,
from user.cpp:2:
/usr/local/include/c++/4.8.0/bits/stl_algobase.h:260:5: note: template<class _Tp, class _Compare> const _Tp& std::max(const _Tp&, const _Tp&, _Compare)
max(const _Tp& __a, const _Tp& __b, _Compare __comp)
^
/usr/local/include/c++/4.8.0/bits/stl_algobase.h:260:5: note: template argument deduction/substitution failed:
user.cpp:22:32: note: deduced conflicting types for parameter ‘const _Tp’ (‘int’ and ‘double (*)(double)throw ()’)
Maxy = max(Maxy, y1 + 1);
^
In file included from /usr/local/include/c++/4.8.0/algorithm:62:0,
from user.cpp:2:
/usr/local/include/c++/4.8.0/bits/stl_algo.h:4254:5: note: template<class _Tp> _Tp std::max(std::initializer_list<_Tp>)
max(initializer_list<_Tp> __l)
^
/usr/local/include/c++/4.8.0/bits/stl_algo.h:4254:5: note: template argument deduction/substitution failed:
Ceva nu functioneaza?
- Citeste despre borderoul de evaluare.
- Daca tot nu e bine, contacteaza-ne pe forum !