Borderou de evaluare (job #2736777)

Utilizator Stefan_BerlinschiStefan-Cristian Berlinschi Stefan_Berlinschi Data 3 aprilie 2021 21:16:12
Problema Muzica 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:52:28: error: no match for 'operator[]' (operand types are 'std::vector<int>' and 'std::vector<int>::iterator {aka __gnu_cxx::__normal_iterator<int*, std::vector<int> >}') Aparitie[Ri2 % MOD][caut] = 1; ^ In file included from /usr/include/c++/6/vector:64:0, from main.cpp:2: /usr/include/c++/6/bits/stl_vector.h:780:7: note: candidate: std::vector<_Tp, _Alloc>::reference std::vector<_Tp, _Alloc>::operator[](std::vector<_Tp, _Alloc>::size_type) [with _Tp = int; _Alloc = std::allocator<int>; std::vector<_Tp, _Alloc>::reference = int&; std::vector<_Tp, _Alloc>::size_type = long unsigned int] operator[](size_type __n) _GLIBCXX_NOEXCEPT ^~~~~~~~ /usr/include/c++/6/bits/stl_vector.h:780:7: note: no known conversion for argument 1 from 'std::vector<int>::iterator {aka __gnu_cxx::__normal_iterator<int*, std::vector<int> >}' to 'std::vector<int>::size_type {aka long unsigned int}' /usr/include/c++/6/bits/stl_vector.h:795:7: note: candidate: std::vector<_Tp, _Alloc>::const_reference std::vector<_Tp, _Alloc>::operator[](std::vector<_Tp, _Alloc>::size_type) const [with _Tp = int; _Alloc = std::allocator<int>; std::vector<_Tp, _Alloc>::const_reference = const int&; std::vector<_Tp, _Alloc>::size_type = long unsigned int] operator[](size_type __n) const _GLIBCXX_NOEXCEPT ^~~~~~~~ /usr/include/c++/6/bits/stl_vector.h:795:7: note: no known conversion for argument 1 from 'std::vector<int>::iterator {aka __gnu_cxx::__normal_iterator<int*, std::vector<int> >}' to 'std::vector<int>::size_type {aka long unsigned int}' main.cpp:58:28: error: no match for 'operator[]' (operand types are 'std::vector<int>' and 'std::vector<int>::iterator {aka __gnu_cxx::__normal_iterator<int*, std::vector<int> >}') Aparitie[Ri1 % MOD][caut] = 1; ^ In file included from /usr/include/c++/6/vector:64:0, from main.cpp:2: /usr/include/c++/6/bits/stl_vector.h:780:7: note: candidate: std::vector<_Tp, _Alloc>::reference std::vector<_Tp, _Alloc>::operator[](std::vector<_Tp, _Alloc>::size_type) [with _Tp = int; _Alloc = std::allocator<int>; std::vector<_Tp, _Alloc>::reference = int&; std::vector<_Tp, _Alloc>::size_type = long unsigned int] operator[](size_type __n) _GLIBCXX_NOEXCEPT ^~~~~~~~ /usr/include/c++/6/bits/stl_vector.h:780:7: note: no known conversion for argument 1 from 'std::vector<int>::iterator {aka __gnu_cxx::__normal_iterator<int*, std::vector<int> >}' to 'std::vector<int>::size_type {aka long unsigned int}' /usr/include/c++/6/bits/stl_vector.h:795:7: note: candidate: std::vector<_Tp, _Alloc>::const_reference std::vector<_Tp, _Alloc>::operator[](std::vector<_Tp, _Alloc>::size_type) const [with _Tp = int; _Alloc = std::allocator<int>; std::vector<_Tp, _Alloc>::const_reference = const int&; std::vector<_Tp, _Alloc>::size_type = long unsigned int] operator[](size_type __n) const _GLIBCXX_NOEXCEPT ^~~~~~~~ /usr/include/c++/6/bits/stl_vector.h:795:7: note: no known conversion for argument 1 from 'std::vector<int>::iterator {aka __gnu_cxx::__normal_iterator<int*, std::vector<int> >}' to 'std::vector<int>::size_type {aka long unsigned int}' main.cpp:66:63: error: no match for 'operator[]' (operand types are 'std::vector<int>' and 'std::vector<int>::iterator {aka __gnu_cxx::__normal_iterator<int*, std::vector<int> >}') if (caut != Hash[Ri % MOD].end() && Aparitie[Ri % MOD][caut] == 0) { ^ In file included from /usr/include/c++/6/vector:64:0, from main.cpp:2: /usr/include/c++/6/bits/stl_vector.h:780:7: note: candidate: std::vector<_Tp, _Alloc>::reference std::vector<_Tp, _Alloc>::operator[](std::vector<_Tp, _Alloc>::size_type) [with _Tp = int; _Alloc = std::allocator<int>; std::vector<_Tp, _Alloc>::reference = int&; std::vector<_Tp, _Alloc>::size_type = long unsigned int] operator[](size_type __n) _GLIBCXX_NOEXCEPT ^~~~~~~~ /usr/include/c++/6/bits/stl_vector.h:780:7: note: no known conversion for argument 1 from 'std::vector<int>::iterator {aka __gnu_cxx::__normal_iterator<int*, std::vector<int> >}' to 'std::vector<int>::size_type {aka long unsigned int}' /usr/include/c++/6/bits/stl_vector.h:795:7: note: candidate: std::vector<_Tp, _Alloc>::const_reference std::vector<_Tp, _Alloc>::operator[](std::vector<_Tp, _Alloc>::size_type) const [with _Tp = int; _Alloc = std::allocator<int>; std::vector<_Tp, _Alloc>::const_reference = const int&; std::vector<_Tp, _Alloc>::size_type = long unsigned int] operator[](size_type __n) const _GLIBCXX_NOEXCEPT ^~~~~~~~ /usr/include/c++/6/bits/stl_vector.h:795:7: note: no known conversion for argument 1 from 'std::vector<int>::iterator {aka __gnu_cxx::__normal_iterator<int*, std::vector<int> >}' to 'std::vector<int>::size_type {aka long unsigned int}' main.cpp:68:31: error: no match for 'operator[]' (operand types are 'std::vector<int>' and 'std::vector<int>::iterator {aka __gnu_cxx::__normal_iterator<int*, std::vector<int> >}') Aparitie[Ri % MOD][caut] = 1; ^ In file included from /usr/include/c++/6/vector:64:0, from main.cpp:2: /usr/include/c++/6/bits/stl_vector.h:780:7: note: candidate: std::vector<_Tp, _Alloc>::reference std::vector<_Tp, _Alloc>::operator[](std::vector<_Tp, _Alloc>::size_type) [with _Tp = int; _Alloc = std::allocator<int>; std::vector<_Tp, _Alloc>::reference = int&; std::vector<_Tp, _Alloc>::size_type = long unsigned int] operator[](size_type __n) _GLIBCXX_NOEXCEPT ^~~~~~~~ /usr/include/c++/6/bits/stl_vector.h:780:7: note: no known conversion for argument 1 from 'std::vector<int>::iterator {aka __gnu_cxx::__normal_iterator<int*, std::vector<int> >}' to 'std::vector<int>::size_type {aka long unsigned int}' /usr/include/c++/6/bits/stl_vector.h:795:7: note: candidate: std::vector<_Tp, _Alloc>::const_reference std::vector<_Tp, _Alloc>::operator[](std::vector<_Tp, _Alloc>::size_type) const [with _Tp = int; _Alloc = std::allocator<int>; std::vector<_Tp, _Alloc>::const_reference = const int&; std::vector<_Tp, _Alloc>::size_type = long unsigned int] Non zero exit status: 1

Ceva nu functioneaza?