mosaic.cpp: In function 'std::vector<long long int> mosaic(std::vector<int>, std::vector<int>, std::vector<int>, std::vector<int>, std::vector<int>, std::vector<int>)':
mosaic.cpp:12:28: error: 'pref' was not declared in this scope
12 | for(int i = 1;i<n;i++) pref[i] = pref[i-1] + x[i];
| ^~~~
mosaic.cpp:15:16: error: 'grid' was not declared in this scope
15 | if(grid[i-1][j] == 0 && grid[i][j-1] == 0) grid[i][j] = 1;
| ^~~~
mosaic.cpp:22:19: error: 'pref' was not declared in this scope
22 | ans = pref[r];
| ^~~~
mosaic.cpp:24:19: error: 'pref' was not declared in this scope
24 | ans = pref[r] - pref[l - 1];
| ^~~~