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

#include<stdio.h>
#define N 100

int main(){
  int i,j,k,l,n,p[N+1],m[N+1][N+1];
  scanf("%d", &n);

  for ( i = 0; i < n; i++ ){
    scanf("%d %d", &p[i], &p[i+1]);
  }

  for ( i = 0; i < n; i++ ){
    m[i][i]=0; 
  }
  for ( l = 1; l < n; l++ ){
    for ( i = 0; i < n-l+1; i++ ){
      j=i+l+1;
      m[i][j]=(1<<21);
      for ( k = i-1; k < j-1; k++ ){
	m[i][j]=min(m[i][j],m[i][k]+m[k+1][j]+p[i-1]*p[k]*p[j]);
      }
    }
  }
  printf("%d\n",m[1][n]); 
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:20:17: error: implicit declaration of function 'min'; did you mean 'main'? [-Wimplicit-function-declaration]
   20 |         m[i][j]=min(m[i][j],m[i][k]+m[k+1][j]+p[i-1]*p[k]*p[j]);
      |                 ^~~
      |                 main
Language: C

/**
  *  Matrix Chain Multiplication
  * ??£??????????????????(Matrix-Chain Multiplication problem)
  */
  

#include <stdio.h>
#include <limits.h>

int MATRIX[101][101];
int p[101];
int n;

void matrixChain();
int min(int, int);

main() {
  int i, x, y;

  scanf("%d", &n);
  for(i = 0; i < n; i++) {
    scanf("%d %d", &y, &x);
    if(i == 0) { //???????????????????????¨??§
      p[i] = y;
      p[i + 1] = x;
    } else {
      p[i + 1] = x;
    }
  }
  
  matrixChain();
  
  printf("%d\n", MATRIX[1][n]);
  
  return 0;
}


int min(int x, int y) {
  if(x >= y) {
    return y;
  } else {
    return x;
  }
}

void matrixChain() {
  int i, j, k, l, q;
  /* initialize */
  for(i=1;i<n+1;i++) {
    MATRIX[i][i] = 0;
  }
  
  /**/
  for(l=2;l<n+1;l++) {
    for(i=1;i<n-l+2;i++) {v
      j = i + l - 1;
      MATRIX[i][j] = INT_MAX;
      for(k=i;k<j;k++) {
        q = MATRIX[i][k] + MATRIX[k + 1][j] + p[i - 1] * p[k] * p[j];
        MATRIX[i][j] = min(MATRIX[i][j], q);
      }
    }
  }
}

Compiler output:
main.c:17:1: error: return type defaults to 'int' [-Wimplicit-int]
   17 | main() {
      | ^~~~
main.c: In function 'matrixChain':
main.c:56:27: error: unknown type name 'v'
   56 |     for(i=1;i<n-l+2;i++) {v
      |                           ^
Language: C

#include<stdio.h>
#include<stdlib.h>
#include<math.h>
int main() {
  int i, j, n, k, m[101], dp[101][101], s, t;
  
  scanf("%d", &n);
  for (i=0; i<n*2; i++)
    scanf("%d", &m[i]);  

  for (i=0; i<n; i++)
    for (j=0; j<n; j++)
      dp[i][j]=0;
 
  for (k=2; k<n; k++) {
    for (i=1; i<n-k+1; i++) {
     j=i+k-1;
     for (s=i; s<i; s++)
       dp[i][j]=m[s]*dp[i][j];
     for(t=0; t<j-1; t++)
       dp[i][j]=min(dp[i][j], dp[i][k]+dp[k+1][j]+m[i-1]*m[t]*m[j]);
    }
  }
  printf("%d",dp[1][n]);
  
  return 0;
}
    

Compiler output:
main.c: In function 'main':
main.c:21:17: error: implicit declaration of function 'min'; did you mean 'main'? [-Wimplicit-function-declaration]
   21 |        dp[i][j]=min(dp[i][j], dp[i][k]+dp[k+1][j]+m[i-1]*m[t]*m[j]);
      |                 ^~~
      |                 main
Language: C

#include<stdio.h>
#include<string.h>

int dp[101][101];
int *p;

int rec(int r1, int c1){
    int Min = 0;
    int num = c1 - r1;
    
    for(int i = 0; i < num; i++){
        Min = min(Min, dp[r1][r1+i] + dp[r1+i+1][c1] + p[r1-1]*p[r1+i]*p[c1]);
    }
    
    return Min;
}

int main()
{
    int i, j, n, r[100], c[100], p[100];
    
    scanf("%d", &n);
    
    for(i = 1; i <= n; i++){
        scanf("%d %d", &r[i], &c[i]);
        p[i] = c[i];
        p[1] = r[1];
    }
    
    for(i = 1; i <= n; i++){
        dp[i][i] = 0;
    }

    for(i = 1; i < n; i++){
        dp[i][i+1] = p[i-1]*p[i]*p[i+1];
    }
    
    for(j = 0; j <= n-3; j++){
        for(i = 3+j; i <= n; i++){
            dp[i-2-j][i] = rec(i-2-j, i);
        }
    }
    
    printf("%d\n", dp[1][n]);
    
    return 0;
}

Compiler output:
main.c: In function 'rec':
main.c:12:15: error: implicit declaration of function 'min' [-Wimplicit-function-declaration]
   12 |         Min = min(Min, dp[r1][r1+i] + dp[r1+i+1][c1] + p[r1-1]*p[r1+i]*p[c1]);
      |               ^~~
Language: C

#include <stdio.h>


int main(){
 int p[100];
 int m[100][100];
 int n,i,l,j,k;

 scanf("%d",&n);

 for(i = 0; i < n; i++)
  scanf("%d %d",&p[i-1],&p[i]);
  
 for(i = 0; i <= n; i++)
   m[i][i] = 0;
 
 for(l = 2; l <=n; l++){
  for(i = 1; i <= n-l+1; i++){
   j = i + l - 1;
   m[i][j] = 999999999999;
    for(k = i; k <= j - 1;k++){
     if(m[i][j] > m[i][k] + m[k + 1][j] + p[i - 1] * p[k] * p[j])
      m[i][j] > m[i][k] + m[k + 1][j] + p[i - 1] * p[k] * p[j];
    }
   }
  }

 ans = m[1][n];
      
 printf("%d\n",ans);
 
 return 0;
}

Compiler output:
main.c: In function 'main':
main.c:20:14: warning: overflow in conversion from 'long int' to 'int' changes value from '999999999999' to '-727379969' [-Woverflow]
   20 |    m[i][j] = 999999999999;
      |              ^~~~~~~~~~~~
main.c:28:2: error: 'ans' undeclared (first use in this function)
   28 |  ans = m[1][n];
      |  ^~~
main.c:28:2: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include<stdioh>
#inckude<stdlib.h>
#difine INF(100000000000000000000)

int main(){
  int i, j, k, l, n;
  int p[101],m[101][101];

 scanf("%d", &n);
 for(i=1;i<=n;i++) scanf("%d %d", &p[i-1], &p[i]);

 for(i=1;i<=n;i++) m[i][i] = 0;

 for(l=2;l<=;l++){
  for(i=1;i<=n-l+1;i++){
    j=i+l-1;
    m[i][j] = INF;
    for(k=i;k<j;k++){
      if(m[i][j] > m[i][k]+m[k+1][j]+p[i-1]*p[k]*p[j]){
??????????      ??m[i][j] = m[i][k]+m[k+1][j]+p[i-1]*p[k]*p[j];
      }
    }
  }
 }

    printf("%d\n", m[1][n]);
      
    return 0;
}

Compiler output:
main.c:1:9: fatal error: stdioh: No such file or directory
    1 | #include<stdioh>
      |         ^~~~~~~~
compilation terminated.
Language: C

#include<stdio.h>
#inckude<stdlib.h>
#difine INF(100000000000000000000)

int main(){
  int i, j, k, l, n;
  int p[101],m[101][101];

 scanf("%d", &n);
 for(i=1;i<=n;i++) scanf("%d %d", &p[i-1], &p[i]);

 for(i=1;i<=n;i++) m[i][i] = 0;

 for(l=2;l<=;l++){
  for(i=1;i<=n-l+1;i++){
    j=i+l-1;
    m[i][j] = INF;
    for(k=i;k<j;k++){
      if(m[i][j] > m[i][k]+m[k+1][j]+p[i-1]*p[k]*p[j]){
??????????      ??m[i][j] = m[i][k]+m[k+1][j]+p[i-1]*p[k]*p[j];
      }
    }
  }
 }

    printf("%d\n", m[1][n]);
      
    return 0;
}

Compiler output:
main.c:2:2: error: invalid preprocessing directive #inckude; did you mean #include?
    2 | #inckude<stdlib.h>
      |  ^~~~~~~
      |  include
main.c:3:2: error: invalid preprocessing directive #difine; did you mean #define?
    3 | #difine INF(100000000000000000000)
      |  ^~~~~~
      |  define
main.c: In function 'main':
main.c:14:13: error: expected expression before ';' token
   14 |  for(l=2;l<=;l++){
      |             ^
main.c:17:15: error: 'INF' undeclared (first use in this function)
   17 |     m[i][j] = INF;
      |               ^~~
main.c:17:15: note: each undeclared identifier is reported only once for each function it appears in
main.c:20:1: error: expected expression before '?' token
   20 | ??????????      ??m[i][j] = m[i][k]+m[k+1][j]+p[i-1]*p[k]*p[j];
      | ^
Language: C

#include<stdio.h>
#include<stdlib.h>
#difine INF(100000000000000000000)

int main(){
  int i, j, k, l, n;
  int p[101],m[101][101];

 scanf("%d", &n);
 for(i=1;i<=n;i++) scanf("%d %d", &p[i-1], &p[i]);

 for(i=1;i<=n;i++) m[i][i] = 0;

 for(l=2;l<=;l++){
  for(i=1;i<=n-l+1;i++){
    j=i+l-1;
    m[i][j] = INF;
    for(k=i;k<j;k++){
      if(m[i][j] > m[i][k]+m[k+1][j]+p[i-1]*p[k]*p[j]){
??????????      ??m[i][j] = m[i][k]+m[k+1][j]+p[i-1]*p[k]*p[j];
      }
    }
  }
 }

    printf("%d\n", m[1][n]);
      
    return 0;
}

Compiler output:
main.c:3:2: error: invalid preprocessing directive #difine; did you mean #define?
    3 | #difine INF(100000000000000000000)
      |  ^~~~~~
      |  define
main.c: In function 'main':
main.c:14:13: error: expected expression before ';' token
   14 |  for(l=2;l<=;l++){
      |             ^
main.c:17:15: error: 'INF' undeclared (first use in this function)
   17 |     m[i][j] = INF;
      |               ^~~
main.c:17:15: note: each undeclared identifier is reported only once for each function it appears in
main.c:20:1: error: expected expression before '?' token
   20 | ??????????      ??m[i][j] = m[i][k]+m[k+1][j]+p[i-1]*p[k]*p[j];
      | ^
Language: C

#include<stdio.h>


int main(){
  int i, j, k, l, n;
  int p[101],m[101][101];

 scanf("%d", &n);
 for(i=1;i<=n;i++) scanf("%d %d", &p[i-1], &p[i]);

 for(i=1;i<=n;i++) m[i][i] = 0;

 for(l=2;l<=;l++){
  for(i=1;i<=n-l+1;i++){
    j=i+l-1;
    m[i][j] = 10000000000000000;
    for(k=i;k<j;k++){
      if(m[i][j] > m[i][k]+m[k+1][j]+p[i-1]*p[k]*p[j]){
??????????      ??m[i][j] = m[i][k]+m[k+1][j]+p[i-1]*p[k]*p[j];
      }
    }
  }
 }

    printf("%d\n", m[1][n]);
      
    return 0;
}

Compiler output:
main.c: In function 'main':
main.c:13:13: error: expected expression before ';' token
   13 |  for(l=2;l<=;l++){
      |             ^
main.c:16:15: warning: overflow in conversion from 'long int' to 'int' changes value from '10000000000000000' to '1874919424' [-Woverflow]
   16 |     m[i][j] = 10000000000000000;
      |               ^~~~~~~~~~~~~~~~~
main.c:19:1: error: expected expression before '?' token
   19 | ??????????      ??m[i][j] = m[i][k]+m[k+1][j]+p[i-1]*p[k]*p[j];
      | ^
Language: C

#include<stdio.h>

int main(){
  int i, j, k, l, n;
  int p[101],m[101][101];

 scanf("%d", &n);
 for(i=1;i<=n;i++) scanf("%d %d", &p[i-1], &p[i]);

 for(i=1;i<=n;i++) m[i][i] = 0;

 for(l=2;l<=n;l++){
  for(i=1;i<=n-l+1;i++){
    j=i+l-1;
    m[i][j] = 10000000000000000;
    for(k=i;k<j;k++){
      if(m[i][j] > m[i][k]+m[k+1][j]+p[i-1]*p[k]*p[j]){
??????????      ??m[i][j] = m[i][k]+m[k+1][j]+p[i-1]*p[k]*p[j];
      }
    }
  }
 }

    printf("%d\n", m[1][n]);
      
    return 0;
}

Compiler output:
main.c: In function 'main':
main.c:15:15: warning: overflow in conversion from 'long int' to 'int' changes value from '10000000000000000' to '1874919424' [-Woverflow]
   15 |     m[i][j] = 10000000000000000;
      |               ^~~~~~~~~~~~~~~~~
main.c:18:1: error: expected expression before '?' token
   18 | ??????????      ??m[i][j] = m[i][k]+m[k+1][j]+p[i-1]*p[k]*p[j];
      | ^
Language: C

#include <stdio.h>
??
??
int main(){
??
??int n,i,l,j,k,ans;
????int p[100];
??int m[100][100];
??
??scanf("%d",&n);
??
??for(i = 1; i <= n; i++)
????scanf("%d %d",&p[i-1],&p[i]);
??????
??for(i = 1; i <= n; i++)
??????m[i][i] = 0;
????
??for(l = 2; l <=n; l++){
????for(i = 1; i <= n-l+1; i++){
??????j = i + l - 1;
??????m[i][j] = 100000000000000;
????????for(k = i; k < j;k++){
??????????if(m[i][j] > m[i][k] + m[k + 1][j] + p[i - 1] * p[k] * p[j])
????????????m[i][j] = m[i][k] + m[k + 1][j] + p[i - 1] * p[k] * p[j];
????????}
??????}
????}
??
????
??????????????
??printf("%d\n",m[1][n]);
????
??return 0;
}
Compile Error Logs:
You are not authorized to see the message. 

Status
Judge: 10/10 
C 
CPU: 00.00 sec 
Memory: 636 KB 
Length: 533 B 
2016-12-06 20:46 
2016-12-06 20:46 
Results for testcases
Case #
Verdict
CPU Time
Memory
In
Out
Case Name
Case #1:
: Accepted 
00.00 sec
604 KB
7 B
2 B
test_case_1
Case #2:
: Accepted 
00.00 sec
604 KB
13 B
5 B
test_case_2
Case #3:
: Accepted 
00.00 sec
604 KB
30 B
5 B
test_case_3
Case #4:
: Accepted 
00.00 sec
608 KB
63 B
5 B
test_case_4
Case #5:
: Accepted 
00.00 sec
612 KB
136 B
6 B
test_case_5
Case #6:
: Accepted 
00.00 sec
624 KB
282 B
6 B
test_case_6
Case #7:
: Accepted 
00.00 sec
628 KB
438 B
6 B
test_case_7
Case #8:
: Accepted 
00.00 sec
636 KB
487 B
6 B
test_case_8
Case #9:

Compiler output:
main.c:2:1: error: expected identifier or '(' before '?' token
    2 | ??
      | ^
main.c:35:1: error: unknown type name 'Compile'
   35 | Compile Error Logs:
      | ^~~~~~~
main.c:35:15: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'Logs'
   35 | Compile Error Logs:
      |               ^~~~
main.c:47:6: error: stray '#' in program
   47 | Case #
      |      ^
main.c:54:6: error: stray '#' in program
   54 | Case #1:
      |      ^
main.c:61:6: error: stray '#' in program
   61 | Case #2:
      |      ^
main.c:68:6: error: stray '#' in program
   68 | Case #3:
      |      ^
main.c:75:6: error: stray '#' in program
   75 | Case #4:
      |      ^
main.c:82:6: error: stray '#' in program
   82 | Case #5:
      |      ^
main.c:89:6: error: stray '#' in program
   89 | Case #6:
      |      ^
main.c:96:6: error: stray '#' in program
   96 | Case #7:
      |      ^
main.c:103:6: error: stray '#' in program
  103 | Case #8:
      |      ^
main.c:110:6: error: stray '#' in program
  110 | Case #9:
      |      ^
Language: C

#include <stdio.h>
??
??
int main(){
??
??int n,i,l,j,k,ans;
????int p[100];
??int m[100][100];
??
??scanf("%d",&n);
??
??for(i = 1; i <= n; i++)
????scanf("%d %d",&p[i-1],&p[i]);
??????
??for(i = 1; i <= n; i++)
??????m[i][i] = 0;
????
??for(l = 2; l <=n; l++){
????for(i = 1; i <= n-l+1; i++){
??????j = i + l - 1;
??????m[i][j] = 100000000000000;
????????for(k = i; k < j;k++){
??????????if(m[i][j] > m[i][k] + m[k + 1][j] + p[i - 1] * p[k] * p[j])
????????????m[i][j] = m[i][k] + m[k + 1][j] + p[i - 1] * p[k] * p[j];
????????}
??????}
????}
??
????
??????????????
??printf("%d\n",m[1][n]);
????
??return 0;
}

Compiler output:
main.c:2:1: error: expected identifier or '(' before '?' token
    2 | ??
      | ^
Language: C

#include<stdio.h>
#include<algorithm>
using namespace std;

static const int N = 100;

int main(){
  int n, p[N + 1], m[N + 1][N + 1];
  cin >> n;l <= n; l++){
  for( int i = 1; i <= n; i++){
    cin >> p[i - 1] >> p[i];
  }
  
  for( int i = 1; i <= n; i++) m[i][i] = 0;
  for( int l = 2; l <= n; l++){
    for( int i = 1; i <= n - 1; i++){
      int j = i + l - 1;
      m[i][j] = (1 << 21);
      for( int k = i; k <= j - 1; k++){
        m[i][j] = min(m[i][j], m[i][k] + m[k + 1][j] + p[i - 1]*p[k]*p[j]);
      }
    }
  }
  
  cout << m[1][n] << endl;
  
  return 0;
}
    

Compiler output:
main.c:2:9: fatal error: algorithm: No such file or directory
    2 | #include<algorithm>
      |         ^~~~~~~~~~~
compilation terminated.
Language: C

#include<stdio.h>
#include<algorithm>
using namespace std;

#define N 100

int main(){

  int n, p[N + 1], m[N + 1][N + 1];
  int i, j, k, l;
  
  scanf("%d", &n);
  
  for(i = 1; i <= n; i++){
    scanf("%d", &p[i - 1]);
    scanf("%d", &p[i]);
  }
  
  for(i = 0; i <= n; i++){
    m[i][i] = 0;
  }
  
  for(l = 2; l <= n; l++){
    for(i = 1; i <= n - l + 1; i++){
      int j = i + l - 1;
      m[i][j] = (1 << 21);
      
      for(k = i; k <= j - 1; k++){
        m[i][j] = min(m[i][j], m[i][k] + m[k + 1][j] + p[i - 1]*p[k]*p[j]);
      }
    }
  }
  
  printf("%d\n", m[1][n]);
  
  return 0;
}

Compiler output:
main.c:2:9: fatal error: algorithm: No such file or directory
    2 | #include<algorithm>
      |         ^~~~~~~~~~~
compilation terminated.
Language: C

#include<stdio.h>
#include<algorithm>
using namespace std;

#define N 100

int main(){

  int n, p[N + 1], m[N + 1][N + 1];
  int i, j, k, l;
  
  scanf("%d", &n);
  
  for(i = 1; i <= n; i++){
    scanf("%d", &p[i - 1]);
    scanf("%d", &p[i]);
  }
  
  for(i = 0; i <= n; i++){
    m[i][i] = 0;
  }
  
  for(l = 2; l <= n; l++){
    for(i = 1; i <= n - l + 1; i++){
      int j = i + l - 1;
      m[i][j] = 1410065408;
      
      for(k = i; k <= j - 1; k++){
        if( m[i][j] < m[i][k] + m[k + 1][j] + p[i - 1]*p[k]*p[j]){
          m[i][j] = m[i][j] ;
        } else {
          m[i][j] = m[i][k] + m[k + 1][j] + p[i - 1]*p[k]*p[j];
        }
      }
    }
  }
  
  printf("%d\n", m[1][n]);
  
  return 0;
}

Compiler output:
main.c:2:9: fatal error: algorithm: No such file or directory
    2 | #include<algorithm>
      |         ^~~~~~~~~~~
compilation terminated.
Language: C

#include<stdio.h>
 
int main(){

  int i, j, k, l, n;
  int n, p[101], m[101][101];
   
  scanf("%d", &n); 
  for(i = 1; i <= n; i++){
    scanf("%d %d", &p[i - 1], &p[i]);
  }
   
  for(i = 0; i <= n; i++){
    m[i][i] = 0;
  }
   
  for(l = 2; l <= n; l++){
    for(i = 1; i <= n-l+1; i++){
      int j = i+l-1;
      m[i][j] = 10000000000;
       
      for(k = i; k <= j-1; k++){
        if( m[i][j] < m[i][k] + m[k+1][j] + p[i-1]*p[k]*p[j]){
          m[i][j] = m[i][j] ;
        } else {
          m[i][j] = m[i][k] + m[k+1][j] + p[i-1]*p[k]*p[j];
        }
      }
    }
  }
   
  printf("%d\n", m[1][n]);
   
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:6:7: error: redeclaration of 'n' with no linkage
    6 |   int n, p[101], m[101][101];
      |       ^
main.c:5:19: note: previous declaration of 'n' with type 'int'
    5 |   int i, j, k, l, n;
      |                   ^
main.c:20:17: warning: overflow in conversion from 'long int' to 'int' changes value from '10000000000' to '1410065408' [-Woverflow]
   20 |       m[i][j] = 10000000000;
      |                 ^~~~~~~~~~~
Language: C

#include<stdio.h>
#define A 100

int main(){

    int i,n,count=0;
    int x[A],y[A};

    scanf("%d",&n);

    for(i=0;i<n;i++)
        scanf("%d %d",&x[i],&y[i]);

    if(n=1)
        count=0;

    else{
        for(i=0;i<n-1;i++)
            count=count+x[0]*y[i]*y[i+1];
   }

printf("%d\n",count);

return 0;

}

Compiler output:
main.c: In function 'main':
main.c:7:17: error: expected ']' before '}' token
    7 |     int x[A],y[A};
      |                 ^
main.c:12:30: error: 'y' undeclared (first use in this function)
   12 |         scanf("%d %d",&x[i],&y[i]);
      |                              ^
main.c:12:30: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include<stdio.h>
 
#define MAX 100

 
int main(){
  int i, j, k, l, m, p[200],q[200][200];
 
  scanf("%d",&m);
  for(i=1;i <= m;i++)
    scanf("%d %d",&p[i],&p[i+1]);
 
  for(i=1;i <= m;i++)
    m[i][i] = 0;
 
  for(i = 2; i <= m;i++){
    for(j = 1; j <= m-l; j++){
      m[i][j] = 1;
      for(k=i;k<j;k++){
    }
  }
  return 0;

Compiler output:
main.c: In function 'main':
main.c:14:6: error: subscripted value is neither array nor pointer nor vector
   14 |     m[i][i] = 0;
      |      ^
main.c:18:8: error: subscripted value is neither array nor pointer nor vector
   18 |       m[i][j] = 1;
      |        ^
main.c:22:3: error: expected declaration or statement at end of input
   22 |   return 0;
      |   ^~~~~~
main.c:22:3: error: expected declaration or statement at end of input
Language: C

#include<stdio.h>
#define N 100
int main()
{
  int r[N],c[N][N];
  int i,j,k,l,m,n;
  scanf("%d",&n);
  for(i=0;i<n;i++) scanf("%d%d",&r[i],&j);
  
  r[n]=j;
  
  for(i=1;i<=n;i++){
    c[i][i]=0;
  }
   for(j=2;j<=n;j++){
    for(i=1;i<=n-j+1;i++){
      l =i+j-1;
      c[i][l]=10000000;
      for(k=i;k<=l-1;k++){
	
    m=c[i][k]+c[k+1][l]+(r[i-1]*r[k]*r[l]);
        
    if(c[i][l]>m) c[i][l]=m;
      }
    }
  }
  printf("%d\n",c[1][n]);
    
  return 0;

Compiler output:
main.c: In function 'main':
main.c:29:3: error: expected declaration or statement at end of input
   29 |   return 0;
      |   ^~~~~~
Language: C

static const int N = 100;

int min(int a, int b){ return a < b ? a : b; }

int main(){

  int i, j;
  int k, l;
  int n;
  int  p[N+1], m[N+1][N+1];
  int q;

  scanf("%d", &n);

  for ( i = 1; i <= n; i++ ){

    scanf("%d %d", &p[i-1], &p[i]);

  }

  for ( i = 1; i <= n; i++ ) {
    m[i][i] = 0;
  }
  for ( l = 2; l <= n; l++ ){
    for ( i = 0; i <= n-l+1; i++ ){
      j = i + l - 1;
      m[i][j] = INF;
      for ( k = i; k <= j-1; k++ ){ 

	q = m[i][k] + m[k+1][j] + p[i-1]*p[k]*p[j];
	m[i][j] = min(m[i][j], q);

      }
    }
  }

  printf("%d\n", m[1][n]);
  
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:13:3: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
   13 |   scanf("%d", &n);
      |   ^~~~~
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
  +++ |+#include <stdio.h>
    1 | static const int N = 100;
main.c:13:3: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
   13 |   scanf("%d", &n);
      |   ^~~~~
main.c:13:3: note: include '<stdio.h>' or provide a declaration of 'scanf'
main.c:27:17: error: 'INF' undeclared (first use in this function)
   27 |       m[i][j] = INF;
      |                 ^~~
main.c:27:17: note: each undeclared identifier is reported only once for each function it appears in
main.c:37:3: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
   37 |   printf("%d\n", m[1][n]);
      |   ^~~~~~
main.c:37:3: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:37:3: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
main.c:37:3: note: include '<stdio.h>' or provide a declaration of 'printf'
Language: C

#include <stdio.h>
#define N 100
int main () {
int n, a[N], b[N][N], i, j, k, l;

scanf("%d", &n);
for(i = 1 ; i < N ; i++) {
scanf("%d%d", &a[i-1], &a[i]);
}

for(i = 1 ; i <= n ; i++) b[i][i] = 0;
for(j = 2 ; j <= n ; j++) {
 for(i = 1 ; i <= n-1 ; i++) {
  k = i + j - 1;
  for(l = i ; l <= k-1 ; l++) {
    b[i][k] = min(b[i][k], b[i][l] + b[l+1][k] + a[i-1] * a[l] * a[k]);
  }
 }
}

printf("%d\n", b[1][n]);
return 0;
}

Compiler output:
main.c: In function 'main':
main.c:16:15: error: implicit declaration of function 'min'; did you mean 'main'? [-Wimplicit-function-declaration]
   16 |     b[i][k] = min(b[i][k], b[i][l] + b[l+1][k] + a[i-1] * a[l] * a[k]);
      |               ^~~
      |               main
Language: C

#include <stdio.h>
#include <math.h>
#define N 100
int main () {
int n, a[N], b[N][N], i, j, k, l;

scanf("%d", &n);
for(i = 1 ; i < N ; i++) {
scanf("%d%d", &a[i-1], &a[i]);
}

for(i = 1 ; i <= n ; i++) b[i][i] = 0;
for(j = 2 ; j <= n ; j++) {
 for(i = 1 ; i <= n-1 ; i++) {
  k = i + j - 1;
  for(l = i ; l <= k-1 ; l++) {
    b[i][k] = min(b[i][k], b[i][l] + b[l+1][k] + a[i-1] * a[l] * a[k]);
  }
 }
}

printf("%d\n", b[1][n]);
return 0;
}

Compiler output:
main.c: In function 'main':
main.c:17:15: error: implicit declaration of function 'min'; did you mean 'main'? [-Wimplicit-function-declaration]
   17 |     b[i][k] = min(b[i][k], b[i][l] + b[l+1][k] + a[i-1] * a[l] * a[k]);
      |               ^~~
      |               main
Language: C

#include <stdio.h>
#include <algorithm>
#define N 100
int main () {
int n, a[N], b[N][N], i, j, k, l;

scanf("%d", &n);
for(i = 1 ; i < N ; i++) {
scanf("%d%d", &a[i-1], &a[i]);
}

for(i = 1 ; i <= n ; i++) b[i][i] = 0;
for(j = 2 ; j <= n ; j++) {
 for(i = 1 ; i <= n-1 ; i++) {
  k = i + j - 1;
  for(l = i ; l <= k-1 ; l++) {
    b[i][k] = min(b[i][k], b[i][l] + b[l+1][k] + a[i-1] * a[l] * a[k]);
  }
 }
}

printf("%d\n", b[1][n]);
return 0;
}

Compiler output:
main.c:2:10: fatal error: algorithm: No such file or directory
    2 | #include <algorithm>
      |          ^~~~~~~~~~~
compilation terminated.
Language: C

#include<stdio.h>

int count = 100;
int min(int a,int b){
  if(a<b)return a;
  else return b;
}

int main(){
  int i,j,k,r,num;
  int A[count+1],M[count+1][count+1];
  scanf("%d",&num);
  for(i = 1;i<= num;i++){
    scanf("%d %d",&A[i-1],&A[i]);
    M[i][i] = 0;
  }

  for(i = 2; i<= num;i++){
    for(j = 1; j <=num-i+1;j++){
      k = i + j -1;
      M[j][k] = (1<<21)

Compiler output:
main.c: In function 'main':
main.c:21:24: error: expected ';' at end of input
   21 |       M[j][k] = (1<<21)
      |                        ^
      |                        ;
main.c:21:7: error: expected declaration or statement at end of input
   21 |       M[j][k] = (1<<21)
      |       ^
main.c:21:7: error: expected declaration or statement at end of input
main.c:21:7: error: expected declaration or statement at end of input
Language: C

#include<stdio.h>

int count = 100;
int min(int a,int b){
  if(a<b)return a;
  else return b;
}

int main(){
  int i,j,k,r,num;
  int A[count+1],M[count+1][count+1];
  scanf("%d",&num);
  for(i = 1;i<= num;i++){
    scanf("%d %d",&A[i-1],&A[i]);
    M[i][i] = 0;
  }

  for(i = 2; i<= num;i++){
    for(j = 1; j <=num-i+1;j++){
      k = i + j -1;
      M[j][k] = 100000000;
      for(k = i;k <=r-1;k++){
	M[j][r] = min(M[j][r],M[j][k]+M[k+1][r]+A[j-1]*A[k]A[r]);
      }
    }
  }
  printf("%d\n",M[1][num]);
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:23:60: error: expected ')' before 'A'
   23 |         M[j][r] = min(M[j][r],M[j][k]+M[k+1][r]+A[j-1]*A[k]A[r]);
      |                      ~                                     ^
      |                                                            )
Language: C

{
    for(i=1;i<=n-l+1;i++){
      j=i+l-1;
      m[i][j]=INF;
      for(k=i;k<=j-1;k++){
	if(m[i][j]<m[i][k]+m[k+1][j]+p[i-1]*p[k]*p[j]){
	  m[i][j]=m[i][j];
	}
	else{
	  m[i][j]=m[i][k]+m[k+1][j]+p[i-1]*p[k]*p[j];
	}
      }
    }
  }

Compiler output:
main.c:1:1: error: expected identifier or '(' before '{' token
    1 | {
      | ^
Language: C

#include <stdio.h>
#define MAX 100
#define INFTY 10000000
 
void compute(int );
int min(int, int);
 
int A[MAX];
int B[MAX][MAX];
 
 
int main(void){
 
  int i,j,k,n,r,c;
 
  scanf("%d",&n);
 
 
  for(i=0; i<n; i++){   
 
    scanf("%d %d",&r,&c);
    A[i]=r;
    A[i+1]=c;
  }
   
  compute(n);
   
   
  printf("%d\n",B[1][n]);
 
  return 0;
}
 
void compute(int n) {
 
  int i,j,k,l,q;
 
  for(i=1; i<=n; i++)
    B[i][i]=0;
 
  for(l=2; l<=n; l++){
 
    for(i=1; i<=n-l+1; i++){
      j=i+l-1;
      B[i][j]=INFTY;
 
      for(k=i; k<=j-1; k++){
 
    q=B[i][k]+B[k+1][j]+A[i-1]*A[k]*A[j];
 
    A[i][j]=min(B[i][j],q);
      }
    }
  }
}
 
 
 
int min(int x,int y){
  if(x<y)
    return x;
  else
    return y;
}

Compiler output:
main.c: In function 'compute':
main.c:51:9: error: subscripted value is neither array nor pointer nor vector
   51 |     A[i][j]=min(B[i][j],q);
      |         ^
Language: C

#include<stdio.h>

int min(int a, int b);

int main(){
  int m[100][100];
  int r[100],c[100];
  int n,i,l,j,k,q;

  scanf("%d",&n);
  for(i=0;i<n;i++){
    scanf("%d%d",&r[i],&c[i]);
  }
  r[n]=c[n-1];

  for(i=0;i<n;i++){
    m[i][i]=0;
  }
  for(l=1;l<n;l++){
    for(i=0;i<n-l+1;i++){
      j=i+l-1;
      m[i][j]=2000000;
      for(k=i;k<j;k++){
	q=m[i][k]+m[k+1][j]+r[i-1]*r[k]*r[j];
	m[i][j]=min(m[i][j],q);
      }
    }
  }

  printf("%d\n",min[0][n]);

  return 0;
}
int min(int a,int b){
  if(a>b) return b;
  else return a;
}
	

Compiler output:
main.c: In function 'main':
main.c:30:20: error: subscripted value is neither array nor pointer nor vector
   30 |   printf("%d\n",min[0][n]);
      |                    ^
Language: C

#include<stdio.h>
#define M 100000
#define n 100
#define r 100
#define c 100
void MCO(int);
int m[C][R],p[N];
??
int main(){
????int i,n,c;
????scanf("%d",&n);
????for(i = 0; i < n; i++){
????????scanf("%d%d",&p[i],&c);
????????p[i+1] = c;
????}
????MCO(n);
????printf("%d\n",m[1][n]);
??
????return 0;
}
????
void MCO(n){
????int i,j,a,b,c;
????????
????for(i = 1;i <= n;i++)
????????m[i][i]=0;
??
????for(a = 2;a <= n;a++){
????????for(i = 1;i <= n-a+1; i++){
????????????j = i + a - 1;
????????????m[i][j] = c;???????? 
????????????for(b = i;b <= j-1;b++){
????????c = m[i][b] + m[b+1][j] + p[i-1] * p[b] * p[j];
????????if(c < c[i][j]) c[i][j] = c;
????????????}
????????}
????}
}

Compiler output:
main.c:7:7: error: 'C' undeclared here (not in a function)
    7 | int m[C][R],p[N];
      |       ^
main.c:7:10: error: 'R' undeclared here (not in a function)
    7 | int m[C][R],p[N];
      |          ^
main.c:7:15: error: 'N' undeclared here (not in a function)
    7 | int m[C][R],p[N];
      |               ^
main.c:8:1: error: expected identifier or '(' before '?' token
    8 | ??
      | ^
main.c:21:1: error: expected identifier or '(' before '?' token
   21 | ????
      | ^
Language: C

#include<stdio.h>
#define M 100000

void MCO(int);
int m[100][100], p[100];
??
int main(){
????int i, c[100], n;
????scanf("%d",&n);
????for(i = 0; i < n; i++){
????????scanf("%d%d",&r[i],&c[i]);
????????if(i == n-1){
      r[i+1] = c[i];
      }
????}
????MCO(n);
????printf("%d\n",m[1][n]);
??
????return 0;
}
????
void MCO(n){
????int i, j, k, l, q;
????????
????for(i = 1;i <= n;i++)
????????m[i][i]=0;
??
????for(k = 2;k <= n;k++){
????????for(i = 1;i <= n-k+1; i++){
????????????j = i + k - 1;
????????????m[i][j] = M;???????? 
????????????for(l = i;l <= j-1;l++){
????????q = m[i][l] + m[l+1][j] + p[i-1] * p[l] * p[j];
????????if(q < m[i][j]) m[i][j] = c;
????????????}
????????}
????}
}

Compiler output:
main.c:6:1: error: expected identifier or '(' before '?' token
    6 | ??
      | ^
main.c:21:1: error: expected identifier or '(' before '?' token
   21 | ????
      | ^
Language: C

#include<stdio.h>
#define M 100000

void MCO(int);
int m[100][100], r[100];
??
int main(){
????int i, c[100], n;
????scanf("%d",&n);
????for(i = 0; i < n; i++){
????????scanf("%d%d",&r[i],&c[i]);
????????if(i == n-1){
      r[i+1] = c[i];
      }
????}
????MCO(n);
????printf("%d\n",m[1][n]);
??
????return 0;
}
????
void MCO(n){
????int i, j, k, l, q;
????????
????for(i = 1;i <= n;i++)
????????m[i][i]=0;
??
????for(k = 2;k <= n;k++){
????????for(i = 1;i <= n-k+1; i++){
????????????j = i + k - 1;
????????????m[i][j] = M;???????? 
????????????for(l = i;l <= j-1;l++){
????????q = m[i][l] + m[l+1][j] + p[i-1] * p[l] * p[j];
????????if(q < m[i][j]) m[i][j] = c;
????????????}
????????}
????}
}

Compiler output:
main.c:6:1: error: expected identifier or '(' before '?' token
    6 | ??
      | ^
main.c:21:1: error: expected identifier or '(' before '?' token
   21 | ????
      | ^
Language: C

#include<stdio.h>
#define M 100000

void MCO();
int m[100][100], r[100], n;
??
int main(){
????int i, c;
????scanf("%d",&n);
????for(i = 0; i < n; i++){
????????scanf("%d%d",&r[i],&c);
    r[i+1] = c;
????}
????MCO();
????printf("%d\n",m[1][n]);
??
????return 0;
}
????
void MCO(){
????int i, j, k, l, q;
????????
????for(i = 1;i <= n;i++)
????????m[i][i]=0;
??
????for(k = 2;k <= n;k++){
????????for(i = 1;i <= n-k+1; i++){
????????????j = i + k - 1;
????????????m[i][j] = M;???????? 
????????????for(l = i;l <= j-1;l++){
????????q = m[i][l] + m[l+1][j] + p[i-1] * p[l] * p[j];
????????if(q < m[i][j]) m[i][j] = c;
????????????}
????????}
????}
}

Compiler output:
main.c:6:1: error: expected identifier or '(' before '?' token
    6 | ??
      | ^
main.c:19:1: error: expected identifier or '(' before '?' token
   19 | ????
      | ^
Language: C

#include<stdio.h>
#define INF 1000000000

int min(int,int);
int p[101];
int m[101][101];
int main(){
  int n,i,l,k,j,b,q;
  scanf("%d",&n);
  for(i=1;i<=n;i++){
    scanf("%d %d",&p[i-1],&p[i]);
  }
  for(i=1;i<=n;i++)m[i][i]=0;
  for(l=2;l<=n;l++){
    for(i=1;i<=n-l+1;i++){
      j=i+l-1;
      m[i][j]=INF;
      for(k=i;k<=j-1;k++){
	q=m[i][k]+m[k+1][j]+p[i-1]*p[k]*p[j]
	m[i][j]=min(m[i][j],q);
      }
    }
  }
  printf("%d\n",m[1][j]);
  return 0;
}
int min(int m,int q){
  int mina;
  if(m>=q) return q;
  else if(m<=q)return m;
}

Compiler output:
main.c: In function 'main':
main.c:19:45: error: expected ';' before 'm'
   19 |         q=m[i][k]+m[k+1][j]+p[i-1]*p[k]*p[j]
      |                                             ^
      |                                             ;
   20 |         m[i][j]=min(m[i][j],q);
      |         ~
Language: C

#include <stdio.h>
#define INF 200001
int A[100];
int B[100][100];

void mCO(int n){
  int i,j,k,l,q;
  for(i=i;i<=n;i++){
    B[i][i]=0;
  }
  for(l=2;l<=n;l++){
    for(i=1;i<=n-l+1;i++){
      j=i+l-1;
     B[i][j]=INF;
      for(k=i;k<=j-1;k++){
	q=B[i][k]+B[k+1][j]+A[i-1]*A[k]*A[j];
	B[i][j]=min(m[i][j],q);
      }
    }
  }
  printf("%d\n",B[i-1][n]);
}
 
int min(int a,int b){
  if(a>b){
    return y;
  }
  else {
    return x;
  }
}
      
int main(){
  int i,n;
  scanf("%d",&n);
  for(i=0;i<n;i++){
    scanf("%d%d",&A[i],&A[i+1]);
  }
  mCO(n);
  return 0;
}

Compiler output:
main.c: In function 'mCO':
main.c:17:17: error: implicit declaration of function 'min' [-Wimplicit-function-declaration]
   17 |         B[i][j]=min(m[i][j],q);
      |                 ^~~
main.c:17:21: error: 'm' undeclared (first use in this function)
   17 |         B[i][j]=min(m[i][j],q);
      |                     ^
main.c:17:21: note: each undeclared identifier is reported only once for each function it appears in
main.c: In function 'min':
main.c:26:12: error: 'y' undeclared (first use in this function)
   26 |     return y;
      |            ^
main.c:29:12: error: 'x' undeclared (first use in this function)
   29 |     return x;
      |            ^
Language: C

#include<stdio.h>
#define  N 100

int main() {
  int n,p[N+1], m[N+1][N+1];
  scanf("%d",&n);
  for (int i = 1;i <=n; i++) {
    scanf("%d %d",&p[i-1],&p[i]);
  }
  for (int i = 1; i <= n; i++) m[i][i] = 0;
  for (int j = 2; j <= n; j++){
    int k = i + j -1;
    m[i][k] = 1000000;
    for (int l = i;k <= j -1;k++) {
      if(m[i][k]>m[l+1][k]+p[i-1]*p[k]*p[k])
      m[i][k] = m[i][l]+m[l+1][k]+p[i-1]*p[k]*p[k];
      }
    }
  }

  printf("m[1][n]\n");
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:12:13: error: 'i' undeclared (first use in this function)
   12 |     int k = i + j -1;
      |             ^
main.c:12:13: note: each undeclared identifier is reported only once for each function it appears in
main.c: At top level:
main.c:21:10: error: expected declaration specifiers or '...' before string constant
   21 |   printf("m[1][n]\n");
      |          ^~~~~~~~~~~
main.c:22:3: error: expected identifier or '(' before 'return'
   22 |   return 0;
      |   ^~~~~~
main.c:23:1: error: expected identifier or '(' before '}' token
   23 | }
      | ^
Language: C

#include<stdio.h>

int LCS(char [],char[])

int LCS(char X[],char Y[]){
	
int count,i,j,n,m,C[1000][1000];


count++;
}
}
return count;
}

int main(){
	
	int q,i;
	char n[1000],m[1000];
	
	scanf("%d",&q);
	for(i=0;i<=q;i++){
	scanf("%s",n[i]);
	scanf("%s",m[i]);
	printf("%d\n",LCS(n,m));
	}

	return 0;
}

Compiler output:
main.c: In function 'LCS':
main.c:5:27: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
    5 | int LCS(char X[],char Y[]){
      |                           ^
main.c:12:1: error: expected declaration specifiers before '}' token
   12 | }
      | ^
main.c:13:1: error: expected declaration specifiers before 'return'
   13 | return count;
      | ^~~~~~
main.c:14:1: error: expected declaration specifiers before '}' token
   14 | }
      | ^
main.c:16:11: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
   16 | int main(){
      |           ^
main.c:30: error: expected '{' at end of input
Language: C

#include <stdio.h>

int main(void)
{
  int i,j,k,l,n,a[101],b[101][101];

  scanf("%d",&n);
  for(i=1;i<=n;i++){
    scanf("%d",&a[i-1]);
    scanf("%d",&a[i]);
  }
  for(i=1;i<=n;i++){
    b[i][i]=0;
  }
  for(l=2;l<=n;l++){
    for(i=1;i<=n-l+1;i++){
      j=i+l-1;
      b[i][j]=(1<<21);
      for(k=1;k<=j-1;k++){
        if(i==j){
          b[i][j]=0;
        }
        else if(i<j){
          b[i][j]=b[i][k]+b[k+1][j+a[i-1]*a[k]*a[j];
        }
      }
    }
  }
  printf("%d\n",b[1][n]);
  
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:24:52: error: expected ']' before ';' token
   24 |           b[i][j]=b[i][k]+b[k+1][j+a[i-1]*a[k]*a[j];
      |                                                    ^
      |                                                    ]
main.c:24:53: error: expected ';' before '}' token
   24 |           b[i][j]=b[i][k]+b[k+1][j+a[i-1]*a[k]*a[j];
      |                                                     ^
      |                                                     ;
   25 |         }
      |         ~
Language: C

#include<stdio.h>

int main (void)
{
int i, j, k, l, n;
int p[101], m[101][101];
????
scanf("%d", &n); 
for(i = 1; i <= n; i++){
scanf("%d %d", &p[i - 1], &p[i]);
}

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

for(l = 2; l <= n; l++){

for(i = 1; i <= n-l+1; i++){
int j = i+l-1;
m[i][j] = 10000000000;

for(k = i; k <= j-1; k++){

if( m[i][j] < m[i][k] + m[k+1][j] + p[i-1]*p[k]*p[j]){
m[i][j] = m[i][j] ;
} else {
m[i][j] = m[i][k] + m[k+1][j] + p[i-1]*p[k]*p[j];
}

}

}

}

printf("%d\n", m[1][n]);

return 0;
}

Compiler output:
main.c: In function 'main':
main.c:7:1: error: expected expression before '?' token
    7 | ????
      | ^
main.c:21:11: warning: overflow in conversion from 'long int' to 'int' changes value from '10000000000' to '1410065408' [-Woverflow]
   21 | m[i][j] = 10000000000;
      |           ^~~~~~~~~~~
Language: C

#include<stdio.h>

int i, j, k, l, n, p[101], m[101][101];

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

  for(l=2; l<n+1; l++){
    for(i=1; i<=n-l+1; i++){
      j=i+l-1;
      m[i][j]= 1000000;
      for(k=i; k<j;k++){
        m[i][j]=min(m[i][j], m[i][k] + m[k+1][j] + p[i-1]*p[k]*p[j]);
      }
    }
  }
  return m[i][n];
}

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

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

  printf("%d\n", matrixChainMultiplication());

  return 0;
}

Compiler output:
main.c: In function 'matrixChainMultiplication':
main.c:15:17: error: implicit declaration of function 'min' [-Wimplicit-function-declaration]
   15 |         m[i][j]=min(m[i][j], m[i][k] + m[k+1][j] + p[i-1]*p[k]*p[j]);
      |                 ^~~
Language: C

#include<stdio.h>
#define N 99

int main(void){
int n,i,j,k,l;
int r[N+1];
int c[N+1][N+1]=0;

scanf("%d",&n);
for(i=1;i<=n;i++)
scanf("%d%d",&r[i-1],&r[i]);


for(l=2;l<=n;l++){
for(i=1;i<=n-l+1;i++){
j=l+i-1;

c[i][j]=100000000000;

for(k=i;k<=j-1;k++){
if(c[i][j]>c[i][k]+c[k+1][j]+r[i-1]*r[k]*r[j]){
c[i][j]=c[i][k]+c[k+1][j]+r[i-1]*r[k]*r[j];
}
}
}
}
printf("%d\n",c[1][n]);
return 0;
}

Compiler output:
main.c: In function 'main':
main.c:7:17: error: invalid initializer
    7 | int c[N+1][N+1]=0;
      |                 ^
main.c:18:9: warning: overflow in conversion from 'long int' to 'int' changes value from '100000000000' to '1215752192' [-Woverflow]
   18 | c[i][j]=100000000000;
      |         ^~~~~~~~~~~~
Language: C

#include <stdio.h>
void MatrixChain();
int main(){
int n,i,p[100],m[100][100];


scanf("%d",&n);
for(i=1;i<=n;i++){
	scanf("%d%d",&p[i-1],&p[i]);
}
MatrixChain();
printf("%d\n",m[1][n]);
return 0;
}

void MatrixChain(){
	int  i,j,k,l,o,min;
	
for(i=1;i<=n;i++)m[i][i]=0;
for(l=2;l<=n;l++){
	for(i=1;i<=n-l+1;i
	j=i+l-1;
	m[i][j] = min;
		for(k=i;k<j;k++){
			o=m[i][k]+m[k+1][j]+p[i-1]*p[k]*p[j];
			if(o<m[i][j])m[i][j]=o;
		}
}
}
}

		

Compiler output:
main.c: In function 'MatrixChain':
main.c:19:12: error: 'n' undeclared (first use in this function)
   19 | for(i=1;i<=n;i++)m[i][i]=0;
      |            ^
main.c:19:12: note: each undeclared identifier is reported only once for each function it appears in
main.c:19:18: error: 'm' undeclared (first use in this function)
   19 | for(i=1;i<=n;i++)m[i][i]=0;
      |                  ^
main.c:21:27: error: expected ')' before 'j'
   21 |         for(i=1;i<=n-l+1;i
      |            ~              ^
      |                           )
   22 |         j=i+l-1;
      |         ~                  
main.c:28:1: error: expected expression before '}' token
   28 | }
      | ^
main.c: At top level:
main.c:30:1: error: expected identifier or '(' before '}' token
   30 | }
      | ^
Language: C

#include <stdio.h>
void MatrixChain();

int main(){
int n,i,p[100],m[100][100];


scanf("%d",&n);
for(i=1;i<=n;i++){
scanf("%d%d",&p[i-1],&p[i]);
}
MatrixChain();
printf("%d\n",m[1][n]);
return 0;
}

void MatrixChain(){
	int  i,j,k,l,o,min;
	
for(i=1;i<=n;i++)m[i][i]=0;
for(l=2;l<=n;l++){
	for(i=1;i<=n-l+1;i++){
	j=i+l-1;
	m[i][j] = min;
		for(k=i;k<j;k++){
			o=m[i][k]+m[k+1][j]+p[i-1]*p[k]*p[j];
			if(o<m[i][j])m[i][j]=o;
		}
}
}


		

Compiler output:
main.c: In function 'MatrixChain':
main.c:20:12: error: 'n' undeclared (first use in this function)
   20 | for(i=1;i<=n;i++)m[i][i]=0;
      |            ^
main.c:20:12: note: each undeclared identifier is reported only once for each function it appears in
main.c:20:18: error: 'm' undeclared (first use in this function)
   20 | for(i=1;i<=n;i++)m[i][i]=0;
      |                  ^
main.c:26:45: error: 'p' undeclared (first use in this function)
   26 |                         o=m[i][k]+m[k+1][j]+p[i-1]*p[k]*p[j];
      |                                             ^
main.c:30:1: error: expected declaration or statement at end of input
   30 | }
      | ^
Language: C

#include <stdio.h>
void MatrixChain();

int main(){
int n,i,p[100],m[100][100];


scanf("%d",&n);
for(i=1;i<=n;i++){
scanf("%d%d",&p[i-1],&p[i]);
}
MatrixChain();
printf("%d\n",m[1][n]);

return 0;
}

void MatrixChain(){
	int  i,j,k,l,o,min;
	
for(i=1;i<=n;i++)m[i][i]=0;
for(l=2;l<=n;l++){
	for(i=1;i<=n-l+1;i++){
	j=i+l-1;
	m[i][j] = min;
		for(k=i;k<j;k++){
			o=m[i][k]+m[k+1][j]+p[i-1]*p[k]*p[j];
			if(o<m[i][j])m[i][j]=o;
		}
}
}


		

Compiler output:
main.c: In function 'MatrixChain':
main.c:21:12: error: 'n' undeclared (first use in this function)
   21 | for(i=1;i<=n;i++)m[i][i]=0;
      |            ^
main.c:21:12: note: each undeclared identifier is reported only once for each function it appears in
main.c:21:18: error: 'm' undeclared (first use in this function)
   21 | for(i=1;i<=n;i++)m[i][i]=0;
      |                  ^
main.c:27:45: error: 'p' undeclared (first use in this function)
   27 |                         o=m[i][k]+m[k+1][j]+p[i-1]*p[k]*p[j];
      |                                             ^
main.c:31:1: error: expected declaration or statement at end of input
   31 | }
      | ^
Language: C

#include <stdio.h>
void MatrixChain();

int main(){
int n,i,p[100],m[100][100];


scanf("%d",&n);
for(i=1;i<=n;i++){
scanf("%d%d",&p[i-1],&p[i]);
}
MatrixChain(n,m,p);
printf("%d\n",m[1][n]);

return 0;
}

void MatrixChain(int n,int m,int p){
	int  i,j,k,l,o,min;
	
for(i=1;i<=n;i++)m[i][i]=0;
for(l=2;l<=n;l++){
	for(i=1;i<=n-l+1;i++){
	j=i+l-1;
	m[i][j] = min;
		for(k=i;k<j;k++){
			o=m[i][k]+m[k+1][j]+p[i-1]*p[k]*p[j];
			if(o<m[i][j])m[i][j]=o;
		}
}
}


		

Compiler output:
main.c: In function 'MatrixChain':
main.c:21:19: error: subscripted value is neither array nor pointer nor vector
   21 | for(i=1;i<=n;i++)m[i][i]=0;
      |                   ^
main.c:25:10: error: subscripted value is neither array nor pointer nor vector
   25 |         m[i][j] = min;
      |          ^
main.c:27:28: error: subscripted value is neither array nor pointer nor vector
   27 |                         o=m[i][k]+m[k+1][j]+p[i-1]*p[k]*p[j];
      |                            ^
main.c:27:36: error: subscripted value is neither array nor pointer nor vector
   27 |                         o=m[i][k]+m[k+1][j]+p[i-1]*p[k]*p[j];
      |                                    ^
main.c:27:46: error: subscripted value is neither array nor pointer nor vector
   27 |                         o=m[i][k]+m[k+1][j]+p[i-1]*p[k]*p[j];
      |                                              ^
main.c:27:53: error: subscripted value is neither array nor pointer nor vector
   27 |                         o=m[i][k]+m[k+1][j]+p[i-1]*p[k]*p[j];
      |                                                     ^
main.c:27:58: error: subscripted value is neither array nor pointer nor vector
   27 |                         o=m[i][k]+m[k+1][j]+p[i-1]*p[k]*p[j];
      |                                                          ^
main.c:28:31: error: subscripted value is neither array nor pointer nor vector
   28 |                         if(o<m[i][j])m[i][j]=o;
      |                               ^
main.c:28:39: error: subscripted value is neither array nor pointer nor vector
   28 |                         if(o<m[i][j])m[i][j]=o;
      |                                       ^
main.c:31:1: error: expected declaration or statement at end of input
   31 | }
      | ^
Language: C

#include <stdio.h>
void MatrixChain( int );
#define MAX 100

int m[MAX][MAX];
int p[MAX];

int main(){
int n,i,SUB;

scanf("%d",&n);
for(i=0;i<n;i++){
scanf("%d%d",&p[i],&SUB);
}
p[n]=SUB;

MatrixChain(n);
printf("%d\n",m[1][n]);

return 0;
}

void MatrixChain(int n){
int  i,j,k,l,o;
for(i=1;i<=n;i++)m[i][i]=0;
for(l=2;l<=n;l++){
for(i=1;i<=n-l+1;i++){
j=i+l-1;
m[i][j] = INT_MAX;
for(k=i;k<=j-1;k++){
o=m[i][k]+m[k+1][j]+p[i-1]*p[k]*p[j];
if(o<m[i][j])m[i][j]=o;
}
}
}
}

Compiler output:
main.c: In function 'MatrixChain':
main.c:29:11: error: 'INT_MAX' undeclared (first use in this function)
   29 | m[i][j] = INT_MAX;
      |           ^~~~~~~
main.c:2:1: note: 'INT_MAX' is defined in header '<limits.h>'; this is probably fixable by adding '#include <limits.h>'
    1 | #include <stdio.h>
  +++ |+#include <limits.h>
    2 | void MatrixChain( int );
main.c:29:11: note: each undeclared identifier is reported only once for each function it appears in
   29 | m[i][j] = INT_MAX;
      |           ^~~~~~~
Language: C

#include<stdio.h>
??
int x;
int P[A];
int M[A][A];
??
void Matrix(){
????int i,j,k,l,n,m;
????n=x;
??????
????for(i=1;i<=n;i++){
????????M[i][i]=0;
????}
????for(l=2;l<=n;l++){
????????for(i=1;i<=n-l+1;i++){
????????????j=i+l-1;
????????????M[i][j]=100000;
????????????for(k=i;k<=j-1;k++){
????????q=M[i][k]+M[k+1][j]+P[i]*P[k+1]*P[j+1];
????????if(q<M[i][j]){
????????????M[i][j]=m;
????????}
????????????}
????????}
????}
????printf("%d\n", M[1][x]);
}
????
int main(){
????????
????int n,i,m,count;
????scanf("%d",&x);
????????
????for(i=0;i<x;i++){
????????scanf("%d %d",&P[i+1],&m);
????????????
????}
????P[i+1]=m;
????????
????Matrix();
????????
????return 0;
}

Compiler output:
main.c:2:1: error: expected identifier or '(' before '?' token
    2 | ??
      | ^
main.c:4:7: error: 'A' undeclared here (not in a function)
    4 | int P[A];
      |       ^
main.c:6:1: error: expected identifier or '(' before '?' token
    6 | ??
      | ^
main.c:28:1: error: expected identifier or '(' before '?' token
   28 | ????
      | ^
Language: C

#include<stdio.h>
#define A 10000
??
int x;
int P[A];
int M[A][A];
??
void Matrix(){
????int i,j,k,l,n,m;
????n=x;
??????
????for(i=1;i<=n;i++){
????????M[i][i]=0;
????}
????for(l=2;l<=n;l++){
????????for(i=1;i<=n-l+1;i++){
????????????j=i+l-1;
????????????M[i][j]=100000;
????????????for(k=i;k<=j-1;k++){
????????q=M[i][k]+M[k+1][j]+P[i]*P[k+1]*P[j+1];
????????if(q<M[i][j]){
????????????M[i][j]=m;
????????}
????????????}
????????}
????}
????printf("%d\n", M[1][x]);
}
????
int main(){
????????
????int n,i,m,count;
????scanf("%d",&x);
????????
????for(i=0;i<x;i++){
????????scanf("%d %d",&P[i+1],&m);
????????????
????}
????P[i+1]=m;
????????
????Matrix();
????????
????return 0;
}

Compiler output:
main.c:3:1: error: expected identifier or '(' before '?' token
    3 | ??
      | ^
main.c:7:1: error: expected identifier or '(' before '?' token
    7 | ??
      | ^
main.c:29:1: error: expected identifier or '(' before '?' token
   29 | ????
      | ^
Language: C

#include <stdio.h>

int main(void)
{
 int i,j,k,l,n,m,a[100],b[100][100];

 scanf("%d",&n);

 for(i=0;i<n;i++){
   scanf("%d %d",&a[i],&l);
 }

 a[n]=l;

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

 for(i=2;i<=n;i++){
  for(j=1;j<=n-i+1;j++){

    l=j+i-1;

    b[j][l]=1000000;

    for(k=j;k<=l-1;k++){

      m=b[j][k]+b[k+1][l]+a[j-1]*a[k]*a[l];

      if(b[j][l]>m){
        b[j][l]=m;
    }
  }
 }

 printf("%d\n",b[1][n]);

 return 0;
}

Compiler output:
main.c: In function 'main':
main.c:39:1: error: expected declaration or statement at end of input
   39 | }
      | ^
Language: C

#include <stdio.h>

int main(void)
{
 int i,j,k,l,n,m,a[100],b[100][100];

 scanf("%d",&n);

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

 a[n]=m;

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

 for(i=2;i<=n;i++){
  for(j=1;j<=n-i+1;j++){

    l=j+i-1;

    b[j][l]=1000000;

    for(k=j;k<=l-1;k++){

      m=b[j][k]+b[k+1][l]+a[j-1]*a[k]*a[l];

      if(b[j][l]<m){
        b[j][l]=m;
    }
  }
 }

 printf("%d\n",b[1][n]);

 return 0;
}

Compiler output:
main.c: In function 'main':
main.c:39:1: error: expected declaration or statement at end of input
   39 | }
      | ^
Language: C

#include<stdio.h>
int main() {
    
    int n, i,
    int r[100];
    int c[100];
    
    scanf("%d", &n);
    
    for ( i = 0; i < n; i++ ){
        scanf("%d %d", &r[i], &c[i]);
    }
    
    return 0;
    
}

Compiler output:
main.c: In function 'main':
main.c:5:5: error: expected identifier or '(' before 'int'
    5 |     int r[100];
      |     ^~~
main.c:11:25: error: 'r' undeclared (first use in this function)
   11 |         scanf("%d %d", &r[i], &c[i]);
      |                         ^
main.c:11:25: note: each undeclared identifier is reported only once for each function it appears in