#396
SCLM
Se dă un șir cu n
elemente, numere naturale. Determinați un cel mai lung subșir crescător al șirului.
Problema | SCLM | Operații I/O |
sclm.in /sclm.out
|
---|---|---|---|
Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
Id soluție | #53965649 | Utilizator | |
Fișier | sclm.cpp | Dimensiune | 772 B |
Data încărcării | 16 Noiembrie 2024, 10:32 | Scor / rezultat | Eroare de compilare |
sclm.cpp: In function 'int main()': sclm.cpp:19:5: error: reference to 'next' is ambiguous next[n]=-1; ^ sclm.cpp:9:27: note: candidates are: int next [1005] int n, v[1005], lg[1005], next[1005]; ^ In file included from /usr/include/c++/4.8/bits/stl_algobase.h:66:0, from /usr/include/c++/4.8/bits/char_traits.h:39, from /usr/include/c++/4.8/ios:40, from /usr/include/c++/4.8/istream:38, from /usr/include/c++/4.8/fstream:38, from sclm.cpp:2: /usr/include/c++/4.8/bits/stl_iterator_base_funcs.h:184:5: note: template<class _ForwardIterator> _ForwardIterator std::next(_ForwardIterator, typename std::iterator_traits<_Iter>::difference_type) next(_ForwardIterator __x, typename ^ sclm.cpp:23:18: error: reference to 'next' is ambiguous lg[i]=1, next[i]=-1; ^ sclm.cpp:9:27: note: candidates are: int next [1005] int n, v[1005], lg[1005], next[1005]; ^ In file included from /usr/include/c++/4.8/bits/stl_algobase.h:66:0, from /usr/include/c++/4.8/bits/char_traits.h:39, from /usr/include/c++/4.8/ios:40, from /usr/include/c++/4.8/istream:38, from /usr/include/c++/4.8/fstream:38, from sclm.cpp:2: /usr/include/c++/4.8/bits/stl_iterator_base_funcs.h:184:5: note: template<class _ForwardIterator> _ForwardIterator std::next(_ForwardIterator, typename std::iterator_traits<_Iter>::difference_type) next(_ForwardIterator __x, typename ^ sclm.cpp:28:17: error: reference to 'next' is ambiguous next[i]=j; ^ sclm.cpp:9:27: note: candidates are: int next [1005] int n, v[1005], lg[1005], next[1005]; ^ In file included from /usr/include/c++/4.8/bits/stl_algobase.h:66:0, from /usr/include/c++/4.8/bits/char_traits.h:39, from /usr/include/c++/4.8/ios:40, from /usr/include/c++/4.8/istream:38, from /usr/include/c++/4.8/fstream:38, from sclm.cpp:2: /usr/include/c++/4.8/bits/stl_iterator_base_funcs.h:184:5: note: template<class _ForwardIterator> _ForwardIterator std::next(_ForwardIterator, typename std::iterator_traits<_Iter>::difference_type) next(_ForwardIterator __x, typename ^ sclm.cpp:41:11: error: reference to 'next' is ambiguous p=next[p]; ^ sclm.cpp:9:27: note: candidates are: int next [1005] int n, v[1005], lg[1005], next[1005]; ^ In file included from /usr/include/c++/4.8/bits/stl_algobase.h:66:0, from /usr/include/c++/4.8/bits/char_traits.h:39, from /usr/include/c++/4.8/ios:40, from /usr/include/c++/4.8/istream:38, from /usr/include/c++/4.8/fstream:38, from sclm.cpp:2: /usr/include/c++/4.8/bits/stl_iterator_base_funcs.h:184:5: note: template<class _ForwardIterator> _ForwardIterator std::next(_ForwardIterator, typename std::iterator_traits<_Iter>::difference_type) next(_ForwardIterator __x, typename ^
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema SCLM face parte din prima categorie. Soluția propusă de tine va fi evaluată astfel:
Suma punctajelor acordate pe testele utilizate pentru verificare este 100. Astfel, soluția ta poate obține cel mult 100 de puncte, caz în care se poate considera corectă.