QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#751063#9566. Topologyucup-team4741Compile Error//C++204.2kb2024-11-15 16:56:242024-11-15 16:56:25

Details

answer.code: In function ‘void solve()’:
answer.code:162:41: error: cannot bind non-const lvalue reference of type ‘std::vector<long long int>&’ to an rvalue of type ‘std::vector<long long int>’
  162 |         cout << f[i] * g[i][i] % MOD * C(n - i, {sz[i] - 1, n - i - (sz[i] - 1)}) % MOD << " ";
      |                                        ~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/13/vector:66,
                 from /usr/include/c++/13/functional:64,
                 from /usr/include/x86_64-linux-gnu/c++/13/bits/stdc++.h:53,
                 from answer.code:1:
/usr/include/c++/13/bits/stl_vector.h:675:7: note:   after user-defined conversion: ‘constexpr std::vector<_Tp, _Alloc>::vector(std::initializer_list<_Tp>, const allocator_type&) [with _Tp = long long int; _Alloc = std::allocator<long long int>; allocator_type = std::allocator<long long int>]’
  675 |       vector(initializer_list<value_type> __l,
      |       ^~~~~~
answer.code:40:26: note:   initializing argument 2 of ‘ll C(ll, std::vector<long long int>&)’
   40 | ll C(int n, vector<int>& m) {
      |             ~~~~~~~~~~~~~^