Problem | beareatrabbit |
---|---|
User | YongXin |
Submission Time | 2023-06-20 18:29:01 |
Score | 0 |
Max Time | N/A |
Max Memory | N/A |
Owl Get a Life
beareatrabbit.cpp: In function ‘void f(int, long long int*)’:
beareatrabbit.cpp:5:18: error: return-statement with a value, in function returning ‘void’ [-fpermissive]
5 | if (n<0) return 0;
| ^
beareatrabbit.cpp:6:31: error: return-statement with a value, in function returning ‘void’ [-fpermissive]
6 | if (m[n] != -1) return m[n];
| ^
beareatrabbit.cpp:7:31: error: invalid operands of types ‘long long int’ and ‘void’ to binary ‘operator+’
7 | long long r=max(f(n-1,a),a[n]+f(n-2,a));
| ~~~~^~~~~~~~~
| | |
| | void
| long long int
beareatrabbit.cpp:7:40: error: invalid use of void expression
7 | long long r=max(f(n-1,a),a[n]+f(n-2,a));
| ^
beareatrabbit.cpp:8:18: error: inval