Problem deque
User Pyrros
Submission Time 2024-02-16 09:57:47
Score 0
Max Time N/A
Max Memory N/A

Compile Error

deque.cpp: In function ‘ll sol(int, int)’:
deque.cpp:13:23: error: cannot bind non-const lvalue reference of type ‘int&’ to an rvalue of type ‘int’
13 | int &ans = dp[l][r];
| ^
deque.cpp:20:8: error: conflicting declaration ‘ll ans’
20 | ll ans = max(c1, c2);
| ^~~
deque.cpp:13:10: note: previous declaration as ‘int& ans’
13 | int &ans = dp[l][r];
| ^~~