Borderou de evaluare (job #696894)
Utilizator |
|
IP | ascuns |
---|---|---|---|
Problemă | Suma K (clasa a 8-a) | Compilator | cpp-32 |
Rundă | Arhiva de probleme | Status | evaluat |
Dată | 18 feb. 2023 13:49:46 | Scor | 0 |
Raport evaluator
Eroare de compilare:
main.cpp: In function 'void debug(std::vector<long long int>)':
main.cpp:50:21: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<long long int>::size_type' {aka 'unsigned int'} [-Wsign-compare]
50 | for(int i = 0;i < v.size();i++) cout << v[i] << ' ';
| ~~^~~~~~~~~~
main.cpp: In function 'std::string decToBin(int, int)':
main.cpp:69:22: warning: comparison of integer expressions of different signedness: 'std::__cxx11::basic_string<char>::size_type' {aka 'unsigned int'} and 'int' [-Wsign-compare]
69 | while(ans.size() < sz) ans.insert(ans.begin(), '0');
| ~~~~~~~~~~~^~~~
main.cpp:62:9: warning: unused variable 'it' [-Wunused-variable]
62 | int it = 0;
| ^~
main.cpp: In function 'int main()':
main.cpp:95:31: error: no match for 'operator=' (operand types are 'std::vector<long long int>' and 'long long int')
95 | if(nr < 0) ng[it++] = nr;
| ^~
In file included from /usr/lib/gcc/i686-pc-linux-gnu/11/include/g++-v11/vector:72,
from /usr/lib/gcc/i686-pc-linux-gnu/11/include/g++-v11/queue:61,
from main.cpp:32:
/usr/lib/gcc/i686-pc-linux-gnu/11/include/g++-v11/bits/vector.tcc:198:5: note: candidate: 'std::vector<_Tp, _Alloc>& std::vector<_Tp, _Alloc>::operator=(const std::vector<_Tp, _Alloc>&) [with _Tp = long long int; _Alloc = std::allocator<long long int>]'
198 | vector<_Tp, _Alloc>::
| ^~~~~~~~~~~~~~~~~~~
/usr/lib/gcc/i686-pc-linux-gnu/11/include/g++-v11/bits/vector.tcc:199:42: note: no known conversion for argument 1 from 'long long int' to 'const std::vector<long long int>&'
199 | operator=(const vector<_Tp, _Alloc>& __x)
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~
In file included from /usr/lib/gcc/i686-pc-linux-gnu/11/include/g++-v11/vector:67,
from /usr/lib/gcc/i686-pc-linux-gnu/11/include/g++-v11/queue:61,
from main.cpp:32:
/usr/lib/gcc/i686-pc-linux-gnu/11/include/g++-v11/bits/stl_vector.h:709:7: note: candidate: 'std::vector<_Tp, _Alloc>& std::vector<_Tp, _Alloc>::operator=(std::vector<_Tp, _Alloc>&&) [with _Tp = long long int; _Alloc = std::allocator<long long int>]'
709 | operator=(vector&& __x) noexcept(_Alloc_traits::_S_nothrow_move())
| ^~~~~~~~
/usr/lib/gcc/i686-pc-linux-gnu/11/include/g++-v11/bits/stl_vector.h:709:26: note: no known conversion for argument 1 from 'long long int' to 'std::vector<long long int>&&'
709 | operator=(vector&& __x) noexcept(_Alloc_traits::_S_nothrow_move())
| ~~~~~~~~~^~~
/usr/lib/gcc/i686-pc-linux-gnu/11/include/g++-v11/bits/stl_vector.h:730:7: note: candidate: 'std::vector<_Tp, _Alloc>& std::vector<_Tp, _Alloc>::operator=(std::initializer_list<_Tp>) [with _Tp = long long int; _Alloc = std::allocator<long long int>]'
730 | operator=(initializer_list<value_type> __l)
| ^~~~~~~~
/usr/lib/gcc/i686-pc-linux-gnu/11/include/g++-v11/bits/stl_vector.h:730:46: note: no known conversion for argument 1 from 'long long int' to 'std::initializer_list<long long int>'
730 | operator=(initializer_list<value_type> __l)
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~
main.cpp:105:36: error: request for member 'size' in 'ng', which is of non-class type 'std::vector<long long int> [100000]'
105 | for(int i = 0;i < k and i < ng.size();i++)
| ^~~~
main.cpp:107:18: error: no match for 'operator<' (operand types are 'std::vector<long long int>' and 'int')
107 | if(ng[i] < 0)
| ~~~~~ ^ ~
| | |
| | int
| std::vector<long long int>
In file included from /usr/lib/gcc/i686-pc-linux-gnu/11/include/g++-v11/utility:70,
from /usr/lib/gcc/i686-pc-linux-gnu/11/include/g++-v11/algorithm:60,