Language: Java

import java.util.Scanner;
public class Main{
  public static void main(String args[]){
    int a = sc.nextInt();
    int[] b = new int[a];
    int[] c = new int[a];
    int[] d = new int[a-1];
    int ans = 0;
    for(i = 0;i < b.length;i++){
      b[i] = sc.nextInt();
    }
    for(j = 0;j < c.length;j++){
      c[j] = sc.nextInt();
    }
    for(x = 0;x < d.length;x++){
      d[x] = sc.nextInt();
    }
    for(y = 0;y < b.length;y++){
      ans += c[b[y]];
      if(b[y] == b[y+1]+1){
        ans += d[b[y]];
      }
    }  
    System.out.println(ans);
  }
}

Compiler output:
Main.java:4: error: cannot find symbol
    int a = sc.nextInt();
            ^
  symbol:   variable sc
  location: class Main
Main.java:9: error: cannot find symbol
    for(i = 0;i < b.length;i++){
        ^
  symbol:   variable i
  location: class Main
Main.java:9: error: cannot find symbol
    for(i = 0;i < b.length;i++){
              ^
  symbol:   variable i
  location: class Main
Main.java:9: error: cannot find symbol
    for(i = 0;i < b.length;i++){
                           ^
  symbol:   variable i
  location: class Main
Main.java:10: error: cannot find symbol
      b[i] = sc.nextInt();
        ^
  symbol:   variable i
  location: class Main
Main.java:10: error: cannot find symbol
      b[i] = sc.nextInt();
             ^
  symbol:   variable sc
  location: class Main
Main.java:12: error: cannot find symbol
    for(j = 0;j < c.length;j++){
        ^
  symbol:   variable j
  location: class Main
Main.java:12: error: cannot find symbol
    for(j = 0;j < c.length;j++){
              ^
  symbol:   variable j
  location: class Main
Main.java:12: error: cannot find symbol
    for(j = 0;j < c.length;j++){
                           ^
  symbol:   variable j
  location: class Main
Main.java:13: error: cannot find symbol
      c[j] = sc.nextInt();
        ^
  symbol:   variable j
  location: class Main
Main.java:13: error: cannot find symbol
      c[j] = sc.nextInt();
             ^
  symbol:   variable sc
  location: class Main
Main.java:15: error: cannot find symbol
    for(x = 0;x < d.length;x++){
        ^
  symbol:   variable x
  location: class Main
Main.java:15: error: cannot find symbol
    for(x = 0;x < d.length;x++){
              ^
  symbol:   variable x
  location: class Main
Main.java:15: error: cannot find symbol
    for(x = 0;x < d.length;x++){
                           ^
  symbol:   variable x
  location: class Main
Main.java:16: error: cannot find symbol
      d[x] = sc.nextInt();
        ^
  symbol:   variable x
  location: class Main
Main.java:16: error: cannot find symbol
      d[x] = sc.nextInt();
             ^
  symbol:   variable sc
  location: class Main
Main.java:18: error: cannot find symbol
    for(y = 0;y < b.length;y++){
        ^
  symbol:   variable y
  location: class Main
Main.java:18: error: cannot find symbol
    for(y = 0;y < b.length;y++){
              ^
  symbol:   variable y
  location: class Main
Main.java:18: error: cannot find symbol
    for(y = 0;y < b.length;y++){
                           ^
  symbol:   variable y
  location: class Main
Main.java:19: error: cannot find symbol
      ans += c[b[y]];
                 ^
  symbol:   variable y
  location: class Main
Main.java:20: error: cannot find symbol
      if(b[y] == b[y+1]+1){
           ^
  symbol:   variable y
  location: class Main
Main.java:20: error: cannot find symbol
      if(b[y] == b[y+1]+1){
                   ^
  symbol:   variable y
  location: class Main
Main.java:21: error: cannot find symbol
        ans += d[b[y]];
                   ^
  symbol:   variable y
  location: class Main
23 errors