Language: C++

#include <stdio.h>
#include <stdlib.h>

int main(void){
    int n, i, a, b, c, l0, l1, l2, l3, l4, l5, l6, l7, minmp = 32760, aa, bb, cc, mp;
    scanf("%d %d %d %d", &n, &a, &b, &c);
    int l[8];
    for(i=0; i<8; i++) l[i] = 0;
    for(i=0; i<n; i++) scanf("%d", &l[i]);
    
    for(l0=0; l0<4; l0++){
    for(l1=0; l1<4; l1++){
    for(l2=0; l2<4; l2++){
    for(l3=0; l3<4; l3++){
    for(l4=0; l4<4; l4++){
    for(l5=0; l5<4; l5++){
    for(l6=0; l6<4; l6++){
    for(l7=0; l7<4; l7++){
        mp = -30;
        aa = 0;
        bb = 0;
        cc = 0;
        if(l0 == 1){aa += l[0]; mp += 10}
        if(l0 == 2){bb += l[0]; mp += 10}
        if(l0 == 3){cc += l[0]; mp += 10}
        if(l1 == 1){aa += l[1]; mp += 10}
        if(l1 == 2){bb += l[1]; mp += 10}
        if(l1 == 3){cc += l[1]; mp += 10}
        if(l2 == 1){aa += l[2]; mp += 10}
        if(l2 == 2){bb += l[2]; mp += 10}
        if(l2 == 3){cc += l[2]; mp += 10}
        if(l3 == 1){aa += l[3]; mp += 10}
        if(l3 == 2){bb += l[3]; mp += 10}
        if(l3 == 3){cc += l[3]; mp += 10}
        if(l4 == 1){aa += l[4]; mp += 10}
        if(l4 == 2){bb += l[4]; mp += 10}
        if(l4 == 3){cc += l[4]; mp += 10}
        if(l5 == 2){bb += l[5]; mp += 10}
        if(l5 == 3){cc += l[5]; mp += 10}
        if(l6 == 1){aa += l[6]; mp += 10}
        if(l6 == 2){bb += l[6]; mp += 10}
        if(l6 == 3){cc += l[6]; mp += 10}
        if(l7 == 1){aa += l[7]; mp += 10}
        if(l7 == 2){bb += l[7]; mp += 10}
        if(l7 == 3){cc += l[7]; mp += 10}

        if(aa == 0||bb == 0||cc == 0){
        mp += abs(aa - a) + abs(bb - b) + abs(cc - c);
        if(mp<minmp) minmp = mp;
        }

    }}}}}}}}
    printf("%d", minmp);
    
}

Compiler output:
a.cc: In function 'int main()':
a.cc:23:41: error: expected ';' before '}' token
   23 |         if(l0 == 1){aa += l[0]; mp += 10}
      |                                         ^
      |                                         ;
a.cc:24:41: error: expected ';' before '}' token
   24 |         if(l0 == 2){bb += l[0]; mp += 10}
      |                                         ^
      |                                         ;
a.cc:25:41: error: expected ';' before '}' token
   25 |         if(l0 == 3){cc += l[0]; mp += 10}
      |                                         ^
      |                                         ;
a.cc:26:41: error: expected ';' before '}' token
   26 |         if(l1 == 1){aa += l[1]; mp += 10}
      |                                         ^
      |                                         ;
a.cc:27:41: error: expected ';' before '}' token
   27 |         if(l1 == 2){bb += l[1]; mp += 10}
      |                                         ^
      |                                         ;
a.cc:28:41: error: expected ';' before '}' token
   28 |         if(l1 == 3){cc += l[1]; mp += 10}
      |                                         ^
      |                                         ;
a.cc:29:41: error: expected ';' before '}' token
   29 |         if(l2 == 1){aa += l[2]; mp += 10}
      |                                         ^
      |                                         ;
a.cc:30:41: error: expected ';' before '}' token
   30 |         if(l2 == 2){bb += l[2]; mp += 10}
      |                                         ^
      |                                         ;
a.cc:31:41: error: expected ';' before '}' token
   31 |         if(l2 == 3){cc += l[2]; mp += 10}
      |                                         ^
      |                                         ;
a.cc:32:41: error: expected ';' before '}' token
   32 |         if(l3 == 1){aa += l[3]; mp += 10}
      |                                         ^
      |                                         ;
a.cc:33:41: error: expected ';' before '}' token
   33 |         if(l3 == 2){bb += l[3]; mp += 10}
      |                                         ^
      |                                         ;
a.cc:34:41: error: expected ';' before '}' token
   34 |         if(l3 == 3){cc += l[3]; mp += 10}
      |                                         ^
      |                                         ;
a.cc:35:41: error: expected ';' before '}' token
   35 |         if(l4 == 1){aa += l[4]; mp += 10}
      |                                         ^
      |                                         ;
a.cc:36:41: error: expected ';' before '}' token
   36 |         if(l4 == 2){bb += l[4]; mp += 10}
      |                                         ^
      |                                         ;
a.cc:37:41: error: expected ';' before '}' token
   37 |         if(l4 == 3){cc += l[4]; mp += 10}
      |                                         ^
      |                                         ;
a.cc:38:41: error: expected ';' before '}' token
   38 |         if(l5 == 2){bb += l[5]; mp += 10}
      |                                         ^
      |                                         ;
a.cc:39:41: error: expected ';' before '}' token
   39 |         if(l5 == 3){cc += l[5]; mp += 10}
      |                                         ^
      |                                         ;
a.cc:40:41: error: expected ';' before '}' token
   40 |         if(l6 == 1){aa += l[6]; mp += 10}
      |                                         ^
      |                                         ;
a.cc:41:41: error: expected ';' before '}' token
   41 |         if(l6 == 2){bb += l[6]; mp += 10}
      |                                         ^
      |                                         ;
a.cc:42:41: error: expected ';' before '}' token
   42 |         if(l6 == 3){cc += l[6]; mp += 10}
      |                                         ^
      |                                         ;
a.cc:43:41: error: expected ';' before '}' token
   43 |         if(l7 == 1){aa += l[7]; mp += 10}
      |                                         ^
      |                                         ;
a.cc:44:41: error: expected ';' before '}' token
   44 |         if(l7 == 2){bb += l[7]; mp += 10}
      |                                         ^
      |                                         ;
a.cc:45:41: error: expected ';' before '}' token
   45 |         if(l7 == 3){cc += l[7]; mp += 10}
      |                                         ^
      |                                         ;