Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main(){
  int red,green,red_sum,green_sum,white_sum;
  cin >> red>>green>>red_sum>>green_sum>>white_sum;
  int red_point[red_sum],green_point[green_sum],white_point[white_sum];
  for(int i=0;i<red_sum;i++){
    cin >> red_point[i];
  }
  sort(red_point.begin(),red_point.end())
  for(i=0;i<green_sum;i++){
    cin >> green_point[i];
  }
  sort(green_point.begin(),green_point.end())
  for(i=0;i<white_sum;i++){
    cin >> white_point[i];
  }
  sort(white_point.begin(),white_point.end())
  int sweetest_red[red],sweetest_green[green],ans[red+green+white_sum];
  for(i=0;i<red;i++){
    ans[i] = red_point[i];
  }
  for(i=0;i<green;i++){
    ans[red+i] = green_point[i];
  }
  for(i=0;i<white_sum;i++){
    ans[red+green+i] = whie_point[i];
  }
  sort(ans.begin(),ans.end())
  int answer;
  for(i=0;i<red+green;i++){
    answer+=ans[i];
  }
  cout << answer << endl;
  return 0;
}
  

Compiler output:
a.cc: In function 'int main()':
a.cc:11:18: error: request for member 'begin' in 'red_point', which is of non-class type 'int [red_sum]'
   11 |   sort(red_point.begin(),red_point.end())
      |                  ^~~~~
a.cc:11:36: error: request for member 'end' in 'red_point', which is of non-class type 'int [red_sum]'
   11 |   sort(red_point.begin(),red_point.end())
      |                                    ^~~
a.cc:12:11: error: 'i' was not declared in this scope
   12 |   for(i=0;i<green_sum;i++){
      |           ^
a.cc:15:20: error: request for member 'begin' in 'green_point', which is of non-class type 'int [green_sum]'
   15 |   sort(green_point.begin(),green_point.end())
      |                    ^~~~~
a.cc:15:40: error: request for member 'end' in 'green_point', which is of non-class type 'int [green_sum]'
   15 |   sort(green_point.begin(),green_point.end())
      |                                        ^~~
a.cc:19:20: error: request for member 'begin' in 'white_point', which is of non-class type 'int [white_sum]'
   19 |   sort(white_point.begin(),white_point.end())
      |                    ^~~~~
a.cc:19:40: error: request for member 'end' in 'white_point', which is of non-class type 'int [white_sum]'
   19 |   sort(white_point.begin(),white_point.end())
      |                                        ^~~
a.cc:22:5: error: 'ans' was not declared in this scope; did you mean 'abs'?
   22 |     ans[i] = red_point[i];
      |     ^~~
      |     abs
a.cc:25:5: error: 'ans' was not declared in this scope; did you mean 'abs'?
   25 |     ans[red+i] = green_point[i];
      |     ^~~
      |     abs
a.cc:28:5: error: 'ans' was not declared in this scope; did you mean 'abs'?
   28 |     ans[red+green+i] = whie_point[i];
      |     ^~~
      |     abs
a.cc:28:24: error: 'whie_point' was not declared in this scope; did you mean 'white_point'?
   28 |     ans[red+green+i] = whie_point[i];
      |                        ^~~~~~~~~~
      |                        white_point
a.cc:30:8: error: 'ans' was not declared in this scope; did you mean 'abs'?
   30 |   sort(ans.begin(),ans.end())
      |        ^~~
      |        abs
a.cc:33:5: error: 'answer' was not declared in this scope
   33 |     answer+=ans[i];
      |     ^~~~~~
a.cc:35:11: error: 'answer' was not declared in this scope
   35 |   cout << answer << endl;
      |           ^~~~~~