Language: Java

import java.util.Scanner;
public class Main{
 public static void main(String[] args) {
   Scanner kbd = new Scanner(System.in);
   int x=kbd.nextInt();
   int y=kbd.nextInt();
   int a=kbd.nextInt();
   int b=kbd.nextInt();
   int c=kbd.nextInt();
   int[] r = new int[b];
   for(int i=0;i<a;i++){
     r[i]=kbd.nextInt();
   int[] gg = new int[a];
 }
    for(int i=0;i<b;i++){
     g[i]=kbd.nextInt();
   int[] mm = new int[c];
 }
    for(int i=0;i<c;i++){
     mm[i]=kbd.nextInt();
   }

  int temp;
  for(int i=0;i<a-1;i++){
    for(int j=0;j<a-i-1;j++){
      if(r[j]<r[j+1]){
        temp=r[j];
        r[j]=r[j+1];
        r[j+1]=temp;
      }
    }
  }//小さい方が良い数値
  for(int i=0;i<b-1;i++){
    for(int j=0;j<b-i-1;j++){
      if(gg[j]<gg[j+1]){
        temp=gg[j];
        gg[j]=gg[j+1];
        gg[j+1]=temp;
      }
    }
  }
  for(int i=0;i<c-1;i++){
    for(int j=0;j<c-i-1;j++){
      if(mm[j]<mm[j+1]){
        temp=mm[j];
        mm[j]=mm[j+1];
        mm[j+1]=temp;
      }
    }
  }

  int CA=0;//Aのカウント
  int CB=0;
  for(int i=0;i<x;i++){
  if(mm[0]<r[i]){
    CA=CA+1;
  }
}
  for(int i=0;i<y;i++){
  if(mm[0]<gg[i]){
    CB=CB+1;
  }
}
  int p=CA;
  int q=CB;
  int n=0;
  while(CA<x+1||CB<y+1){
  for(int i=p;i<x;i++){
  if(r[i-1]<gg[q-1]){
    r[i-1]=mm[n];
    CA=CA+1;
    n=n+1;
  }
}

  for(int i=q;i<y;i++){
  if(r[n-1]<g[i-1]){
  gg[i-1]=mm[i-1+n];
  CB=CB+1;
  n=n+1;
}
}
}
  while(CA<x+1&&n<=c){
    for(int i=n;n<c;n++){
    r[i-1]=mm[n];
    CA=CA+1;
    n=n+1;
  }
}
while(CB<y+1&&n<=c){
  for(int i=n;n<c;n++){
    gg[i-1]=mm[n];
    CB=CB+1;
    n=n+1;
  }
}
int u=0;
int v=0;
for(int i=0;i<x;i++){
  u=u+r[i];
}
for(int i=0;i<y;i++){
  v=v+gg[i];
}
System.out.println(u+v);
}
}


Compiler output:
Main.java:16: error: cannot find symbol
     g[i]=kbd.nextInt();
     ^
  symbol:   variable g
  location: class Main
Main.java:20: error: cannot find symbol
     mm[i]=kbd.nextInt();
     ^
  symbol:   variable mm
  location: class Main
Main.java:35: error: cannot find symbol
      if(gg[j]<gg[j+1]){
         ^
  symbol:   variable gg
  location: class Main
Main.java:35: error: cannot find symbol
      if(gg[j]<gg[j+1]){
               ^
  symbol:   variable gg
  location: class Main
Main.java:36: error: cannot find symbol
        temp=gg[j];
             ^
  symbol:   variable gg
  location: class Main
Main.java:37: error: cannot find symbol
        gg[j]=gg[j+1];
        ^
  symbol:   variable gg
  location: class Main
Main.java:37: error: cannot find symbol
        gg[j]=gg[j+1];
              ^
  symbol:   variable gg
  location: class Main
Main.java:38: error: cannot find symbol
        gg[j+1]=temp;
        ^
  symbol:   variable gg
  location: class Main
Main.java:44: error: cannot find symbol
      if(mm[j]<mm[j+1]){
         ^
  symbol:   variable mm
  location: class Main
Main.java:44: error: cannot find symbol
      if(mm[j]<mm[j+1]){
               ^
  symbol:   variable mm
  location: class Main
Main.java:45: error: cannot find symbol
        temp=mm[j];
             ^
  symbol:   variable mm
  location: class Main
Main.java:46: error: cannot find symbol
        mm[j]=mm[j+1];
        ^
  symbol:   variable mm
  location: class Main
Main.java:46: error: cannot find symbol
        mm[j]=mm[j+1];
              ^
  symbol:   variable mm
  location: class Main
Main.java:47: error: cannot find symbol
        mm[j+1]=temp;
        ^
  symbol:   variable mm
  location: class Main
Main.java:55: error: cannot find symbol
  if(mm[0]<r[i]){
     ^
  symbol:   variable mm
  location: class Main
Main.java:60: error: cannot find symbol
  if(mm[0]<gg[i]){
     ^
  symbol:   variable mm
  location: class Main
Main.java:60: error: cannot find symbol
  if(mm[0]<gg[i]){
           ^
  symbol:   variable gg
  location: class Main
Main.java:69: error: cannot find symbol
  if(r[i-1]<gg[q-1]){
            ^
  symbol:   variable gg
  location: class Main
Main.java:70: error: cannot find symbol
    r[i-1]=mm[n];
           ^
  symbol:   variable mm
  location: class Main
Main.java:77: error: cannot find symbol
  if(r[n-1]<g[i-1]){
            ^
  symbol:   variable g
  location: class Main
Main.java:78: error: cannot find symbol
  gg[i-1]=mm[i-1+n];
  ^
  symbol:   variable gg
  location: class Main
Main.java:78: error: cannot find symbol
  gg[i-1]=mm[i-1+n];
          ^
  symbol:   variable mm
  location: class Main
Main.java:86: error: cannot find symbol
    r[i-1]=mm[n];
           ^
  symbol:   variable mm
  location: class Main
Main.java:93: error: cannot find symbol
    gg[i-1]=mm[n];
    ^
  symbol:   variable gg
  location: class Main
Main.java:93: error: cannot find symbol
    gg[i-1]=mm[n];
            ^
  symbol:   variable mm
  location: class Main
Main.java:104: error: cannot find symbol
  v=v+gg[i];
      ^
  symbol:   variable gg
  location: class Main
26 errors