candies.cpp: In function 'std::vector<int> distribute_candies(std::vector<int>, std::vector<int>, std::vector<int>, std::vector<int>)':
candies.cpp:10:19: error: 'q' was not declared in this scope
10 | if (n <= 2000 && q <= 2000) {
| ^
candies.cpp:20:10: error: 'll' was not declared in this scope; did you mean 'l'?
20 | vector<ll> pfs(n + 1);
| ^~
| l
candies.cpp:20:12: error: template argument 1 is invalid
20 | vector<ll> pfs(n + 1);
| ^
candies.cpp:20:12: error: template argument 2 is invalid
candies.cpp:22:7: error: invalid types 'int[__gnu_cxx::__alloc_traits<std::allocator<int>, int>::value_type {aka int}]' for array subscript
22 | pfs[l[i]] -= v[i];
| ^
candies.cpp:23:7: error: invalid types 'int[__gnu_cxx::__alloc_traits<std::allocator<int>, int>::value_type {aka int}]' for array subscript
23 | pfs[r[i]] += v[i];
| ^
candies.cpp:26:7: error: invalid types 'int[int]' for array subscript
26 | pfs[i + 1] += pfs[i];
| ^
candies.cpp:26:21: error: invalid types 'int[int]' for array subscript
26 | pfs[i + 1] += pfs[i];
| ^
candies.cpp:30:30: error: invalid types 'int[int]' for array subscript
30 | a[i] = min(1LL * c[i], pfs[i]);
| ^