Borderou de evaluare (job #737906)
Utilizator |
|
IP | ascuns |
---|---|---|---|
Problemă | Hashuri (clasa a 9-a) | Compilator | cpp-32 |
Rundă | Arhiva de probleme | Status | evaluat |
Dată | 14 oct. 2023 13:43:23 | Scor | 0 |
Raport evaluator
Eroare de compilare:
main.cpp: In function 'int poz(int)':
main.cpp:24:13: error: reference to 'next' is ambiguous
24 | i = next[ i ];
| ^~~~
In file included from /usr/lib/gcc/i686-pc-linux-gnu/12/include/g++-v12/string:46,
from /usr/lib/gcc/i686-pc-linux-gnu/12/include/g++-v12/bits/locale_classes.h:40,
from /usr/lib/gcc/i686-pc-linux-gnu/12/include/g++-v12/bits/ios_base.h:41,
from /usr/lib/gcc/i686-pc-linux-gnu/12/include/g++-v12/ios:42,
from /usr/lib/gcc/i686-pc-linux-gnu/12/include/g++-v12/istream:38,
from /usr/lib/gcc/i686-pc-linux-gnu/12/include/g++-v12/fstream:38,
from main.cpp:1:
/usr/lib/gcc/i686-pc-linux-gnu/12/include/g++-v12/bits/stl_iterator_base_funcs.h:230:5: note: candidates are: 'template<class _InputIterator> _InputIterator std::next(_InputIterator, typename iterator_traits<_Iter>::difference_type)'
230 | next(_InputIterator __x, typename
| ^~~~
main.cpp:9:25: note: 'int next [1000001]'
9 | int lists[ MODUL + 1 ], next[ MAXN + 1 ], valori[ MAXN + 1 ], m;
| ^~~~
main.cpp: In function 'void adaugare(int)':
main.cpp:36:9: error: reference to 'next' is ambiguous
36 | next[ m ] = lists[ cod ];
| ^~~~
/usr/lib/gcc/i686-pc-linux-gnu/12/include/g++-v12/bits/stl_iterator_base_funcs.h:230:5: note: candidates are: 'template<class _InputIterator> _InputIterator std::next(_InputIterator, typename iterator_traits<_Iter>::difference_type)'
230 | next(_InputIterator __x, typename
| ^~~~
main.cpp:9:25: note: 'int next [1000001]'
9 | int lists[ MODUL + 1 ], next[ MAXN + 1 ], valori[ MAXN + 1 ], m;
| ^~~~
main.cpp: In function 'void stergere(int)':
main.cpp:47:24: error: reference to 'next' is ambiguous
47 | lists[ cod ] = next[ lists[ cod ] ];
| ^~~~
/usr/lib/gcc/i686-pc-linux-gnu/12/include/g++-v12/bits/stl_iterator_base_funcs.h:230:5: note: candidates are: 'template<class _InputIterator> _InputIterator std::next(_InputIterator, typename iterator_traits<_Iter>::difference_type)'
230 | next(_InputIterator __x, typename
| ^~~~
main.cpp:9:25: note: 'int next [1000001]'
9 | int lists[ MODUL + 1 ], next[ MAXN + 1 ], valori[ MAXN + 1 ], m;
| ^~~~
main.cpp: In function 'bool cautare(int)':
main.cpp:53:9: warning: unused variable 'cod' [-Wunused-variable]
53 | int cod = a % MODUL;
| ^~~