criyle/codenet-compile-errors huggingface dataset:
Language: C++


#include	<stdio.h>

int	main(void)
{
	int	n,m;
	int	i,j;
	
	int	**	A	=	new	int*[n];
	for(i=0;	i<n;	i++){
		A[i]=new	int[m];
	}
	
	int	*	b;
	int	*	c;
	
	scanf("%d%d",&n,&m);
	
	
	
	b	=	new	int[m];
	c	=	new	int[n]
	
	c	=	{0};;
	
	for(i=0;	i<n;	i++){
		for(j=0;	j<m;	j++)
			scanf("%d",&A[i][j]);
	}
	
	for(i=0;	i<m;	i++)
		scanf("%d",&b[i]);
	
	for(i=0;	i<n;	i++){
		for(j=0;	j<m;	j++)
			c[i]	=	c[i]	+	A[i][j]	+	b[j];
		printf("%d\n",&c[i]);
	}
	
	for(i=0;	i<n;	i++){
		delete[]	A[i];
	}
	delete[]	A;
	
	delete[]	b;
	delete[]	c;
	
	return(0);
}

Compiler output:
a.cc: In function 'int main()':
a.cc:22:39: error: expected ';' before 'c'
   22 |         c       =       new     int[n]
      |                                       ^
      |                                       ;
   23 | 
   24 |         c       =       {0};;
      |         ~
Language: C++

#include<iostream>
using namespace std;

int main(){
    int n,m;
    cin >> n >> m;
    int a[n][m],b[m],c[m] = {};
    
    for(int i = 0;i<n;i++){
        for(int j =0;j<m;j++){
            cin >> a[i][j];
        }
    }
    for(int i = 0;i<m;i++){
        cin >> b[i];
    }
    
    for(int i =0;i<n;i++){
        for(int j = 0;j<m;j++){
            c[i] += b[j]*a[i][j]
        }
        cout << c[i] << endl;
    }
    
}

Compiler output:
a.cc: In function 'int main()':
a.cc:20:33: error: expected ';' before '}' token
   20 |             c[i] += b[j]*a[i][j]
      |                                 ^
      |                                 ;
   21 |         }
      |         ~
Language: C++

#include<iostream>
using namespace std;

int main(){
    int n,m;
    cin >> n >> m;
    int a[n][m] = 
    int b[m] = 
    int c[n] = {};
    
    for(int i = 0;i<n;i++){
        for(int j =0;j<m;j++){
            cin >> a[i][j];
        }
    }
    for(int i = 0;i<m;i++){
        cin >> b[i];
    }
    for(int i =0;i<n;i++){
        for(int j = 0;j<m;j++){
            c[i] += b[j]*a[i][j];
        }
        cout << c[i] << endl;
    }
    
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:5: error: expected primary-expression before 'int'
    8 |     int b[m] =
      |     ^~~
a.cc:17:16: error: 'b' was not declared in this scope
   17 |         cin >> b[i];
      |                ^
a.cc:21:13: error: 'c' was not declared in this scope
   21 |             c[i] += b[j]*a[i][j];
      |             ^
a.cc:21:21: error: 'b' was not declared in this scope
   21 |             c[i] += b[j]*a[i][j];
      |                     ^
a.cc:23:17: error: 'c' was not declared in this scope
   23 |         cout << c[i] << endl;
      |                 ^
Language: C++

#include <iostream>
#include <vector>

using namespace std;


int main(}{
    int n,m;
    cin>>n>>m;
    vector <vector <int> > a;
    vector<int> b;

    for(int i=0;i<n;i++){
        vector <int > r;
        for(int j=0;j<m;j++){
            int A;
            cin>>A;
            r.push_back(A);
        }
        a.push_back(r);
    }

    for(int i=0;i<m;i++){
        int B;
        cin>>B;
        b.push_back(B);
    }

    for(int i=0;i<n;i++){
        for(int j=0;j<m;j++){
            int s;
            s+=a[i][j]*b[j];
        }
        cout<<s<<endl;
    }
    
    
}

Compiler output:
a.cc:7:5: error: cannot declare '::main' to be a global variable
    7 | int main(}{
      |     ^~~~
a.cc:7:10: error: expected primary-expression before '}' token
    7 | int main(}{
      |          ^
a.cc:7:10: error: expected declaration before '}' token
a.cc:7:11: error: expected unqualified-id before '{' token
    7 | int main(}{
      |           ^
Language: C++

#include<iostream>
using namespace std;

int main(){
	int n, m;
	cin >> n >> m;
	int A[100][100], b[100], c[100];
	for(int i = 0; i < n; i++){
		for(int j = 0; j < m; j++){
			cin >> A[i][j];
		}
	}
	for(int i = 0; i < n; i++) cin  >> b[i];
	for(int j = 0; j < m; j++){
		c[j] = 0;
		for(int j = 0; j < m; j++){
			c[j] += A[i][j] * b[i];
		}
		cout << c[j];
}

Compiler output:
a.cc: In function 'int main()':
a.cc:17:35: error: 'i' was not declared in this scope
   17 |                         c[j] += A[i][j] * b[i];
      |                                   ^
a.cc:20:2: error: expected '}' at end of input
   20 | }
      |  ^
a.cc:4:11: note: to match this '{'
    4 | int main(){
      |           ^
Language: C++

#include<iostream>
using namespace std;

int main(){
	int n, m;
	cin >> n >> m;
	int A[100][100], b[100], c[100];
	for(int i = 0; i < n; i++){
		for(int j = 0; j < m; j++){
			cin >> A[i][j];
		}
	}
	for(int i = 0; i < n; i++) cin  >> b[i];
	for(int j = 0; j < m; j++){
		c[j] = 0;
		for(int j = 0; j < m; j++){
			c[j] += A[i][j] * b[i];
		}
		cout << c[j];
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:17:35: error: 'i' was not declared in this scope
   17 |                         c[j] += A[i][j] * b[i];
      |                                   ^
a.cc:21:2: error: expected '}' at end of input
   21 | }
      |  ^
a.cc:4:11: note: to match this '{'
    4 | int main(){
      |           ^
Language: C++

#include<iostream>
using namespace std;

int main(){
	int n, m;
	cin >> n >> m;
	int A[100][100], b[100], c[100];
	for(int i = 0; i < n; i++){
		for(int j = 0; j < m; j++){
			cin >> A[i][j];
		}
	}
	for(int i = 0; i < n; i++) cin  >> b[i];
	for(int j = 0; j < m; j++){
		c[j] = 0;
		for(int j = 0; j < m; j++){
			c[j] += A[i][j] * b[i];
		}
		cout << c[j];
	}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:17:35: error: 'i' was not declared in this scope
   17 |                         c[j] += A[i][j] * b[i];
      |                                   ^
Language: C++

#include<iostream>
using namespace std;

int main(){
	int n, m;
	cin >> n >> m;
	int A[100][100], b[100], c[100];
	for(int i = 0; i < n; i++){
		for(int j = 0; j < m; j++){
			cin >> A[i][j];
		}
	}
	for(int j = 0; j < m; i++){
		cin  >> b[j];
	}
	for(int i = 0; i < n; i++){
		c[i] = 0;
		for(int j = 0; j < m; j++){
			c[i] += A[i][j] * b[j];
		}
		cout << c[i] << endl;
	}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:13:31: error: 'i' was not declared in this scope
   13 |         for(int j = 0; j < m; i++){
      |                               ^
Language: C++

#include <iostream>

using namespace std;

int main()
{   
    int n, m;

    do {
        cin >> n >> m;
    } while ((n < 1 || n > 100) || (m < 1 || m > 100));

    int** A = new int*[n];
    int** b = new int*[m];

    for (int i = 0; i < n; i++) {
         A[i] = new int[m];      
    }

    for (int i = 0; i < m; i++) {
         b[i] = new int[1];
    }
  
    for (int i = 0; i < n; i++) {
         for (int j = 0; j < m; j++) {
	      do {
                  cin >> A[i][j];
              } while (A[i][j] < 0 || A[i][j] > 1000);
         }
    }

    for (int i = 0; i < m; i++) {
         for (int j = 0; j < 1; j++) {
              do {
                  cin >> b[i][j];
              } while (b[i][j] < 0 || b[i][j] > 1000);
         }
    }

    int** c = new int*[n];
 
    for (int i = 0; i < n; i++) {
         c[i] = new int[1];
    }  

    for (int i = 0; i < n; i++) {
         for (int j = 0; j < 1; j++) {
	      c[i][j] = 0;
         }
    }

    for (int i = 0; i < n; i++) {
         for (int j = 0; j < m; j++) {
	      c[i][0] += A[i][j] * b[j][0];
	 }
    }
      
    for (int i = 0; i < n; i++) {
         for (int j = 0; j < 1; j++) {
              cout << c[i][j] << endl;
         }
    }

    for (int i = 0; i < n; i++) {
         delete[] A[i];
    }

    delete[] A;
        
    for (i = 0; i < m; i++) {
         delete[] b[i];
    }

    delete[] b;
    
    for (i = 0; i < n; i++) {
         delete[] c[i];
    }

    delete[] c;
        
    return (0);
}

Compiler output:
a.cc: In function 'int main()':
a.cc:70:10: error: 'i' was not declared in this scope
   70 |     for (i = 0; i < m; i++) {
      |          ^
a.cc:76:10: error: 'i' was not declared in this scope
   76 |     for (i = 0; i < n; i++) {
      |          ^
Language: C++

#include <iostream>

#define MAX_N (100)
#define MAX_M (100)
#define MAX_L (100)

using namespace std;

int main()
{ 
    int n, m, l;

    do {
        cin >> n >> m >> l;
    } while ((n < 1 || n > MAX_N) || (m < 1 || m > MAX_M) || (l < 1 || l > MAX_L));

    int** A = new int*[n];
    int** B = new int*[m];
  
    for (int i = 0; i < n; i++) {
         A[i] = new int[m];
    }

    for (int i = 0; i < m; i++) {
         B[i] = new int[l];
    }
  
    for (int i = 0; i < n; i++) {
         for (int j = 0; j < m; j++) {
	      do {
	          cin >> A[i][j];
              } while (A[i][j] < 0 || A[i][j] > 10000);
         }
    }

    for (int i = 0; i < m; i++) {
         for (int j = 0; j < l; j++) {
              do {
                  cin >> B[i][j];
              } while (B[i][j] < 0 || B[i][j] > 10000);
         }
    }

    int** C = new int*[n];

    for (int i = 0; i < n; i++) {
         C[i] = new int[l];
    }  

    for (int i = 0; i < n; i++) {
         for (int j = 0; j < l; j++) {
	      C[i][j] = 0;
         }
    }

    for (int i = 0; i < n; i++) {
         for (int j = 0; j < l; j++) {	      
	      for (int k = 0; k < m; k++) {
	           C[i][j] += A[i][k] * B[k][j];
	      }
         }
    }
      
    for (int i = 0; i < n; i++) {
         for (int j = 0; j < l - 1; j++) {
              cout << C[i][j] << " ";	 
         }

         cout << C[i][j] << endl;
    }

    for (int i = 0; i < n; i++) {
         delete[] A[i];
    }

    delete[] A;
           
    for (int i = 0; i < m; i++) {
         delete[] B[i];
    }

    delete[] B;

    for (int i = 0; i < n; i++) {
         delete[] C[i];
    }

    delete[] C;
        
    return (0);
}

Compiler output:
a.cc: In function 'int main()':
a.cc:69:23: error: 'j' was not declared in this scope
   69 |          cout << C[i][j] << endl;
      |                       ^
Language: C++

#include<iostream>
using namespace std;

int main(){
	int n, m;
	int i, j;
	int A[100][100], B[100], C[100] = {0};
	
	cin >> n >> m;
	
		for(i = 0; i < n; i++){
			for(j = 0; j < m; j++){
				cin >> A[i][j];
			}
		}
		
		for(j = 0; j < m; j++){
			cin>>B[j];
			
			
		for(i = 0; i < n; i++){
			for(j = 0; j < m; j++){
				c[i] += A[i][j] * B[j];
			}
		}
		
		for(i = 0, i < 
				

 	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:23:33: error: 'c' was not declared in this scope
   23 |                                 c[i] += A[i][j] * B[j];
      |                                 ^
a.cc:30:9: error: expected primary-expression before 'return'
   30 |         return 0;
      |         ^~~~~~
a.cc:31:1: error: expected primary-expression before '}' token
   31 | }
      | ^
a.cc:30:18: error: expected ';' before '}' token
   30 |         return 0;
      |                  ^
      |                  ;
   31 | }
      | ~                 
a.cc:31:1: error: expected primary-expression before '}' token
   31 | }
      | ^
a.cc:30:18: error: expected ')' before '}' token
   30 |         return 0;
      |                  ^
      |                  )
   31 | }
      | ~                 
a.cc:27:20: note: to match this '('
   27 |                 for(i = 0, i <
      |                    ^
a.cc:31:1: error: expected primary-expression before '}' token
   31 | }
      | ^
a.cc:31:2: error: expected '}' at end of input
   31 | }
      |  ^
a.cc:4:11: note: to match this '{'
    4 | int main(){
      |           ^
Language: C++

#include<iostream>
using namespace std;

int main(){
	int n, m;
	int i, j;
	int A[100][100], B[100], C[100] = {0};
	
	cin >> n >> m;
	
		for(i = 0; i < n; i++){
			for(j = 0; j < m; j++){
				cin >> A[i][j];
			}
		}
		
		for(j = 0; j < m; j++){
			cin>>B[j];
			
			
		for(i = 0; i < n; i++){
			for(j = 0; j < m; j++){
				c[i] += A[i][j] * B[j];
			}
		}
		
		for(i = 0, i < n;i++){
			cout<<C[i]<<endl;
		}
				

 	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:23:33: error: 'c' was not declared in this scope
   23 |                                 c[i] += A[i][j] * B[j];
      |                                 ^
a.cc:27:37: error: expected ';' before ')' token
   27 |                 for(i = 0, i < n;i++){
      |                                     ^
      |                                     ;
a.cc:33:2: error: expected '}' at end of input
   33 | }
      |  ^
a.cc:4:11: note: to match this '{'
    4 | int main(){
      |           ^
Language: C++

#include<iostream>
using namespace std;

int main(){
int n,m;
cin>>n>>m;
int a[100][100],b[100];

     for(int i=0;i<n;i++){
          for(int j=0;j<m;j++){
               cin>>a[i][j];
          }
     }
     for(int i=0;i<m;i++){
          cin>>b[i];
     }
     for(int i=0;i<n;i++){
          int ans=0;
          for(int j=0;j<m;j++){
               c[i]+=a[i][j]*b[j];
          }
          cout<<ans<<endl;
     }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:20:16: error: 'c' was not declared in this scope
   20 |                c[i]+=a[i][j]*b[j];
      |                ^
Language: C++

#include<cstdio>
int main(void){
int a[100][100];
int b[100];
int c[100];
int n,m;
scanf("%d %d",&n,&m);
for(int i=0;i<n;i++){
for(int j=0;j<m;j++){
scanf("%d",&a[i][j]);
}
}
for(int i=0;i<m;i++)scanf("%d",&b[i]);
for(int i=0;i<n;i++){
c[i]=0;
for(int j=0;j<m;j++){
c[i]=a[i][j]*b[j]+c[i]
}
printf("%d\n",c[i]);
}
}

Compiler output:
a.cc: In function 'int main()':
a.cc:17:23: error: expected ';' before '}' token
   17 | c[i]=a[i][j]*b[j]+c[i]
      |                       ^
      |                       ;
   18 | }
      | ~
Language: C++

#include<stdio.h>
int main(){
int x[][],y[],a,b,i,j;
scanf("%d %d" ,&a,&b);
for(i=0;i<a;i++){
for(j=0;j<b;j++){
scanf("%d",x[i][j]);
}
}
for(i==0;i<b;i++){
scanf("%d",y[i]);
}
for(i==0;i<a;i++){
for(j==0;j<b;j++){
z[i]=y[j]*x[i][j];
}
}
for(i==0;i<b;i++){
printf("%d\n",z[i]);
}
}

Compiler output:
a.cc: In function 'int main()':
a.cc:3:5: error: declaration of 'x' as multidimensional array must have bounds for all dimensions except the first
    3 | int x[][],y[],a,b,i,j;
      |     ^
a.cc:3:11: error: storage size of 'y' isn't known
    3 | int x[][],y[],a,b,i,j;
      |           ^
a.cc:7:12: error: 'x' was not declared in this scope
    7 | scanf("%d",x[i][j]);
      |            ^
a.cc:15:1: error: 'z' was not declared in this scope
   15 | z[i]=y[j]*x[i][j];
      | ^
a.cc:15:11: error: 'x' was not declared in this scope
   15 | z[i]=y[j]*x[i][j];
      |           ^
a.cc:19:15: error: 'z' was not declared in this scope
   19 | printf("%d\n",z[i]);
      |               ^
Language: C++

#include<stdio.h>
int main(){
int z[],x[][],y[],a,b,i,j;
scanf("%d %d" ,&a,&b);
for(i=0;i<a;i++){
for(j=0;j<b;j++){
scanf("%d",x[i][j]);
}
}
for(i==0;i<b;i++){
scanf("%d",y[i]);
}
for(i==0;i<a;i++){
for(j==0;j<b;j++){
z[i]=y[j]*x[i][j];
}
}
for(i==0;i<b;i++){
printf("%d\n",z[i]);
}
}

Compiler output:
a.cc: In function 'int main()':
a.cc:3:5: error: storage size of 'z' isn't known
    3 | int z[],x[][],y[],a,b,i,j;
      |     ^
a.cc:3:9: error: declaration of 'x' as multidimensional array must have bounds for all dimensions except the first
    3 | int z[],x[][],y[],a,b,i,j;
      |         ^
a.cc:3:15: error: storage size of 'y' isn't known
    3 | int z[],x[][],y[],a,b,i,j;
      |               ^
a.cc:7:12: error: 'x' was not declared in this scope
    7 | scanf("%d",x[i][j]);
      |            ^
a.cc:15:11: error: 'x' was not declared in this scope
   15 | z[i]=y[j]*x[i][j];
      |           ^
Language: C++

#include<iostream>
using namespace std;

int main() {
        int i, j, m, n, a[100][100], b[100], c[100];
        cin >> n >> m;
        for (i = 0; i < n; i++) {
                for (j = 0; j < m; j++) {
                        cin >> a[i][j];
                }
        }
        for (i = 0; i < m; i++) {
                cin >> b[i]
        }
        for (i = 0; i < n; i++) {
                for (j = 0; j < m; j++) {
                        c[i] = a[i][j] + b[j];
                }
        }
        for (i = 0; i < n; i++) cout << c[i] << endl;
        return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:13:28: error: expected ';' before '}' token
   13 |                 cin >> b[i]
      |                            ^
      |                            ;
   14 |         }
      |         ~
Language: C++

#include<iostream>
using namespace std;

int main() {
        int i, j, m, n, a[100][100], b[100], c[100];
        cin >> n >> m;
        for (i = 0; i < n; i++) {
                for (j = 0; j < m; j++) {
                        cin >> a[i][j];
                }
        }
        for (i = 0; i < m; i++) {
                cin >> b[i];
        }
        for (i = 0; i < n; i++) {
                for (j = 0; j < m; j++) {
                        c[i] += (a[i][j] * b[j]);
                }
        }
        for (i = 0; i < n; i++) cout << c[i] << endl;
        return 0;
}
~    

Compiler output:
a.cc:23:2: error: expected class-name at end of input
   23 | ~
      |  ^
Language: C++

object Main extends App {
    val x :: y = io.Source.stdin.getLines.map(_.split(" ").map(_.toInt)).toList
    val a = y.take(x(0))
    val b = y.drop(x(0)).flatten
    a.foreach(x => println(x.zip(b).map(p => p._1 * p._2).sum))
}

Compiler output:
a.cc:1:1: error: 'object' does not name a type
    1 | object Main extends App {
      | ^~~~~~
Language: C++

#include<iostream>
using namespace std;

int main(){
 int n,m,c;
 int a[100][100],b[100];
 cin >> n >> m;
 a[n][m]={};
 b[m]={};

 for(int i=0;i<n;++i){
  for(int j=0;j<m;++j){
   cin >> a[n][m];
  }
 }

 for(int j=0;j<m;++j){
  cin >> b[m];
 }
 
 for(int i=0;i<n;++i){
  c=0
  for(int j=0;j<m;++j){
   c+=a[i][j]*b[j];
  }
  cout << c << endl;
 }
return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:22:6: error: expected ';' before 'for'
   22 |   c=0
      |      ^
      |      ;
   23 |   for(int j=0;j<m;++j){
      |   ~~~ 
a.cc:23:15: error: 'j' was not declared in this scope
   23 |   for(int j=0;j<m;++j){
      |               ^
Language: C++

#include <iostream>
using namespace std;
int main(void){
    int n, m;
    cin >> n >> m;
    
    vector<vector<int>> mat(n);
    vector<int>::iterator itr_i;
    vector<vector<int>>::iterator itr;
    int i, j;
    int elem;
    for(itr = mat.begin(); itr != mat.end(); itr++){
        for(j = 0; j < m; j++){
            cin >> elem;
            (*itr).push_back(elem);
        }
    }
    
    vector<int> vec(m);
    for(itr_i = vec.begin(); itr_i != vec.end(); itr_i++){
        cin >> *itr_i;
    }
    
    vector<int> res(n);
    int pro;
    for(i = 0; i < n; i++){
        pro = 0;
        for(j = 0; j < m; j++){
            pro += (mat[i][j] * vec[j]);
        }
        res[i] = pro;
    }
    
    for(itr_i = res.begin(); itr_i != res.end(); itr_i++){
        cout << *itr_i << endl;
    }
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:5: error: 'vector' was not declared in this scope
    7 |     vector<vector<int>> mat(n);
      |     ^~~~~~
a.cc:2:1: note: 'std::vector' is defined in header '<vector>'; this is probably fixable by adding '#include <vector>'
    1 | #include <iostream>
  +++ |+#include <vector>
    2 | using namespace std;
a.cc:7:19: error: expected primary-expression before 'int'
    7 |     vector<vector<int>> mat(n);
      |                   ^~~
a.cc:8:12: error: expected primary-expression before 'int'
    8 |     vector<int>::iterator itr_i;
      |            ^~~
a.cc:9:19: error: expected primary-expression before 'int'
    9 |     vector<vector<int>>::iterator itr;
      |                   ^~~
a.cc:12:9: error: 'itr' was not declared in this scope
   12 |     for(itr = mat.begin(); itr != mat.end(); itr++){
      |         ^~~
a.cc:12:15: error: 'mat' was not declared in this scope
   12 |     for(itr = mat.begin(); itr != mat.end(); itr++){
      |               ^~~
a.cc:19:12: error: expected primary-expression before 'int'
   19 |     vector<int> vec(m);
      |            ^~~
a.cc:20:9: error: 'itr_i' was not declared in this scope
   20 |     for(itr_i = vec.begin(); itr_i != vec.end(); itr_i++){
      |         ^~~~~
a.cc:20:17: error: 'vec' was not declared in this scope
   20 |     for(itr_i = vec.begin(); itr_i != vec.end(); itr_i++){
      |                 ^~~
a.cc:24:12: error: expected primary-expression before 'int'
   24 |     vector<int> res(n);
      |            ^~~
a.cc:29:21: error: 'mat' was not declared in this scope
   29 |             pro += (mat[i][j] * vec[j]);
      |                     ^~~
a.cc:29:33: error: 'vec' was not declared in this scope
   29 |             pro += (mat[i][j] * vec[j]);
      |                                 ^~~
a.cc:31:9: error: 'res' was not declared in this scope
   31 |         res[i] = pro;
      |         ^~~
a.cc:34:9: error: 'itr_i' was not declared in this scope
   34 |     for(itr_i = res.begin(); itr_i != res.end(); itr_i++){
      |         ^~~~~
a.cc:34:17: error: 'res' was not declared in this scope
   34 |     for(itr_i = res.begin(); itr_i != res.end(); itr_i++){
      |                 ^~~
Language: C++

int A[3][4] = {{1,2,0,1},{0,3,0,1},{4,1,1,0}};

int b[4] = {1,2,3,0};
int c[100] = {0};

Compiler output:
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/14/../../../x86_64-linux-gnu/Scrt1.o: in function `_start':
(.text+0x17): undefined reference to `main'
collect2: error: ld returned 1 exit status
Language: C++

 int n, m, i, j;
 
    cin >> n >> m;
 
    int a[n][m], b[m], c[n];
 
    for(i = 0;i < n;i++){
 
        for(j = 0;j < m;j++){
 
            cin >> a[i][j];
 
        }
    }//???????????\???
 
    for(j = 0;j < m;j++){
 
        cin >> b[j];
 
    }//?????????????????\???
 
    for(i = 0;i < n;i++){
 
        for(j = 0;j < m;j++){
 
            if(j == 0) c[i] = a[i][0] * b[0];
            else{c[i] = c[i] + a[i][j] * b[j];
            }
 
        } 
    }
 
    for(i = 0;i < n ;i++){
 
        cout << c[i] << endl;
 
    }
 
return 0;

Compiler output:
a.cc:3:5: error: 'cin' does not name a type
    3 |     cin >> n >> m;
      |     ^~~
a.cc:5:14: error: size of array 'a' is not an integral constant-expression
    5 |     int a[n][m], b[m], c[n];
      |              ^
a.cc:5:11: error: size of array 'a' is not an integral constant-expression
    5 |     int a[n][m], b[m], c[n];
      |           ^
a.cc:5:20: error: size of array 'b' is not an integral constant-expression
    5 |     int a[n][m], b[m], c[n];
      |                    ^
a.cc:5:26: error: size of array 'c' is not an integral constant-expression
    5 |     int a[n][m], b[m], c[n];
      |                          ^
a.cc:7:5: error: expected unqualified-id before 'for'
    7 |     for(i = 0;i < n;i++){
      |     ^~~
a.cc:7:15: error: 'i' does not name a type
    7 |     for(i = 0;i < n;i++){
      |               ^
a.cc:7:21: error: 'i' does not name a type
    7 |     for(i = 0;i < n;i++){
      |                     ^
a.cc:16:5: error: expected unqualified-id before 'for'
   16 |     for(j = 0;j < m;j++){
      |     ^~~
a.cc:16:15: error: 'j' does not name a type
   16 |     for(j = 0;j < m;j++){
      |               ^
a.cc:16:21: error: 'j' does not name a type
   16 |     for(j = 0;j < m;j++){
      |                     ^
a.cc:22:5: error: expected unqualified-id before 'for'
   22 |     for(i = 0;i < n;i++){
      |     ^~~
a.cc:22:15: error: 'i' does not name a type
   22 |     for(i = 0;i < n;i++){
      |               ^
a.cc:22:21: error: 'i' does not name a type
   22 |     for(i = 0;i < n;i++){
      |                     ^
a.cc:33:5: error: expected unqualified-id before 'for'
   33 |     for(i = 0;i < n ;i++){
      |     ^~~
a.cc:33:15: error: 'i' does not name a type
   33 |     for(i = 0;i < n ;i++){
      |               ^
a.cc:33:22: error: 'i' does not name a type
   33 |     for(i = 0;i < n ;i++){
      |                      ^
a.cc:39:1: error: expected unqualified-id before 'return'
   39 | return 0;
      | ^~~~~~
Language: C++

#include <stdio.h>
#include <iostream>

using namespace std;

int main() {
  int n, m;
  scanf("%d %d", &n, &m);

  int A[100][100];
  int b[100];

  int i, j;
  int k;
  for(i = 0; i < n; i++) {
    j = 0;
    while(cin >> k) {
      A[i][j] = k
      j++;
    }
  }

  for(i = 0; i < m; i++) {
    scanf("%d", &b[i]);
  }

  int c;
  for(i = 0; i < n; i++) {
    c = 0 ;
    for(j = 0; j < m; j++) {
      c += A[i][j] * b[j];
    }
    printf("%d\n", c);
  }
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:18:18: error: expected ';' before 'j'
   18 |       A[i][j] = k
      |                  ^
      |                  ;
   19 |       j++;
      |       ~
Language: C++

#include <iostream>
using namespace std;

int main(){
	int n, m, A[100][100], b[100],c[100];

	cin >> n >> m;
	for ( int i = 0; i < n; i++ )
		for ( int j = 0; j < m; j++) cin >> A[i][j];
	for ( int i = 0 ; i < m; i++) cin >> b[i];

	for ( int i =0; i < n; i++){
		c[i] = 0;
		for (int j = 0; j < m; j++){
			c[i] += A[i][j]*b[j];
		}
	} 

	for ( int i = 0; i < ; i++) cout << c[i] << endl;

        return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:19:30: error: expected primary-expression before ';' token
   19 |         for ( int i = 0; i < ; i++) cout << c[i] << endl;
      |                              ^
Language: C++

#include <iostream>
using namespace std;

int main(){
	int n, m, A[100][100], b[100],c[100];

	cin >> n >> m;
	for ( int i = 0; i < n; i++ )
		for ( int j = 0; j < m; j++) cin >> A[i][j];
	for ( int i = 0 ; i < m; i++) cin >> b[i];

	for ( int i = 0; i < n; i++){
		c[i] = 0;
		for (int j = 0; j < m; j++){
			c[i] += A[i][j]*b[j];
		}
	} 

	for ( int i = 0; i < ; i++) cout << c[i] << endl;

	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:19:30: error: expected primary-expression before ';' token
   19 |         for ( int i = 0; i < ; i++) cout << c[i] << endl;
      |                              ^
Language: C++

#include <iostream>
using namespace std;

int main() {
  int m, n;
  cin >> m >> n;

  int a[m][n] = {};
  for(int i = 0; i < m; ++i) {
    for(int j = 0; j < n; ++j) {
      cin >> a[i][j];
    }
  }

  int b[n];
  for(int i = 0; i < n; ++i) {
    cin >> b[i];
  }

  int sigma[m]
  for(int i = 0; i < m; ++i) {
    for(int j = 0; j < n; ++j) {
      sigma[i] += a[i][j] * b[j]
    }
  }

  for(int i = 0; i < m; ++i) {
    cout << sigma[i] << endl;
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:21:3: error: expected initializer before 'for'
   21 |   for(int i = 0; i < m; ++i) {
      |   ^~~
a.cc:21:18: error: 'i' was not declared in this scope
   21 |   for(int i = 0; i < m; ++i) {
      |                  ^
a.cc:28:13: error: 'sigma' was not declared in this scope
   28 |     cout << sigma[i] << endl;
      |             ^~~~~
Language: C++

#include <iostream>
using namespace std;

int main() {
  int m, n;
  cin >> m >> n;

  int a[m][n] = {};
  for(int i = 0; i < m; ++i) {
    for(int j = 0; j < n; ++j) {
      cin >> a[i][j];
    }
  }

  int b[n];
  for(int i = 0; i < n; ++i) {
    cin >> b[i];
  }

  int sigma[m];
  for(int i = 0; i < m; ++i) {
    for(int j = 0; j < n; ++j) {
      sigma[i] += a[i][j] * b[j]
    }
  }

  for(int i = 0; i < m; ++i) {
    cout << sigma[i] << endl;
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:23:33: error: expected ';' before '}' token
   23 |       sigma[i] += a[i][j] * b[j]
      |                                 ^
      |                                 ;
   24 |     }
      |     ~
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
 int n, m, A[100][100], b[100], c[100];
 cin >> n >> m;
 for ( int i = 0; i < n; i++)
  for ( int j = 0; j < m; j++) cin >> A[i][j];
 for ( int i = 0; i < m; i++) cin >> b[i]
 for ( int i = 0; i < n; i++){
  c[i] = 0;
  for ( int j = 0; j < m; j++){
   c[i] += A[i][j]*b[j];
  }
  }
 for ( int i = 0; i < n; i++ ) cout << c[i] << endl;
 return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:42: error: expected ';' before 'for'
    8 |  for ( int i = 0; i < m; i++) cin >> b[i]
      |                                          ^
      |                                          ;
    9 |  for ( int i = 0; i < n; i++){
      |  ~~~                                      
a.cc:9:19: error: 'i' was not declared in this scope
    9 |  for ( int i = 0; i < n; i++){
      |                   ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
int n, m, a[100][100], b[100], c[100]
cin >> n >> m;
 for( int i = 0; i < n; i++)
  for( int j = 0; j < m; j++) cin >> a[i][j];
 for( int i = 0; i < n; i++) cin >> b[i];
 for( int i = 0; i < n; i++){
  
  for( int j = 0; j < m; j++){
   c[j] = a[i][j]*b[i]
  }
  }
 for( int i = 0; i < m; i++){
 cout << c[j] << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:1: error: expected initializer before 'cin'
    5 | cin >> n >> m;
      | ^~~
a.cc:12:4: error: 'c' was not declared in this scope
   12 |    c[j] = a[i][j]*b[i]
      |    ^
a.cc:16:10: error: 'c' was not declared in this scope
   16 |  cout << c[j] << endl;
      |          ^
a.cc:16:12: error: 'j' was not declared in this scope
   16 |  cout << c[j] << endl;
      |            ^
a.cc:17:2: error: expected '}' at end of input
   17 | }
      |  ^
a.cc:3:11: note: to match this '{'
    3 | int main(){
      |           ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
int n, m, a[100][100], b[100], c[100]
cin >> n >> m;
 for( int i = 0; i < n; i++)
  for( int j = 0; j < m; j++) cin >> a[i][j];
 for( int i = 0; i < m; i++) cin >> b[i];
 for( int i = 0; i < n; i++){
  c[i] = 0;
  for( int j = 0; j < m; j++){
   c[j] = a[i][j]*b[i];
  }
  }
 for( int i = 0; i < n; i++){
 cout << c[j] << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:1: error: expected initializer before 'cin'
    5 | cin >> n >> m;
      | ^~~
a.cc:10:3: error: 'c' was not declared in this scope
   10 |   c[i] = 0;
      |   ^
a.cc:16:10: error: 'c' was not declared in this scope
   16 |  cout << c[j] << endl;
      |          ^
a.cc:16:12: error: 'j' was not declared in this scope
   16 |  cout << c[j] << endl;
      |            ^
a.cc:17:2: error: expected '}' at end of input
   17 | }
      |  ^
a.cc:3:11: note: to match this '{'
    3 | int main(){
      |           ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
int n, m, a[100][100], b[100], c[100];
cin >> n >> m;
 for( int i = 0; i < n; i++)
  for( int j = 0; j < m; j++) cin >> a[i][j];
 for( int i = 0; i < m; i++) cin >> b[i];
 for( int i = 0; i < n; i++){
  c[i] = 0;
  for( int j = 0; j < m; j++){
   c[j] = a[i][j]*b[i];
  }
  }
 for( int i = 0; i < n; i++){
 cout << c[j] << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:16:12: error: 'j' was not declared in this scope
   16 |  cout << c[j] << endl;
      |            ^
a.cc:17:2: error: expected '}' at end of input
   17 | }
      |  ^
a.cc:3:11: note: to match this '{'
    3 | int main(){
      |           ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
int n, m, a[100][100], b[100], c[100];
cin >> n >> m;
 for( int i = 0; i < n; i++)
  for( int j = 0; j < m; j++) cin >> a[i][j];
 for( int i = 0; i < m; i++) cin >> b[i];
 for( int i = 0; i < n; i++){
  c[i] = 0;
  for( int j = 0; j < m; j++){
   c[j] = a[i][j]*b[j];
  }
  }
 for( int i = 0; i < n; i++){
 cout << c[j] << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:16:12: error: 'j' was not declared in this scope
   16 |  cout << c[j] << endl;
      |            ^
a.cc:17:2: error: expected '}' at end of input
   17 | }
      |  ^
a.cc:3:11: note: to match this '{'
    3 | int main(){
      |           ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
int n, m, a[100][100], b[100], c[100];
cin >> n >> m;
 for( int i = 0; i < n; i++)
  for( int j = 0; j < m; j++) cin >> a[i][j];
 for( int i = 0; i < m; i++) cin >> b[i];
 for( int i = 0; i < n; i++){
  c[i] = 0;
  for( int j = 0; j < m; j++){
   c[j] = a[i][j]*b[j];
  }
  }
 for( int i = 0; i < n; i++){
 cout << c[j] << endl;
 return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:16:12: error: 'j' was not declared in this scope
   16 |  cout << c[j] << endl;
      |            ^
a.cc:18:2: error: expected '}' at end of input
   18 | }
      |  ^
a.cc:3:11: note: to match this '{'
    3 | int main(){
      |           ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
int n, m, a[100][100], b[100], c[100];
cin >> n >> m;
 for( int i = 0; i < n; i++)
  for( int j = 0; j < m; j++) cin >> a[i][j];
 for( int i = 0; i < m; i++) cin >> b[i];
 for( int i = 0; i < n; i++){
  c[i] = 0;
  for( int j = 0; j < m; j++){
   c[i] = a[i][j]*b[j];
  }
  }
 for( int i = 0; i < n; i++){
 cout << c[j] << endl;
 return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:16:12: error: 'j' was not declared in this scope
   16 |  cout << c[j] << endl;
      |            ^
a.cc:18:2: error: expected '}' at end of input
   18 | }
      |  ^
a.cc:3:11: note: to match this '{'
    3 | int main(){
      |           ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
int n, m, a[100][100], b[100], c[100];
cin >> n >> m;
 for( int i = 0; i < n; i++)
  for( int j = 0; j < m; j++) cin >> a[i][j];
 for( int i = 0; i < m; i++) cin >> b[i];
 for( int i = 0; i < n; i++){
  c[i] = 0;
  for( int j = 0; j < m; j++){
   c[i] += a[i][j]*b[j];
  }
  }
 for( int i = 0; i < n; i++){
 cout << c[j] << endl;
 return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:16:12: error: 'j' was not declared in this scope
   16 |  cout << c[j] << endl;
      |            ^
a.cc:18:2: error: expected '}' at end of input
   18 | }
      |  ^
a.cc:3:11: note: to match this '{'
    3 | int main(){
      |           ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
int n, m, a[100][100], b[100], c[100];
cin >> n >> m;
 for( int i = 0; i < n; i++)
  for( int j = 0; j < m; j++) cin >> a[i][j];
 for( int i = 0; i < m; i++) cin >> b[i];
 for( int i = 0; i < n; i++){
  c[i] = 0;
  for( int j = 0; j < m; j++){
   c[i] += a[i][j]*b[j];
  }
  }
 for( int i = 0; i < n; i++) cout << c[j] << endl;
 return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:15:40: error: 'j' was not declared in this scope
   15 |  for( int i = 0; i < n; i++) cout << c[j] << endl;
      |                                        ^
Language: C++

include <iostream>

using namespace std;

int main(void){
   
   int height,width;
   

    cin >> height >> width;

   int A[height][width];
   int B[width];

   for(int i=0; i<height; i++){
      for(int j=0; j<width; j++){
        cin >> A[i][j];
      }
   }
   for(int i=0; i<width; i++)
        cin >> B[i];

   for(int i=0; i<height; i++){
      int calc = 0;

      for(int j=0; j<width; j++){
        calc += A[i][j] * B[j]; 
      }

      cout << calc << endl;
   }


   return 0;
}

Compiler output:
a.cc:1:1: error: 'include' does not name a type
    1 | include <iostream>
      | ^~~~~~~
a.cc: In function 'int main()':
a.cc:10:5: error: 'cin' was not declared in this scope
   10 |     cin >> height >> width;
      |     ^~~
a.cc:30:7: error: 'cout' was not declared in this scope
   30 |       cout << calc << endl;
      |       ^~~~
a.cc:30:23: error: 'endl' was not declared in this scope
   30 |       cout << calc << endl;
      |                       ^~~~
Language: C++

#include <iostream>

int main(void)
{
	using namespace std;
	
	int n,m;
	cin >> n;
	cin >> m;

	int matA[n][m];
	int vecB[m];
	for(int i = 0; i<n; i++){
		for(int j = 0; j<m; j++){
			cin >> matA[i][j]
		}
	}

	for(int i = 0; i<m; i++){
		cin >> vecB[i];
	}

	int tempans;
	for(int i = 0; i<n; i++){
		tempans = 0;
		for(int j = 0; j<m; j++){
			tempans += matA[i][j] * vecB[j];
		}
		cout << tempans << endl;
	}

	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:15:42: error: expected ';' before '}' token
   15 |                         cin >> matA[i][j]
      |                                          ^
      |                                          ;
   16 |                 }
      |                 ~
Language: C++

#include <iostream>
using namespace

int main(){
 int n,m;
 cin >> n >> m ;

 int a[n][m],b[m],c=0;
 for(int i=0;i<n;i++){
  for(int j=0;j<m;j++){
   cin >> a[i][j] ;
  }
 }
 for(int i=0;i<m;i++){
  cin >> b[i] >> endl;
 }
 
 for(int i=0;i<n;i++){
  for(int j=0;j<m;j++){
   c+=a[i][j]*b[j];
  }
 cout << c << endl ;
 }
 
 return 0;
}

Compiler output:
a.cc:4:1: error: expected identifier before 'int'
    4 | int main(){
      | ^~~
a.cc:2:16: error: expected ';' before 'int'
    2 | using namespace
      |                ^
      |                ;
    3 | 
    4 | int main(){
      | ~~~             
a.cc: In function 'int main()':
a.cc:6:2: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    6 |  cin >> n >> m ;
      |  ^~~
      |  std::cin
In file included from a.cc:1:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
a.cc:15:18: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
   15 |   cin >> b[i] >> endl;
      |                  ^~~~
      |                  std::endl
In file included from /usr/include/c++/14/iostream:41:
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~
a.cc:22:2: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   22 |  cout << c << endl ;
      |  ^~~~
      |  std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:22:15: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
   22 |  cout << c << endl ;
      |               ^~~~
      |               std::endl
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~
Language: C++

#include <iostream>
using namespace std;

int main()
{
    //?????°??????
    int Array[100][100]={};//[?¨?][???]
    int Vector[100]={};
    int n=0;
    int m=0;
    //??\?????????
    
    for (int i=0;i<m;i++)
    {
        for(int j=0;j<n;j++)
        {
            cin>>Array[i][j];
        }
    }
    
    for(int i=0;i<n;i++)
    {
        Vector[i];
    }
    //?¨??????????
    int TemporarySum=0;//
    int ReturnVector[100]={};//??????????????£??\??????
    for(int i=0;i<n;i++)
    {
        for (int j=0;j<m;j++)
        {
            TemporarySum+=Array[i][j]*Vector[n];
        }
    ReturnVector[i]=TemporarySum;
    TemporarySum=0;
    } 
    //????????????
    for(int i=0;i<m;i++)
    {
        cout<<ReturnSum[i]<<endl;
    }
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:40:15: error: 'ReturnSum' was not declared in this scope
   40 |         cout<<ReturnSum[i]<<endl;
      |               ^~~~~~~~~
Language: C++

#include<stdio.h>

int main(){
  int x,y;
  int i,j,k;
  scanf("%d %d",&x,&y);
  int a[x][y];
  int b[y];
  int sum[x];
  for(i=0;i<x;i++){
    for(j=0;j<y;j++){
        scanf("%d",x[i][j]);
    }
  }
  for(j=0;j<y;j++){
    scanf("%d",b[j]);
    for(i=0;i<x;i++){
      sum[i] += a[i][j]*b[j];
    }
  }
  for(i=0;i<x;i++){
    printf("%d\n",sum[i]);
  }
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:21: error: invalid types 'int[int]' for array subscript
   12 |         scanf("%d",x[i][j]);
      |                     ^
Language: C++

N, M=map(int, input().split())
mat = [[0 for m in range(M)]for n in range(N)]
vec = [0 for n in range(N)]

for n in range(N):
  mat[n] = list(map(int , input().split()))
for n in range(N):
  vec[n] = int(input())

c = 0
for n in range(N):
 for m in range(M):
  c += mat[n][m] * vec[m]
 print(c)
 c = 0

Compiler output:
a.cc:1:1: error: 'N' does not name a type
    1 | N, M=map(int, input().split())
      | ^
Language: C++

N, M=map(int, input().split())
mat = [[0 for m in range(M)]for n in range(N)]
vec = [0 for m in range(M)]

for n in range(N):
  mat[n] = list(map(int , input().split()))
for m in range(m):
  vec[m] = int(input())

c = 0
for n in range(N):
 for m in range(M):
  c += mat[n][m] * vec[m]
 print(c)
 c = 0

Compiler output:
a.cc:1:1: error: 'N' does not name a type
    1 | N, M=map(int, input().split())
      | ^
Language: C++

#include <iostream>
using namespace std;

int main() {
	int n, m;
	int matrix[100][100] = { 0 };
	int vector[100] = { 0 };
	long output[100] = { 0 };

	cin >> n >> m;
	for (int i = 0; i < n; i++)
		for (int j = 0; j < m; j++)
			cin >> matrix[i][j];

	for (int j = 0; j < m; j++)
		vector[j];

	for(int i = 0; i<n; i++)
		for (int j = 0; j < m; j++)
		{
			output[i] += matrix[i][j] * vector[j];
		}
	cout << output[i] << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:23:24: error: 'i' was not declared in this scope
   23 |         cout << output[i] << endl;
      |                        ^
Language: C++

#include <stdio.h>
int main(void){
  int n,m,i,j,a[100]=0;
  scanf("%d %d",&n,&m);
  int A[n][m],b[m];
  for(i=0;i<n;i++){
    for(j=0;j<m;j++){
      scanf(" %d",&A[j][j]);
    }
  }
  for(i=0;i<m;i++){
    scanf(" %d",&b[i]);
  }
  for(i=0;i<n;i++){
    for(j=0;j<m;j++){
      a+=A[i][j]*b[j];
    }
  }
  for(i=0;i<n;i++){
    printf("%d\n",a[i]);
  }
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:3:22: error: array must be initialized with a brace-enclosed initializer
    3 |   int n,m,i,j,a[100]=0;
      |                      ^
a.cc:16:8: error: incompatible types in assignment of 'int' to 'int [100]'
   16 |       a+=A[i][j]*b[j];
      |       ~^~~~~~~~~~~~~~
Language: C++

#include <stdio.h>
int main(void){
  int n,m,i,j,a[100]=0;
  scanf("%d %d",&n,&m);
  int A[n][m],b[m];
  for(i=0;i<n;i++){
    for(j=0;j<m;j++){
      scanf(" %d",&A[j][j]);
    }
  }
  for(i=0;i<m;i++){
    scanf(" %d",&b[i]);
  }
  for(i=0;i<n;i++){
    for(j=0;j<m;j++){
      a[i]+=A[i][j]*b[j];
    }
  }
  for(i=0;i<n;i++){
    printf("%d\n",a[i]);
  }
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:3:22: error: array must be initialized with a brace-enclosed initializer
    3 |   int n,m,i,j,a[100]=0;
      |                      ^
Language: C++

#include<iostream>
int main(void){
    int n,m;
    std::cin>>n>>m;
    int A[n][m]={};
    int b[n]={};
    int c[n]={};
    int i,j;
    for(i=0;i<n;i++){
        for(j=0;j<m;j++){
            std::cin>>A[i][j];
        }
    }
    for(i=0;i<n;i++)
         std::cin>>b[i];
    for(i=0;i<n;i++){
        for(j=0;j<m;j++){
            c[i]+=A[i][j]*b[j]
        }
        std::cout<<c[i]<<std::endl;
    }
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:18:31: error: expected ';' before '}' token
   18 |             c[i]+=A[i][j]*b[j]
      |                               ^
      |                               ;
   19 |         }
      |         ~
Language: C++

#include<iostream>
using namespace std;
int main()
{
	int a[105][105],b[105],c[105];
	memset(c,0,105*sizeof(int));
	int n,m;
	while(cin>>n>>m)//???????°±?????\??????????¨????
	{
		for(int i=1;i<=n;i++)
			for(int j=1;j<=m;j++)
				cin>>a[i][j];
		for(int i=1;i<=m;i++)
			cin>>b[i];
		for(int i=1;i<=n;i++)
		{
			for(int j=1;j<=m;j++)
			
			{
				c[i]+=a[i][j]*b[j];
			}
		}
		for(int i=1;i<=n;i++)
			cout<<c[i]<<endl;



	
	
	
	
	}









}
	

Compiler output:
a.cc: In function 'int main()':
a.cc:6:9: error: 'memset' was not declared in this scope
    6 |         memset(c,0,105*sizeof(int));
      |         ^~~~~~
a.cc:2:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    1 | #include<iostream>
  +++ |+#include <cstring>
    2 | using namespace std;
Language: C++

#include<iostream>
#include<stdlib.h>
using namespace std;
int main()
{
	int a[105][105],b[105],c[105];
	memset(c,0,105*sizeof(int));
	int n,m;
	while(cin>>n>>m)//???????°±?????\??????????¨????
	{
		for(int i=1;i<=n;i++)
			for(int j=1;j<=m;j++)
				cin>>a[i][j];
		for(int i=1;i<=m;i++)
			cin>>b[i];
		for(int i=1;i<=n;i++)
		{
			for(int j=1;j<=m;j++)
			
			{
				c[i]+=a[i][j]*b[j];
			}
		}
		for(int i=1;i<=n;i++)
			cout<<c[i]<<endl;



	
	
	
	
	}









}
	

Compiler output:
a.cc: In function 'int main()':
a.cc:7:9: error: 'memset' was not declared in this scope
    7 |         memset(c,0,105*sizeof(int));
      |         ^~~~~~
a.cc:3:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    2 | #include<stdlib.h>
  +++ |+#include <cstring>
    3 | using namespace std;
Language: C++

#include <iostream>
using namespace std;
 
int main(void) {
    int n, m, b[100], c[100][100], i, j;
    long int ans;
    cin >> n >> m;
    for (i = 0; i < n; i++) {
        for (j = 0; j < m; j++) {
            cin >> c[i][j];
        }
    }
    for (i = 0; i < m; i++) {
        cin >> b[i];
    }
    for (i = 0; i < n; i++) {
        for (j = 0, ans = 0; j < m; j++) {
            ans += c[i][j] * b[j];
        }
        cout << ans << endl;
    }
    return 0;

Compiler output:
a.cc: In function 'int main()':
a.cc:22:14: error: expected '}' at end of input
   22 |     return 0;
      |              ^
a.cc:4:16: note: to match this '{'
    4 | int main(void) {
      |                ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
??
int main()
{
????????int n, m, t;
????????cin >> n >> m;
??
????????int b[m], A[n][m];
????????for (int j = 0; j < n; ++j) {
????????????????for (int i = 0; i < m; ++i) {
????????????????????????cin >> t;
????????????????????????A[j][i] = t;
????????????????}
????????}
??
????????for (int i = 0; i < m; ++i) {
????????????????cin >> t;
????????????????b[i] = t;
????????}
??
????????for (int j = 0; j < n; ++j) {
????????????????int x = 0;
??
????????????????for (int i = 0; i < m; ++i) {
????????????????????????x += b[i] * A[j][i];
????????????????}
??
????????????????cout << x << endl;
????????}
??
????????return 0;
}

Compiler output:
a.cc:3:1: error: expected unqualified-id before '?' token
    3 | ??
      | ^
Language: C++

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

int main(void)
{
    int i,j;
    int x,y;

    int n,m;
    int **a=NULL;
    int *b=NULL;

    scanf("%d %d",&n,&m);

    /* 配列の領域を動的確保 */
    a =(int **)malloc(n*sizeof(int));
    if(a == NULL){
        return 0;
    }

    b =(int *)malloc(m*sizeof(int));
    if(b == NULL){
        return 0;
    }

    for(i=0;i<n;i++){
        a[i] = malloc(m*sizeof(int));
    }

    for(i=0;i<n;i++){
        for(j=0;j<m;j++){
            if(j==0){
                scanf("%d",&x);
            }
            else{
                scanf(" %d",&x);
            }
            a[i][j] = x;
        }
    }

    for(i=0;i<m;i++){
        scanf("%d",&x);
        b[i] =x;
    }


    for(i=0;i<n;i++){
        y=0;
        for(j=0;j<m;j++){
            y += a[i][j]*b[j];
        }

        printf("%d\n",y);
    }


    /* a,bの領域解放 */
    for(i;i<n;i++){
        free(a[i]);
    }

    free(a);
    free(b);

    return 0;
}





Compiler output:
a.cc: In function 'int main()':
a.cc:27:22: error: invalid conversion from 'void*' to 'int*' [-fpermissive]
   27 |         a[i] = malloc(m*sizeof(int));
      |                ~~~~~~^~~~~~~~~~~~~~~
      |                      |
      |                      void*