Borderou de evaluare (job #3283550)
Utilizator | Data | 9 martie 2025 19:50:49 | |
---|---|---|---|
Problema | Războiul lui Vlăduț | Status | done |
Runda | arhiva-utcn | Compilator | cpp-64 | Vezi sursa |
Scor | 0 |
Raport evaluator
Eroare de compilare:
main.cpp: In function 'int main()':
main.cpp:13:7: error: reference to 'max' is ambiguous
13 | max=0;
| ^~~
In file included from /usr/include/c++/12.2.1/algorithm:61,
from /usr/include/c++/12.2.1/x86_64-pc-linux-gnu/bits/stdc++.h:65,
from main.cpp:1:
/usr/include/c++/12.2.1/bits/stl_algo.h:5756:5: note: candidates are: 'template<class _Tp, class _Compare> constexpr _Tp std::max(initializer_list<_Tp>, _Compare)'
5756 | max(initializer_list<_Tp> __l, _Compare __comp)
| ^~~
/usr/include/c++/12.2.1/bits/stl_algo.h:5746:5: note: 'template<class _Tp> constexpr _Tp std::max(initializer_list<_Tp>)'
5746 | max(initializer_list<_Tp> __l)
| ^~~
In file included from /usr/include/c++/12.2.1/bits/specfun.h:45,
from /usr/include/c++/12.2.1/cmath:1935,
from /usr/include/c++/12.2.1/x86_64-pc-linux-gnu/bits/stdc++.h:41:
/usr/include/c++/12.2.1/bits/stl_algobase.h:300:5: note: 'template<class _Tp, class _Compare> constexpr const _Tp& std::max(const _Tp&, const _Tp&, _Compare)'
300 | max(const _Tp& __a, const _Tp& __b, _Compare __comp)
| ^~~
/usr/include/c++/12.2.1/bits/stl_algobase.h:254:5: note: 'template<class _Tp> constexpr const _Tp& std::max(const _Tp&, const _Tp&)'
254 | max(const _Tp& __a, const _Tp& __b)
| ^~~
main.cpp:5:27: note: 'int max'
5 | int t, n, a[105][105], e, max;
| ^~~
main.cpp:27:52: error: reference to 'max' is ambiguous
27 | if(a[i][j]-a[k][j]-a[i][l]+a[k][l]>max)
| ^~~
/usr/include/c++/12.2.1/bits/stl_algo.h:5756:5: note: candidates are: 'template<class _Tp, class _Compare> constexpr _Tp std::max(initializer_list<_Tp>, _Compare)'
5756 | max(initializer_list<_Tp> __l, _Compare __comp)
| ^~~
/usr/include/c++/12.2.1/bits/stl_algo.h:5746:5: note: 'template<class _Tp> constexpr _Tp std::max(initializer_list<_Tp>)'
5746 | max(initializer_list<_Tp> __l)
| ^~~
/usr/include/c++/12.2.1/bits/stl_algobase.h:300:5: note: 'template<class _Tp, class _Compare> constexpr const _Tp& std::max(const _Tp&, const _Tp&, _Compare)'
300 | max(const _Tp& __a, const _Tp& __b, _Compare __comp)
| ^~~
/usr/include/c++/12.2.1/bits/stl_algobase.h:254:5: note: 'template<class _Tp> constexpr const _Tp& std::max(const _Tp&, const _Tp&)'
254 | max(const _Tp& __a, const _Tp& __b)
| ^~~
main.cpp:5:27: note: 'int max'
5 | int t, n, a[105][105], e, max;
| ^~~
main.cpp:28:19: error: reference to 'max' is ambiguous
28 | max=a[i][j]-a[k][j]-a[i][l]+a[k][l];
| ^~~
/usr/include/c++/12.2.1/bits/stl_algo.h:5756:5: note: candidates are: 'template<class _Tp, class _Compare> constexpr _Tp std::max(initializer_list<_Tp>, _Compare)'
5756 | max(initializer_list<_Tp> __l, _Compare __comp)
| ^~~
/usr/include/c++/12.2.1/bits/stl_algo.h:5746:5: note: 'template<class _Tp> constexpr _Tp std::max(initializer_list<_Tp>)'
Non zero exit status: 1
Ceva nu functioneaza?
- Citeste despre borderoul de evaluare.
- Daca tot nu e bine, contacteaza-ne pe forum !