Problem | parallelogramfest |
---|---|
User | shoryu386 |
Submission Time | 2023-06-04 13:51:41 |
Score | 0 |
Max Time | N/A |
Max Memory | N/A |
Owl Get a Life
parallelogramfest.cpp: In function ‘int main()’:
parallelogramfest.cpp:4:1174: error: no matching function for call to ‘min(int, long long int&)’
4 | main(){ios_base::sync_with_stdio(0); cin.tie(0);int n, q; cin >> n >> q;int fk[n][3];for (int y = 0; y < 3; y++) {for (int x = 0; x < n; x++) {cin >> fk[x][y];}}int psum[n][3], minpref[n][3], maxsuf[n][3]; for (int y = 0; y < 3; y++) {if(y==0){psum[0][y] = fk[0][0] * fk[0][1]; for (int x = 1; x < n; x++) {psum[x][y] = psum[x-1][y] + fk[x][0] * fk[x][1];}}else if (y==1){psum[0][y] = fk[0][0] * fk[0][2]; for (int x = 1; x < n; x++) {psum[x][y] = psum[x-1][y] + fk[x][0] * fk[x][2];}}else{psum[0][y] = fk[0][2] * fk[0][1]; for (int x = 1; x < n; x++) {psum[x][y] = psum[x-1][y] + fk[x][2] * fk[x][1];}} minpref[0][y] = psum[0][y]; for (int x = 1; x < n; x++) {minpref[x][y] = min(minpref[x-1][y], psum[x][y]);} maxsuf[n-1][y] = psum[n-1][y]; for (int x = n-2; x > -1; x--){maxsuf[x][y] = max(maxsu