Borderou de evaluare (job #3033277)

Utilizator bent_larsenSturzu Antonio-Gabriel bent_larsen Data 23 martie 2023 17:48:45
Problema Zuma Status done
Runda Arhiva de probleme Compilator cpp-64 | Vezi sursa
Scor 0

Raport evaluator

Eroare de compilare: main.cpp: In function 'void build()': main.cpp:16:25: warning: comparison of integer expressions of different signedness: 'int' and 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'} [-Wsign-compare] 16 | for(int i = 1;i < s.size();++i) | ~~^~~~~~~~~~ main.cpp:26:17: error: reference to 'next' is ambiguous 26 | next[i] = last[s[i] - 'A']; | ^~~~ In file included from /usr/include/c++/12.2.1/bits/stl_algobase.h:66, 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, 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:8:5: note: 'int next [505][26]' 8 | int next[nmax][26]; | ^~~~ main.cpp: In function 'int solve(int, int, int)': main.cpp:81:15: error: reference to 'next' is ambiguous 81 | while(next[i] != -1 && next[i] <= right) | ^~~~ /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:8:5: note: 'int next [505][26]' 8 | int next[nmax][26]; | ^~~~ main.cpp:81:32: error: reference to 'next' is ambiguous 81 | while(next[i] != -1 && next[i] <= right) | ^~~~ /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:8:5: note: 'int next [505][26]' 8 | int next[nmax][26]; | ^~~~ main.cpp:83:36: error: reference to 'next' is ambiguous 83 | if(check(left + 1, next[i] - 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:8:5: note: 'int next [505][26]' 8 | int next[nmax][26]; | ^~~~ main.cpp:84:46: error: reference to 'next' is ambiguous 84 | ans = min(ans, solve(next[i], right, cnt + 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)' Non zero exit status: 1

Ceva nu functioneaza?