Language: C

#include<stdio.h>
#include<stdlib.h>
int main()
{
    int n,i,j;
    int sum=0,max=0;
    scanf("%d",&n);
    int (*f)[10]=(int(*)[10])malloc(sizeof(int)*n*10);
    int (*p)[11]=(int(*)[11])malloc(sizeof(int)*n*11);
    int a[10];
    for(i=0;i<n;i++)
    {
        for(j=0;j<10;j++)
        {
            scanf("%d",&f[i][j]);
        }
    }
    for(i=0;i<n;i++)
    {
        for(j=0;j<11;j++)
        {
            scanf("%d",&p[i][j]);
        }
    }
    int c1,c2,c3,c4,c5,c6,c7,c8,c9,c10;
    int time;
    for(c1=0;c1<2;c1++)
	    for(c2=0;c2<2;c2++)
	        for(c3=0;c3<2;c3++)
	            for(c4=0;c4<2;c4++)
	                for(c5=0;c5<2;c5++)
	                    for(c6=0;c6<2;c6++)
	                        for(c7=0;c7<2;c7++)
	                            for(c8=0;c8<2;c8++)
	                                for(c9=0;c9<2;c9++)
	                                    for(c10=0;c10<2;c10++)
                                        {
                                            sum=0;
                                            time=i1+i2+i3+i4+i5+i6+i7+i8+i9+i10;
                                            if(time==0) continue;
                                            else
                                            {
                                                for(i=0;i<n;i++)
                                                {
                                                    sum+=p[i][i1*a[i][1]+i2*a[i][2]+i3*a[i][3]+i4*a[i][4]+i5*a[i][5]+i6*a[i][6]+i7*a[i][7]+i8*a[i][8]+i9*a[i][9]+i10*a[i][10]]
                                                }
                                                if(sum>max) max=sum;
                                            }
                                            
                                        }
    printf("%d",sum);
}

Compiler output:
main.c: In function 'main':
main.c:39:50: error: 'i1' undeclared (first use in this function); did you mean 'c1'?
   39 |                                             time=i1+i2+i3+i4+i5+i6+i7+i8+i9+i10;
      |                                                  ^~
      |                                                  c1
main.c:39:50: note: each undeclared identifier is reported only once for each function it appears in
main.c:39:53: error: 'i2' undeclared (first use in this function); did you mean 'c2'?
   39 |                                             time=i1+i2+i3+i4+i5+i6+i7+i8+i9+i10;
      |                                                     ^~
      |                                                     c2
main.c:39:56: error: 'i3' undeclared (first use in this function); did you mean 'c3'?
   39 |                                             time=i1+i2+i3+i4+i5+i6+i7+i8+i9+i10;
      |                                                        ^~
      |                                                        c3
main.c:39:59: error: 'i4' undeclared (first use in this function); did you mean 'c4'?
   39 |                                             time=i1+i2+i3+i4+i5+i6+i7+i8+i9+i10;
      |                                                           ^~
      |                                                           c4
main.c:39:62: error: 'i5' undeclared (first use in this function); did you mean 'c5'?
   39 |                                             time=i1+i2+i3+i4+i5+i6+i7+i8+i9+i10;
      |                                                              ^~
      |                                                              c5
main.c:39:65: error: 'i6' undeclared (first use in this function); did you mean 'c6'?
   39 |                                             time=i1+i2+i3+i4+i5+i6+i7+i8+i9+i10;
      |                                                                 ^~
      |                                                                 c6
main.c:39:68: error: 'i7' undeclared (first use in this function); did you mean 'c7'?
   39 |                                             time=i1+i2+i3+i4+i5+i6+i7+i8+i9+i10;
      |                                                                    ^~
      |                                                                    c7
main.c:39:71: error: 'i8' undeclared (first use in this function); did you mean 'c8'?
   39 |                                             time=i1+i2+i3+i4+i5+i6+i7+i8+i9+i10;
      |                                                                       ^~
      |                                                                       c8
main.c:39:74: error: 'i9' undeclared (first use in this function); did you mean 'c9'?
   39 |                                             time=i1+i2+i3+i4+i5+i6+i7+i8+i9+i10;
      |                                                                          ^~
      |                                                                          c9
main.c:39:77: error: 'i10' undeclared (first use in this function); did you mean 'c10'?
   39 |                                             time=i1+i2+i3+i4+i5+i6+i7+i8+i9+i10;
      |                                                                             ^~~
      |                                                                             c10
main.c:45:70: error: subscripted value is neither array nor pointer nor vector
   45 |                                                     sum+=p[i][i1*a[i][1]+i2*a[i][2]+i3*a[i][3]+i4*a[i][4]+i5*a[i][5]+i6*a[i][6]+i7*a[i][7]+i8*a[i][8]+i9*a[i][9]+i10*a[i][10]]
      |                                                                      ^
main.c:45:81: error: subscripted value is neither array nor pointer nor vector
   45 |                                                     sum+=p[i][i1*a[i][1]+i2*a[i][2]+i3*a[i][3]+i4*a[i][4]+i5*a[i][5]+i6*a[i][6]+i7*a[i][7]+i8*a[i][8]+i9*a[i][9]+i10*a[i][10]]
      |                                                                                 ^
main.c:45:92: error: subscripted value is neither array nor pointer nor vector
   45 |                                                     sum+=p[i][i1*a[i][1]+i2*a[i][2]+i3*a[i][3]+i4*a[i][4]+i5*a[i][5]+i6*a[i][6]+i7*a[i][7]+i8*a[i][8]+i9*a[i][9]+i10*a[i][10]]
      |                                                                                            ^
main.c:45:103: error: subscripted value is neither array nor pointer nor vector
   45 |                                                     sum+=p[i][i1*a[i][1]+i2*a[i][2]+i3*a[i][3]+i4*a[i][4]+i5*a[i][5]+i6*a[i][6]+i7*a[i][7]+i8*a[i][8]+i9*a[i][9]+i10*a[i][10]]
      |                                                                                                       ^
main.c:45:114: error: subscripted value is neither array nor pointer nor vector
   45 |                                                     sum+=p[i][i1*a[i][1]+i2*a[i][2]+i3*a[i][3]+i4*a[i][4]+i5*a[i][5]+i6*a[i][6]+i7*a[i][7]+i8*a[i][8]+i9*a[i][9]+i10*a[i][10]]
      |                                                                                                                  ^
main.c:45:125: error: subscripted value is neither array nor pointer nor vector
   45 |                                                     sum+=p[i][i1*a[i][1]+i2*a[i][2]+i3*a[i][3]+i4*a[i][4]+i5*a[i][5]+i6*a[i][6]+i7*a[i][7]+i8*a[i][8]+i9*a[i][9]+i10*a[i][10]]
      |                                                                                                                             ^
main.c:45:136: error: subscripted value is neither array nor pointer nor vector
   45 |                                                     sum+=p[i][i1*a[i][1]+i2*a[i][2]+i3*a[i][3]+i4*a[i][4]+i5*a[i][5]+i6*a[i][6]+i7*a[i][7]+i8*a[i][8]+i9*a[i][9]+i10*a[i][10]]
      |                                                                                                                                        ^
main.c:45:147: error: subscripted value is neither array nor pointer nor vector
   45 |                                                     sum+=p[i][i1*a[i][1]+i2*a[i][2]+i3*a[i][3]+i4*a[i][4]+i5*a[i][5]+i6*a[i][6]+i7*a[i][7]+i8*a[i][8]+i9*a[i][9]+i10*a[i][10]]
      |                                                                                                                                                   ^
main.c:45:158: error: subscripted value is neither array nor pointer nor vector
   45 |                                                     sum+=p[i][i1*a[i][1]+i2*a[i][2]+i3*a[i][3]+i4*a[i][4]+i5*a[i][5]+i6*a[i][6]+i7*a[i][7]+i8*a[i][8]+i9*a[i][9]+i10*a[i][10]]
      |                                                                                                                                                              ^
main.c:45:170: error: subscripted value is neither array nor pointer nor vector
   45 |                                                     sum+=p[i][i1*a[i][1]+i2*a[i][2]+i3*a[i][3]+i4*a[i][4]+i5*a[i][5]+i6*a[i][6]+i7*a[i][7]+i8*a[i][8]+i9*a[i][9]+i10*a[i][10]]
      |                                                                                                                                                                          ^
main.c:45:175: error: expected ';' before '}' token
   45 |                                                     sum+=p[i][i1*a[i][1]+i2*a[i][2]+i3*a[i][3]+i4*a[i][4]+i5*a[i][5]+i6*a[i][6]+i7*a[i][7]+i8*a[i][8]+i9*a[i][9]+i10*a[i][10]]
      |                                                                                                                                                                               ^
      |                                                                                                                                                                               ;
   46 |                                                 }
      |                                                 ~