/ SeriousOJ /

Record Detail

Compile Error

foo.cc: In function 'int main()':
foo.cc:73:58: error: cannot bind non-const lvalue reference of type 'std::vector<long long int>&' to an rvalue of type 'std::vector<long long int>'
   73 |             answer = max(answer, getMaxPathSumFrom(root, vector<ll>(a, a + N + 1)));
      |                                                          ^~~~~~~~~~~~~~~~~~~~~~~~
foo.cc:27:41: note:   initializing argument 2 of 'll getMaxPathSumFrom(int, std::vector<long long int>&)'
   27 | ll getMaxPathSumFrom(int u, vector<ll>& vals) {
      |                             ~~~~~~~~~~~~^~~~

Information

Submit By
Type
Submission
Language
C++17 (G++ 13.2.0)
Submit At
2025-05-20 09:16:37
Judged At
2025-05-20 09:16:37
Judged By
Score
0
Total Time
0ms
Peak Memory
0 Bytes