Borderou de evaluare (job #2755449)
Utilizator | Data | 27 mai 2021 12:20:22 | |
---|---|---|---|
Problema | Joctv | Status | done |
Runda | Arhiva de probleme | Compilator | cpp-64 | Vezi sursa |
Scor | 0 |
Raport evaluator
Eroare de compilare:
main.cpp:5:52: error: conflicting declaration 'long long int s'
long long i,j,n,maxim,a[101][101],s[101][101],i2,k,s;
^
main.cpp:5:35: note: previous declaration as 'long long int s [101][101]'
long long i,j,n,maxim,a[101][101],s[101][101],i2,k,s;
^
main.cpp: In function 'int main()':
main.cpp:20:15: error: incompatible types in assignment of 'int' to 'long long int [101][101]'
s=0;
^
main.cpp:23:23: error: 'sp' was not declared in this scope
s=max(sp[j][k]-sp[i-1][k], s+sp[j][k]-sp[i-1][k]);
^~
main.cpp:24:35: error: no matching function for call to 'max(long long int&, long long int [101][101])'
maxim=max(maxim, s);
^
In file included from /usr/include/c++/6/bits/char_traits.h:39:0,
from /usr/include/c++/6/ios:40,
from /usr/include/c++/6/istream:38,
from /usr/include/c++/6/fstream:38,
from main.cpp:1:
/usr/include/c++/6/bits/stl_algobase.h:219:5: note: candidate: template<class _Tp> constexpr const _Tp& std::max(const _Tp&, const _Tp&)
max(const _Tp& __a, const _Tp& __b)
^~~
/usr/include/c++/6/bits/stl_algobase.h:219:5: note: template argument deduction/substitution failed:
main.cpp:24:35: note: deduced conflicting types for parameter 'const _Tp' ('long long int' and 'long long int [101][101]')
maxim=max(maxim, s);
^
In file included from /usr/include/c++/6/bits/char_traits.h:39:0,
from /usr/include/c++/6/ios:40,
from /usr/include/c++/6/istream:38,
from /usr/include/c++/6/fstream:38,
from main.cpp:1:
/usr/include/c++/6/bits/stl_algobase.h:265:5: note: candidate: template<class _Tp, class _Compare> constexpr const _Tp& std::max(const _Tp&, const _Tp&, _Compare)
max(const _Tp& __a, const _Tp& __b, _Compare __comp)
^~~
/usr/include/c++/6/bits/stl_algobase.h:265:5: note: template argument deduction/substitution failed:
main.cpp:24:35: note: deduced conflicting types for parameter 'const _Tp' ('long long int' and 'long long int [101][101]')
maxim=max(maxim, s);
^
Non zero exit status: 1
Ceva nu functioneaza?
- Citeste despre borderoul de evaluare.
- Daca tot nu e bine, contacteaza-ne pe forum !