Borderou de evaluare (job #1337306)
Utilizator | Data | 8 februarie 2015 20:44:55 | |
---|---|---|---|
Problema | Morcovi | Status | done |
Runda | Arhiva de probleme | Compilator | cpp | Vezi sursa |
Scor | 0 |
Raport evaluator
Eroare de compilare:
user.cpp: In function ‘int main()’:
user.cpp:14:27: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for ( int i = 1; i <= N; ++i )
^
user.cpp:17:27: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for ( int i = 1; i <= NrP; ++i )
^
user.cpp:20:26: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for ( int i = 0; i < N; ++i )
^
user.cpp:25:30: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for ( int p = 0; p < NrP; ++p )
^
user.cpp:29:39: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for ( int j = 1; j <= N; ++j )
^
user.cpp:33:38: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
if ( j+P[p+1] <= N )
^
user.cpp:40:27: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for ( int i = 1; i <= N; ++i )
^
user.cpp:41:39: error: no matching function for call to ‘max(unsigned int&, int&)’
Sol = max(D[(1<<NrP)-1][i],Sol);
^
user.cpp:41:39: note: candidates are:
In file included from /usr/include/c++/4.8/bits/char_traits.h:39:0,
from /usr/include/c++/4.8/ios:40,
from /usr/include/c++/4.8/istream:38,
from /usr/include/c++/4.8/fstream:38,
from user.cpp:1:
/usr/include/c++/4.8/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/include/c++/4.8/bits/stl_algobase.h:216:5: note: template argument deduction/substitution failed:
user.cpp:41:39: note: deduced conflicting types for parameter ‘const _Tp’ (‘unsigned int’ and ‘int’)
Sol = max(D[(1<<NrP)-1][i],Sol);
^
In file included from /usr/include/c++/4.8/bits/char_traits.h:39:0,
from /usr/include/c++/4.8/ios:40,
from /usr/include/c++/4.8/istream:38,
from /usr/include/c++/4.8/fstream:38,
from user.cpp:1:
/usr/include/c++/4.8/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/include/c++/4.8/bits/stl_algobase.h:260:5: note: template argument deduction/substitution failed:
user.cpp:41:39: note: deduced conflicting types for parameter ‘const _Tp’ (‘unsigned int’ and ‘int’)
Sol = max(D[(1<<NrP)-1][i],Sol);
^
Ceva nu functioneaza?
- Citeste despre borderoul de evaluare.
- Daca tot nu e bine, contacteaza-ne pe forum !