Borderou de evaluare (job #2102530)
Utilizator | Data | 8 ianuarie 2018 23:14:38 | |
---|---|---|---|
Problema | Biperm | Status | done |
Runda | Arhiva de probleme | Compilator | cpp | Vezi sursa |
Scor | 0 |
Raport evaluator
Eroare de compilare:
user.cpp: In function ‘void Read()’:
user.cpp:24:21: warning: format ‘%d’ expects argument of type ‘int*’, but argument 2 has type ‘short int*’ [-Wformat=]
scanf ("%d" , &n);
^
user.cpp:26:27: warning: format ‘%d’ expects argument of type ‘int*’, but argument 2 has type ‘short int*’ [-Wformat=]
scanf ( "%d" , &t );
^
user.cpp:34:31: warning: format ‘%d’ expects argument of type ‘int*’, but argument 2 has type ‘short int*’ [-Wformat=]
scanf ( "%d" , &t );
^
user.cpp: In function ‘void Solve()’:
user.cpp:74:32: error: no matching function for call to ‘min(short int&, int)’
res += min(sol,pasi-sol);
^
user.cpp:74:32: note: candidates are:
In file included from /usr/include/c++/4.8/bits/char_traits.h:39:0,
from /usr/include/c++/4.8/string:40,
from /usr/include/c++/4.8/bitset:47,
from user.cpp:2:
/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:74:32: note: deduced conflicting types for parameter ‘const _Tp’ (‘short int’ and ‘int’)
res += min(sol,pasi-sol);
^
In file included from /usr/include/c++/4.8/bits/char_traits.h:39:0,
from /usr/include/c++/4.8/string:40,
from /usr/include/c++/4.8/bitset:47,
from user.cpp:2:
/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:74:32: note: deduced conflicting types for parameter ‘const _Tp’ (‘short int’ and ‘int’)
res += min(sol,pasi-sol);
^
In file included from /usr/include/c++/4.8/algorithm:62:0,
from user.cpp:3:
/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:74:32: note: mismatched types ‘std::initializer_list<_Tp>’ and ‘short int’
res += min(sol,pasi-sol);
^
In file included from /usr/include/c++/4.8/algorithm:62:0,
from user.cpp:3:
/usr/include/c++/4.8/bits/stl_algo.h:4249:5: note: template<class _Tp, class _Compare> _Tp std::min(std::initializer_list<_Tp>, _Compare)
min(initializer_list<_Tp> __l, _Compare __comp)
Ceva nu functioneaza?
- Citeste despre borderoul de evaluare.
- Daca tot nu e bine, contacteaza-ne pe forum !