Problem gravity
User PlayVoltz
Submission Time 2024-01-13 16:19:29
Score 0
Max Time N/A
Max Memory N/A

Compile Error

gravity.cpp: In function ‘void gravity()’:
gravity.cpp:34:10: error: invalid types ‘long long int[long long int]’ for array subscript
34 | dy[y][x]=d;
| ^
gravity.cpp:35:21: error: invalid types ‘long long int[long long int]’ for array subscript
35 | pq.push(mp(dy[y][x]+1, mp(mp(y, x), !flip)));
| ^
gravity.cpp:36:31: error: invalid types ‘long long int[long long int]’ for array subscript
36 | if (x+1<m)pq.push(mp(dy[y][x], mp(mp(y, x+1), flip)));
| ^
gravity.cpp:37:32: error: invalid types ‘long long int[long long int]’ for array subscript
37 | if (x-1>=0)pq.push(mp(dy[y][x], mp(mp(y, x-1), flip)));
| ^
gravity.cpp:39:45: error: return-statement with a value, in function returning ‘void’ [-fpermissive]
39 | return dj[ey][ex]==LLONG_MAX/2?-1:dj[ey][ex];
|