Borderou de evaluare (job #1597156)
Utilizator | Data | 11 februarie 2016 18:54:48 | |
---|---|---|---|
Problema | Taxi | Status | done |
Runda | Arhiva de probleme | Compilator | cpp | Vezi sursa |
Scor | 0 |
Raport evaluator
Eroare de compilare:
user.cpp:6:17: error: ‘int y1’ redeclared as different kind of symbol
int T,N,M,x1,x2,y1,y2;
^
In file included from /usr/include/features.h:357:0,
from /usr/include/i386-linux-gnu/c++/4.8/bits/os_defines.h:39,
from /usr/include/i386-linux-gnu/c++/4.8/bits/c++config.h:420,
from /usr/include/c++/4.8/cstdio:41,
from user.cpp:1:
/usr/include/i386-linux-gnu/bits/mathcalls.h:243:1: error: previous declaration of ‘double y1(double)’
__MATHCALL (y1,, (_Mdouble_));
^
user.cpp: In function ‘int main()’:
user.cpp:14:58: warning: format ‘%d’ expects argument of type ‘int*’, but argument 5 has type ‘double (*)(double)throw ()’ [-Wformat=]
scanf("%d %d %d %d %d %d\n",&N,&M,&x1,&y1,&x2,&y2);
^
user.cpp:15:17: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
if(y1 > y2)swap(x1,x2),swap(y1,y2);
^
user.cpp:15:42: error: no matching function for call to ‘swap(double (&)(double)throw (), int&)’
if(y1 > y2)swap(x1,x2),swap(y1,y2);
^
user.cpp:15:42: note: candidates are:
In file included from /usr/include/c++/4.8/bits/stl_pair.h:59:0,
from /usr/include/c++/4.8/utility:70,
from /usr/include/c++/4.8/algorithm:60,
from user.cpp:2:
/usr/include/c++/4.8/bits/move.h:166:5: note: template<class _Tp> void std::swap(_Tp&, _Tp&)
swap(_Tp& __a, _Tp& __b)
^
/usr/include/c++/4.8/bits/move.h:166:5: note: template argument deduction/substitution failed:
user.cpp:15:42: note: deduced conflicting types for parameter ‘_Tp’ (‘double(double)throw ()’ and ‘int’)
if(y1 > y2)swap(x1,x2),swap(y1,y2);
^
In file included from /usr/include/c++/4.8/bits/stl_pair.h:59:0,
from /usr/include/c++/4.8/utility:70,
from /usr/include/c++/4.8/algorithm:60,
from user.cpp:2:
/usr/include/c++/4.8/bits/move.h:185:5: note: template<class _Tp, unsigned int _Nm> void std::swap(_Tp (&)[_Nm], _Tp (&)[_Nm])
swap(_Tp (&__a)[_Nm], _Tp (&__b)[_Nm])
^
/usr/include/c++/4.8/bits/move.h:185:5: note: template argument deduction/substitution failed:
user.cpp:15:42: note: mismatched types ‘_Tp [_Nm]’ and ‘double(double)throw ()’
if(y1 > y2)swap(x1,x2),swap(y1,y2);
^
In file included from /usr/include/c++/4.8/utility:70:0,
from /usr/include/c++/4.8/algorithm:60,
from user.cpp:2:
/usr/include/c++/4.8/bits/stl_pair.h:254:5: note: template<class _T1, class _T2> void std::swap(std::pair<_T1, _T2>&, std::pair<_T1, _T2>&)
swap(pair<_T1, _T2>& __x, pair<_T1, _T2>& __y)
^
Ceva nu functioneaza?
- Citeste despre borderoul de evaluare.
- Daca tot nu e bine, contacteaza-ne pe forum !