Problem | lunchcombo |
---|---|
User | bribritt |
Submission Time | 2023-03-24 13:49:23 |
Score | 0 |
Max Time | N/A |
Max Memory | N/A |
Owl Get a Life
lunchcombo.cpp:5:38: error: expected ‘,’ or ‘...’ before ‘preB’
5 | ii cntSubArr(int A[], int B[], int[] preB, int M, int S, int V) {
| ^~~~
lunchcombo.cpp: In function ‘ii cntSubArr(long long int*, long long int*, long long int*)’:
lunchcombo.cpp:6:16: error: ‘S’ was not declared in this scope
6 | int rptr = S - 1, ans = 0, cnt = 0;
| ^
lunchcombo.cpp:7:24: error: ‘M’ was not declared in this scope
7 | for(int i = 0; i < M; i++) {
| ^
lunchcombo.cpp:8:45: error: ‘V’ was not declared in this scope
8 | while(rptr >= 0 && A[i] + B[rptr] > V) rptr--;
| ^
lunchcombo.cpp:9:9: error: ‘cnt’ was not declared in this scope; did you mean ‘int’?
9 | cnt += (rptr + 1); if(rptr != -1) ans += preB[rptr];
| ^~~
| int
lunchcombo.cp