Problem 4russians
User VNHbest
Submission Time 2026-03-21 22:19:50
Score 0
Max Time N/A
Max Memory N/A

Compile Error

4russians.cpp: In function ‘int main()’:
4russians.cpp:45:42: error: cannot bind non-const lvalue reference of type ‘long long int&’ to an rvalue of type ‘long long int’
45 | dp[i][j][1] = calc(i, j, 1 );
| ^
4russians.cpp:9:28: note: initializing argument 3 of ‘long long int calc(long long int&, long long int&, long long int&)’
9 | ll calc (ll &i, ll &j, ll &state) {
| ^
4russians.cpp:49:60: error: cannot bind non-const lvalue reference of type ‘long long int&’ to an rvalue of type ‘long long int’
49 | dp[i][j][1] = dp[i - 1][j - 1][0] + calc(i, j, 0);
| ^
4russians.cpp:9:28: note: initializing argument 3 of ‘long long int calc(long long int&, long long int&, long long int&)’
9 | ll calc (ll &i, ll &j, ll &state) {
| ^
4russi