Borderou de evaluare (job #3301079)
| Utilizator | Data | 21 iunie 2025 14:45:22 | |
|---|---|---|---|
| Problema | Infasuratoare convexa | Status | done |
| Runda | Arhiva educationala | Compilator | cpp-64 | Vezi sursa |
| Scor | 0 | ||
Raport evaluator
Eroare de compilare:
main.cpp: In function 'int main()':
main.cpp:30:13: error: reference to 'ref' is ambiguous
30 | ref = i;
| ^~~
In file included from /usr/include/c++/12.2.1/string:51,
from /usr/include/c++/12.2.1/bits/locale_classes.h:40,
from /usr/include/c++/12.2.1/bits/ios_base.h:41,
from /usr/include/c++/12.2.1/ios:42,
from /usr/include/c++/12.2.1/istream:38,
from /usr/include/c++/12.2.1/sstream:38,
from /usr/include/c++/12.2.1/complex:45,
from /usr/include/c++/12.2.1/ccomplex:39,
from /usr/include/c++/12.2.1/x86_64-pc-linux-gnu/bits/stdc++.h:54,
from main.cpp:1:
/usr/include/c++/12.2.1/bits/refwrap.h:393:5: note: candidates are: 'template<class _Tp> constexpr std::reference_wrapper<_Tp> std::ref(reference_wrapper<_Tp>)'
393 | ref(reference_wrapper<_Tp> __t) noexcept
| ^~~
/usr/include/c++/12.2.1/bits/refwrap.h:384:10: note: 'template<class _Tp> void std::ref(const _Tp&&)'
384 | void ref(const _Tp&&) = delete;
| ^~~
/usr/include/c++/12.2.1/bits/refwrap.h:373:5: note: 'template<class _Tp> constexpr std::reference_wrapper<_Tp> std::ref(_Tp&)'
373 | ref(_Tp& __t) noexcept
| ^~~
main.cpp:11:26: note: 'int ref'
11 | int n, stk[150005], top, ref;
| ^~~
main.cpp:39:18: error: reference to 'ref' is ambiguous
39 | swap(a[1], a[ref]);
| ^~~
/usr/include/c++/12.2.1/bits/refwrap.h:393:5: note: candidates are: 'template<class _Tp> constexpr std::reference_wrapper<_Tp> std::ref(reference_wrapper<_Tp>)'
393 | ref(reference_wrapper<_Tp> __t) noexcept
| ^~~
/usr/include/c++/12.2.1/bits/refwrap.h:384:10: note: 'template<class _Tp> void std::ref(const _Tp&&)'
384 | void ref(const _Tp&&) = delete;
| ^~~
/usr/include/c++/12.2.1/bits/refwrap.h:373:5: note: 'template<class _Tp> constexpr std::reference_wrapper<_Tp> std::ref(_Tp&)'
373 | ref(_Tp& __t) noexcept
| ^~~
main.cpp:11:26: note: 'int ref'
11 | int n, stk[150005], top, ref;
| ^~~
Non zero exit status: 1
Ceva nu functioneaza?
- Citeste despre borderoul de evaluare.
- Daca tot nu e bine, contacteaza-ne pe forum !
