Borderou de evaluare (job #784129)
Utilizator | Data | 4 septembrie 2012 23:11:03 | |
---|---|---|---|
Problema | Zmeu2 | 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:26:33: warning: format ‘%i’ expects argument of type ‘int*’, but argument 2 has type ‘short int*’ [-Wformat=]
scanf("%i %i %i", &N, &P, &K);
^
user.cpp:26:33: warning: format ‘%i’ expects argument of type ‘int*’, but argument 3 has type ‘short int*’ [-Wformat=]
user.cpp:26:33: warning: format ‘%i’ expects argument of type ‘int*’, but argument 4 has type ‘short int*’ [-Wformat=]
user.cpp:28:38: warning: format ‘%i’ expects argument of type ‘int*’, but argument 2 has type ‘short int*’ [-Wformat=]
scanf("%i %i", &D[i], &C[i]);
^
user.cpp:28:38: warning: format ‘%i’ expects argument of type ‘int*’, but argument 3 has type ‘short int*’ [-Wformat=]
user.cpp:31:26: warning: overflow in implicit constant conversion [-Woverflow]
dp[i][j] = inf;
^
user.cpp:34:32: warning: format ‘%i’ expects argument of type ‘int*’, but argument 2 has type ‘short int*’ [-Wformat=]
scanf("%i %i", &X, &Y);
^
user.cpp:34:32: warning: format ‘%i’ expects argument of type ‘int*’, but argument 3 has type ‘short int*’ [-Wformat=]
user.cpp:42:34: error: no matching function for call to ‘min(int&, short int&)’
ans = min(ans, dp[P][i]);
^
user.cpp:42:34: note: candidates are:
In file included from /usr/include/c++/4.8/deque:60:0,
from /usr/include/c++/4.8/queue:60,
from user.cpp:4:
/usr/include/c++/4.8/bits/stl_algobase.h:193:5: note: template<class _Tp> const _Tp& std::min(const _Tp&, const _Tp&)
min(const _Tp& __a, const _Tp& __b)
^
/usr/include/c++/4.8/bits/stl_algobase.h:193:5: note: template argument deduction/substitution failed:
user.cpp:42:34: note: deduced conflicting types for parameter ‘const _Tp’ (‘int’ and ‘short int’)
ans = min(ans, dp[P][i]);
^
In file included from /usr/include/c++/4.8/deque:60:0,
from /usr/include/c++/4.8/queue:60,
from user.cpp:4:
/usr/include/c++/4.8/bits/stl_algobase.h:239:5: note: template<class _Tp, class _Compare> const _Tp& std::min(const _Tp&, const _Tp&, _Compare)
min(const _Tp& __a, const _Tp& __b, _Compare __comp)
^
/usr/include/c++/4.8/bits/stl_algobase.h:239:5: note: template argument deduction/substitution failed:
user.cpp:42:34: note: deduced conflicting types for parameter ‘const _Tp’ (‘int’ and ‘short int’)
ans = min(ans, dp[P][i]);
^
In file included from /usr/include/c++/4.8/algorithm:62:0,
from user.cpp:5:
/usr/include/c++/4.8/bits/stl_algo.h:4244:5: note: template<class _Tp> _Tp std::min(std::initializer_list<_Tp>)
min(initializer_list<_Tp> __l)
^
/usr/include/c++/4.8/bits/stl_algo.h:4244:5: note: template argument deduction/substitution failed:
user.cpp:42:34: note: mismatched types ‘std::initializer_list<_Tp>’ and ‘int’
ans = min(ans, dp[P][i]);
^
Ceva nu functioneaza?
- Citeste despre borderoul de evaluare.
- Daca tot nu e bine, contacteaza-ne pe forum !