Borderou de evaluare (job #806477)

Utilizator avatar klein Kleinknecht Dorin klein IP ascuns
Problemă Camelot Compilator cpp-32
Rundă Arhiva de probleme Status evaluat
Dată 25 ian. 2025 21:07:04 Scor 0

Raport evaluator

Eroare de compilare: main.cpp: In function 'int waysToMakeX(std::vector<int>&, int, int)': main.cpp:16:37: error: 'x' was not declared in this scope 16 | totalWays = (totalWays + dp[x % (maxx + 1)]) % mod; | ^ main.cpp: In function 'int main()': main.cpp:32:30: error: no match for 'operator=' (operand types are 'std::vector<int>' and 'int') 32 | r=waysToMakeX(l, n, limit); | ^ In file included from /usr/lib/gcc/i686-pc-linux-gnu/14/include/g++-v14/vector:72, from /usr/lib/gcc/i686-pc-linux-gnu/14/include/g++-v14/queue:63, from /usr/lib/gcc/i686-pc-linux-gnu/14/include/g++-v14/i686-pc-linux-gnu/bits/stdc++.h:157, from main.cpp:1: /usr/lib/gcc/i686-pc-linux-gnu/14/include/g++-v14/bits/vector.tcc:210:5: note: candidate: 'std::vector<_Tp, _Alloc>& std::vector<_Tp, _Alloc>::operator=(const std::vector<_Tp, _Alloc>&) [with _Tp = int; _Alloc = std::allocator<int>]' 210 | vector<_Tp, _Alloc>:: | ^~~~~~~~~~~~~~~~~~~ /usr/lib/gcc/i686-pc-linux-gnu/14/include/g++-v14/bits/vector.tcc:211:42: note: no known conversion for argument 1 from 'int' to 'const std::vector<int>&' 211 | operator=(const vector<_Tp, _Alloc>& __x) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~ In file included from /usr/lib/gcc/i686-pc-linux-gnu/14/include/g++-v14/vector:66: /usr/lib/gcc/i686-pc-linux-gnu/14/include/g++-v14/bits/stl_vector.h:766:7: note: candidate: 'std::vector<_Tp, _Alloc>& std::vector<_Tp, _Alloc>::operator=(std::vector<_Tp, _Alloc>&&) [with _Tp = int; _Alloc = std::allocator<int>]' 766 | operator=(vector&& __x) noexcept(_Alloc_traits::_S_nothrow_move()) | ^~~~~~~~ /usr/lib/gcc/i686-pc-linux-gnu/14/include/g++-v14/bits/stl_vector.h:766:26: note: no known conversion for argument 1 from 'int' to 'std::vector<int>&&' 766 | operator=(vector&& __x) noexcept(_Alloc_traits::_S_nothrow_move()) | ~~~~~~~~~^~~ /usr/lib/gcc/i686-pc-linux-gnu/14/include/g++-v14/bits/stl_vector.h:788:7: note: candidate: 'std::vector<_Tp, _Alloc>& std::vector<_Tp, _Alloc>::operator=(std::initializer_list<_Tp>) [with _Tp = int; _Alloc = std::allocator<int>]' 788 | operator=(initializer_list<value_type> __l) | ^~~~~~~~ /usr/lib/gcc/i686-pc-linux-gnu/14/include/g++-v14/bits/stl_vector.h:788:46: note: no known conversion for argument 1 from 'int' to 'std::initializer_list<int>' 788 | operator=(initializer_list<value_type> __l) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~ main.cpp:23:9: warning: unused variable 'firstTeam' [-Wunused-variable] 23 | int firstTeam=0, secondTeam=0; | ^~~~~~~~~