Problem | smallprimes |
---|---|
User | LiuZq |
Submission Time | 2025-03-14 23:08:31 |
Score | 0 |
Max Time | N/A |
Max Memory | N/A |
Owl Get a Life
smallprimes.cpp:6:86: error: cannot bind non-const lvalue reference of type ‘std::vector<int>&’ to an rvalue of type ‘std::vector<int>’
6 | ll count_nice(ll x, ll num = 1, int prime_idx = 0, vector<int>& primes = {2, 3, 5, 7}) {
| ^
In file included from /usr/include/c++/9/vector:67,
from /usr/include/c++/9/functional:62,
from /usr/include/c++/9/pstl/glue_algorithm_defs.h:13,
from /usr/include/c++/9/algorithm:71,
from /usr/include/x86_64-linux-gnu/c++/9/bits/stdc++.h:65,
from smallprimes.cpp:1:
/usr/include/c++/9/bits/stl_vector.h:622:7: note: after user-defined conversion: ‘std::vector<_Tp, _Alloc>::vector(std::initializer_list<_Tp>, const allocator_type&) [with _Tp = int; _Alloc = std::allocator<int>; std::vector<_Tp, _Alloc>::allocator_