Borderou de evaluare (job #3037709)
Utilizator | Data | 26 martie 2023 11:30:42 | |
---|---|---|---|
Problema | Secvmin | Status | done |
Runda | Arhiva de probleme | Compilator | cpp-64 | Vezi sursa |
Scor | 0 |
Raport evaluator
Eroare de compilare:
main.cpp: In function 'int main()':
main.cpp:37:13: error: reference to 'next' is ambiguous
37 | next[i] = prev[v2[p+1]];
| ^~~~
In file included from /usr/include/c++/12.2.1/bits/stl_construct.h:62,
from /usr/include/c++/12.2.1/bits/char_traits.h:46,
from /usr/include/c++/12.2.1/ios:40,
from /usr/include/c++/12.2.1/istream:38,
from /usr/include/c++/12.2.1/fstream:38,
from main.cpp:1:
/usr/include/c++/12.2.1/bits/stl_iterator_base_funcs.h:230:5: note: candidates are: 'template<class _InputIterator> constexpr _InputIterator std::next(_InputIterator, typename iterator_traits<_Iter>::difference_type)'
230 | next(_InputIterator __x, typename
| ^~~~
main.cpp:11:48: note: 'int next [100005]'
11 | int v1[nmax], v2[nmax], poz[nmax], temp[nmax], next[nmax], prev[nmax];
| ^~~~
main.cpp:37:23: error: reference to 'prev' is ambiguous
37 | next[i] = prev[v2[p+1]];
| ^~~~
/usr/include/c++/12.2.1/bits/stl_iterator_base_funcs.h:242:5: note: candidates are: 'template<class _BidirectionalIterator> constexpr _BidirectionalIterator std::prev(_BidirectionalIterator, typename iterator_traits<_Iter>::difference_type)'
242 | prev(_BidirectionalIterator __x, typename
| ^~~~
main.cpp:11:60: note: 'int prev [100005]'
11 | int v1[nmax], v2[nmax], poz[nmax], temp[nmax], next[nmax], prev[nmax];
| ^~~~
main.cpp:38:9: error: reference to 'prev' is ambiguous
38 | prev[v1[i]]=i;
| ^~~~
/usr/include/c++/12.2.1/bits/stl_iterator_base_funcs.h:242:5: note: candidates are: 'template<class _BidirectionalIterator> constexpr _BidirectionalIterator std::prev(_BidirectionalIterator, typename iterator_traits<_Iter>::difference_type)'
242 | prev(_BidirectionalIterator __x, typename
| ^~~~
main.cpp:11:60: note: 'int prev [100005]'
11 | int v1[nmax], v2[nmax], poz[nmax], temp[nmax], next[nmax], prev[nmax];
| ^~~~
main.cpp:43:28: error: reference to 'next' is ambiguous
43 | temp[i] = temp[next[i]];
| ^~~~
/usr/include/c++/12.2.1/bits/stl_iterator_base_funcs.h:230:5: note: candidates are: 'template<class _InputIterator> constexpr _InputIterator std::next(_InputIterator, typename iterator_traits<_Iter>::difference_type)'
230 | next(_InputIterator __x, typename
| ^~~~
main.cpp:11:48: note: 'int next [100005]'
11 | int v1[nmax], v2[nmax], poz[nmax], temp[nmax], next[nmax], prev[nmax];
| ^~~~
Non zero exit status: 1
Ceva nu functioneaza?
- Citeste despre borderoul de evaluare.
- Daca tot nu e bine, contacteaza-ne pe forum !