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

# -*- coding: utf-8 -*-

def main():
    def _fibonacci(n,cache):
        if n in cache:
            return cache[n]

        elif n == 0 or n == 1:
            ret = 1
            cache[n] = ret
            return ret
        else:
            ret = _fibonacci(n - 1, cache) + _fibonacci(n - 2, cache)
            cache[n] = ret
            return ret

    N = int(raw_input())
    cache = {}
    return _fibonacci(N,cache)

print main()

Compiler output:
a.cc:1:3: error: invalid preprocessing directive #-
    1 | # -*- coding: utf-8 -*-
      |   ^
a.cc:3:1: error: 'def' does not name a type
    3 | def main():
      | ^~~
a.cc:19:5: error: expected unqualified-id before 'return'
   19 |     return _fibonacci(N,cache)
      |     ^~~~~~
Language: C++

#coding: UTF-8

s = input()
h = s/3600
s = s%3600
m = s/60
s = s%60

print str(h) + ":" + str(m) + ":" + str(s)

Compiler output:
a.cc:1:2: error: invalid preprocessing directive #coding
    1 | #coding: UTF-8
      |  ^~~~~~
a.cc:3:1: error: 's' does not name a type
    3 | s = input()
      | ^
Language: C++



def main():
    n = int(input())
    dp = [0] * 100
    dp[0] = 1
    dp[1] = 1
    for i in range(2, len(dp)):
        dp[i] = dp[i - 1] + dp[i - 2]
    print(dp[n])


if __name__ == '__main__':
    main()

Compiler output:
a.cc:13:16: warning: multi-character literal with 8 characters exceeds 'int' size of 4 bytes
   13 | if __name__ == '__main__':
      |                ^~~~~~~~~~
a.cc:3:1: error: 'def' does not name a type
    3 | def main():
      | ^~~
Language: C++

#include <iostream>

using namespace std;

int fib(int n);

int main() {
    int n;

    //??\???
    cin >> n;

    //??????
    cout << fib(n) << endl;

    return 0;
}

int fib(int n){
  /* ??????1 */
  if(n==0||n==1)    return 1;
  else if(memo[n]!=0){
    return memo[n];
  }else{
    return memo[n]=fib(n-1)+fib(n-2);
  }
}

Compiler output:
a.cc: In function 'int fib(int)':
a.cc:22:11: error: 'memo' was not declared in this scope
   22 |   else if(memo[n]!=0){
      |           ^~~~
Language: C++

#icnlude <iostream>

using namespace std;

int fib(int n);

int memo[45];

int main(){
  int n;

  cin >> n;
  cout << fib(n) << endl;
}

int fib(int n){
  if(n == 0){
    return 1;
  }else if(n == 1){
    return 1;
  }else if(memo[n] != 0){
    return memo[n];
  }else{
    return memo[n] = fib(n-1) + fib(n-2);
  }
}

Compiler output:
a.cc:1:2: error: invalid preprocessing directive #icnlude; did you mean #include?
    1 | #icnlude <iostream>
      |  ^~~~~~~
      |  include
a.cc: In function 'int main()':
a.cc:12:3: error: 'cin' was not declared in this scope
   12 |   cin >> n;
      |   ^~~
a.cc:1:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
  +++ |+#include <iostream>
    1 | #icnlude <iostream>
a.cc:13:3: error: 'cout' was not declared in this scope
   13 |   cout << fib(n) << endl;
      |   ^~~~
a.cc:13:3: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:13:21: error: 'endl' was not declared in this scope
   13 |   cout << fib(n) << endl;
      |                     ^~~~
a.cc:1:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
  +++ |+#include <ostream>
    1 | #icnlude <iostream>
Language: C++

#include <iostream>

using namespace std;

int fib(int n);

int main() {
    int n;
    int dp[45];

    //?????????
    /* ??????3-1 */
    dp[0]=1;
    /* ??????3-2 */
    dp[1]=1;
    //??\???
    cin >> n;

    //DP
    for (int i = 2; i <= n; i++) {
        /* ??????3-3 */
      d@[i]=dp[i-1]+dp[i-2];
    }

    //??????
    cout << dp[n] << endl;

    return 0;
}

Compiler output:
a.cc:22:8: error: stray '@' in program
   22 |       d@[i]=dp[i-1]+dp[i-2];
      |        ^
a.cc: In function 'int main()':
a.cc:22:7: error: 'd' was not declared in this scope
   22 |       d@[i]=dp[i-1]+dp[i-2];
      |       ^
Language: C++

#include <iostream>

using namespace std;

int fib(int n);

int main() {
    int n;
    int dp[45];

    //?????????
    /* ??????3-1 */
    dp[0] = 1;
    /* ??????3-2 */
    dp[1] = 1

    //??\???
    cin >> n;

    //DP
    for (int i = 2; i <= n; i++) {
        /* ??????3-3 */
        dp[i] = dp[i-1] + dp[i-2];
    }

    //??????
    cout << dp[n] << endl;

    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:15:14: error: expected ';' before 'cin'
   15 |     dp[1] = 1
      |              ^
      |              ;
......
   18 |     cin >> n;
      |     ~~~
Language: C++

using namespace std;

int dp[44];

int fib(int n) {
	if (dp[n] != -1)return dp[n];
	int res;

	if (n == 0 || n == 1) {
		res = 1;
	}
	else {
		res = fib(n - 1) + fib(n - 2);
	}

	dp[n] = res;
	return res;
}

int main() {
	for (int i = 0; i < 44; i++) {
		dp[i] = -1;
	}
	int n;
	cin >> n;
	cout << fib(n);

	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:25:9: error: 'cin' was not declared in this scope
   25 |         cin >> n;
      |         ^~~
a.cc:1:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
  +++ |+#include <iostream>
    1 | using namespace std;
a.cc:26:9: error: 'cout' was not declared in this scope
   26 |         cout << fib(n);
      |         ^~~~
a.cc:26:9: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
Language: C++

#include<iostream>
using namespace std;

int main(){
  int n;
  cin >> n;
  int fn[50];
  fn[0] = fn[1] = 1;
  for(int i = 2; i <= n; i++) fn[i] = fn[i - 1] + fn[i - 2];
  }
  cout << fn[n] << end;
  
  return 0;
}

Compiler output:
a.cc:11:3: error: 'cout' does not name a type
   11 |   cout << fn[n] << end;
      |   ^~~~
a.cc:13:3: error: expected unqualified-id before 'return'
   13 |   return 0;
      |   ^~~~~~
a.cc:14:1: error: expected declaration before '}' token
   14 | }
      | ^
Language: C++

#include<iostream>
using namespace std;

int main(){
  int n;
  cin >> n;
  int fn[50];
  fn[0] = fn[1] = 1;
  for(int i = 2; i <= n; i++) fn[i] = fn[i - 1] + fn[i - 2];

  cout << fn[n] << endl;
}
return 0;
}

Compiler output:
a.cc:13:1: error: expected unqualified-id before 'return'
   13 | return 0;
      | ^~~~~~
a.cc:14:1: error: expected declaration before '}' token
   14 | }
      | ^
Language: C++

#include <cstdio>
using namespace std;

int F[50];

int fibonacci(int n) {
    if (n==0||n==1) {
        return F[n] = 1;
    }
    if (F[n] != -1) {
        return F[n];
    }

    return F[n] = fibonacci(n-1) + fibonacci(n-2);
}
int 
int main (void) {
    int N, i;

    for(i = 0 ; i < 50 ; i ++ ) {
        F[i] = -1;
    }

    scanf("%d", &N);
    printf("%d\n", fibonacci(N));

    return 0;
}

Compiler output:
a.cc:16:1: error: two or more data types in declaration of 'main'
   16 | int
      | ^~~
Language: C++

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

int fib(int n){
int i;
int a[25];
a[0]=a[1]=1;
for(i=2;i<n;i++){
a[i]=a[i-1]+a[i-2];
   }
return a[i];
}

int main(){

int x;
scanf("%d",&n);
x=fib(n);
printf("%d",x);

return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:17:13: error: 'n' was not declared in this scope
   17 | scanf("%d",&n);
      |             ^
Language: C++

#include<iostream>
using namespce std;

int main()
{
	int n,i;
	int a[25];
	cin >> n;
	for(i=0;i<n;i++){
		cin >> a[i];
	}
}

Compiler output:
a.cc:2:7: error: expected nested-name-specifier before 'namespce'
    2 | using namespce std;
      |       ^~~~~~~~
a.cc: In function 'int main()':
a.cc:8:9: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    8 |         cin >> n;
      |         ^~~
      |         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
      |                  ^~~
Language: C++

#include<iostream>
using namespce std;

int main()
{
	int n,i;
	int a[44];
	cin >> n;
	a[0]=1;
	a[1]=1;
	for(i=2;i<n;i++){
		a[i]=a[i-1]+a[a-2];
	}
	cout << a[n-1]<<endl;

}

Compiler output:
a.cc:2:7: error: expected nested-name-specifier before 'namespce'
    2 | using namespce std;
      |       ^~~~~~~~
a.cc: In function 'int main()':
a.cc:8:9: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    8 |         cin >> n;
      |         ^~~
      |         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:12:30: error: invalid types 'int [44][int*]' for array subscript
   12 |                 a[i]=a[i-1]+a[a-2];
      |                              ^
a.cc:14:9: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   14 |         cout << a[n-1]<<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:14:25: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
   14 |         cout << a[n-1]<<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)
      |     ^~~~
Language: C++

#include<iostream>
using namespce std;

int main()
{
	int n,i;
	int a[44];
	cin >> n;
	a[0]=1;
	a[1]=1;
	for(i=2;i<n;i++){
		a[i]=a[i-1]+a[i-2];
	}
	cout << a[n-1]<<endl;

}

Compiler output:
a.cc:2:7: error: expected nested-name-specifier before 'namespce'
    2 | using namespce std;
      |       ^~~~~~~~
a.cc: In function 'int main()':
a.cc:8:9: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    8 |         cin >> n;
      |         ^~~
      |         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:14:9: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   14 |         cout << a[n-1]<<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:14:25: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
   14 |         cout << a[n-1]<<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)
      |     ^~~~
Language: C++



#include<stdio.h>
#define N 45
 
int main(){
int i,n,F[N];
F[0]=F[1]=1;

for(i=2;i<N;i++){
F[i]=F[i-1]+F[i-2];
}
scanf("%d",&n);
printf("%d\n",a[n]);
return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:15: error: 'a' was not declared in this scope
   14 | printf("%d\n",a[n]);
      |               ^
Language: C++

#include <iostream>
using namespace std;
int num;

int main(void) {
    cin >> num;
    int array[num] = {};
    array[0] = 1 && array[1] = 1;
    for (int i= 2; i <= num; i++) array[i] = array[i - 1] + array[i - 2];
    cout << array[num] << endl;
}




Compiler output:
a.cc: In function 'int main()':
a.cc:8:18: error: lvalue required as left operand of assignment
    8 |     array[0] = 1 && array[1] = 1;
      |                ~~^~~~~~~~~~~
Language: C++

using namespace std;

int main()
{
    int input;
    cin >> input;

    int first = 1;
    int second = 1;
    
    for (int i = 2; i < input; ++i) {
        int third = first + second;
        first = second;
        second = thid;
    }
    cout << second;
    
    return 0;
}



Compiler output:
a.cc: In function 'int main()':
a.cc:6:5: error: 'cin' was not declared in this scope
    6 |     cin >> input;
      |     ^~~
a.cc:1:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
  +++ |+#include <iostream>
    1 | using namespace std;
a.cc:14:18: error: 'thid' was not declared in this scope; did you mean 'third'?
   14 |         second = thid;
      |                  ^~~~
      |                  third
a.cc:16:5: error: 'cout' was not declared in this scope
   16 |     cout << second;
      |     ^~~~
a.cc:16:5: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
Language: C++

#include <iostream>

using namespace std;

int main()
{
    int input;
    cin >> input;

    int first = 1;
    int second = 1;
    
    for (int i = 2; i < input; ++i) {
        int third = first + second;
        first = second;
        second = thid;
    }
    cout << second;
    
    return 0;
}



Compiler output:
a.cc: In function 'int main()':
a.cc:16:18: error: 'thid' was not declared in this scope; did you mean 'third'?
   16 |         second = thid;
      |                  ^~~~
      |                  third
Language: C++

#include <stdio.h>

fi(int a) {
  return (a == 0 || a == 1) ? 1 : fi(a - 1) + fi(a - 2);
}

int main(void) {
  int n;
  scanf("%d", &n);
  printf("%d\n", fi(n));
  return 0;
}


Compiler output:
a.cc:3:1: error: ISO C++ forbids declaration of 'fi' with no type [-fpermissive]
    3 | fi(int a) {
      | ^~
Language: C++

#include <stdio.h>
#define rep(i, n) for(int i = 0; i < n; ++i)
int f[50];

void fi(int a) {
  f[a] = f[a - 2] + f[a - 1];
}

int main(void) {
  int n;
  scanf("%d", &n);
  rep(i, 50) f[i] = 0;
  f[0] = 1, f[1] = 1;
  for(int i = 2; i < 50; ++i) fi(i);
  printf("%d\n", f[a]);
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:15:20: error: 'a' was not declared in this scope
   15 |   printf("%d\n", f[a]);
      |                    ^
Language: C++

import numpy as np
import sys

def fib(n):
    if (n == 0):
        return 1
    elif (n == 1):
        return 1
    else :
        return fib(n - 1) + fib(n - 2)

if __name__ == "__main__":
    n = input("input number: ")
    n = int(n)
    #print(type(n))
    print(fib(n))



Compiler output:
a.cc:15:6: error: invalid preprocessing directive #print
   15 |     #print(type(n))
      |      ^~~~~
a.cc:1:1: error: 'import' does not name a type
    1 | import numpy as np
      | ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
Language: C++

import numpy as np
import sys
f = [-1 for i in range(45)]
f[0] = f[1] = 1

def fib(n):
    global f
    for i in range(2,n+1):
        f[i] = f[i - 1] + f[i - 2]
        #print(i,f[i])
    return f[n]

if __name__ == "__main__":
    n = input("input number: ")
    n = int(n)
    #print(type(n))
    print(fib(n))



Compiler output:
a.cc:10:10: error: invalid preprocessing directive #print
   10 |         #print(i,f[i])
      |          ^~~~~
a.cc:16:6: error: invalid preprocessing directive #print
   16 |     #print(type(n))
      |      ^~~~~
a.cc:1:1: error: 'import' does not name a type
    1 | import numpy as np
      | ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
Language: C++


f = [-1 for i in range(45)]
f[0] = f[1] = 1

def fib(n):
    global f
    for i in range(2,n+1):
        f[i] = f[i - 1] + f[i - 2]
        #print(i,f[i])
    return f[n]

if __name__ == "__main__":
    n = input("input number: ")
    n = int(n)
    #print(type(n))
    print(fib(n))



Compiler output:
a.cc:9:10: error: invalid preprocessing directive #print
    9 |         #print(i,f[i])
      |          ^~~~~
a.cc:15:6: error: invalid preprocessing directive #print
   15 |     #print(type(n))
      |      ^~~~~
a.cc:2:1: error: 'f' does not name a type
    2 | f = [-1 for i in range(45)]
      | ^
Language: C++

#include <iostream>
#include <vector>
#include <string>
#include <cmath>
#include <set>
#include <algorithm>
#include <array>
#include <complex>
#include <utility>
#include <map>
#include <inttypes.h>


int main(){
	int N;
    
    std::cin >> N;
    F[0]=F[1]=1;
    for(int i=2;i<=N;i++){
        F[i]=F[i-1]+F[i-2];
    }
    std::cout << F[N]<< std::endl;
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:18:5: error: 'F' was not declared in this scope
   18 |     F[0]=F[1]=1;
      |     ^
Language: C++

#include<stdio.h>
#include(sys/time.h>
static double gettime(){
	struct timeval tv ={0};
	gettimeofday(&tv,NULL);
	return(tv,tv-sec*1000.0)+(tv.tv_usec/1000.0);
}

long long fibo(int n){
	if(n==0||n==1)retrn 0;
	return fibo(n-1)+fibo(n-2);
}
 int main(void){
	printf("fibo(40)=%lld\n",fibo(40));

return(0);
}







Compiler output:
a.cc:2:9: error: #include expects "FILENAME" or <FILENAME>
    2 | #include(sys/time.h>
      |         ^
a.cc: In function 'double gettime()':
a.cc:4:24: error: variable 'gettime()::timeval tv' has initializer but incomplete type
    4 |         struct timeval tv ={0};
      |                        ^~
a.cc:5:9: error: 'gettimeofday' was not declared in this scope
    5 |         gettimeofday(&tv,NULL);
      |         ^~~~~~~~~~~~
a.cc:6:22: error: 'sec' was not declared in this scope
    6 |         return(tv,tv-sec*1000.0)+(tv.tv_usec/1000.0);
      |                      ^~~
a.cc: In function 'long long int fibo(int)':
a.cc:10:23: error: 'retrn' was not declared in this scope
   10 |         if(n==0||n==1)retrn 0;
      |                       ^~~~~
Language: C++



#include<stdio.h>
#include<sys/time.h>
static double gettime(){
	struct timeval tv ={0};
	gettime(&tv,NULL);
	return(tv,tv-sec*1000.0)+(tv.tv_usec/1000.0);
}

long long fibo(int n){
	long long fibodp[200];
	fibodp[0]=1;
	fibodp[1]=1;
	for(int i=2; i<=n,i++){
		fibodp[n]=fibodp[n-1]+fibodp[n-2];
	}
	return fibodp[n];
}

 int main(void){
	for(int i=s; i<=41; i++){
	double s=gettime();
	long long res =fibodp(i);
	double e=gettime();
	printf("fibo(%d)=%ld %f\n",i,res,(e-s));

return(0);
}




Compiler output:
a.cc: In function 'double gettime()':
a.cc:7:16: error: too many arguments to function 'double gettime()'
    7 |         gettime(&tv,NULL);
      |         ~~~~~~~^~~~~~~~~~
a.cc:5:15: note: declared here
    5 | static double gettime(){
      |               ^~~~~~~
a.cc:8:22: error: 'sec' was not declared in this scope
    8 |         return(tv,tv-sec*1000.0)+(tv.tv_usec/1000.0);
      |                      ^~~
a.cc: In function 'long long int fibo(int)':
a.cc:15:30: error: expected ';' before ')' token
   15 |         for(int i=2; i<=n,i++){
      |                              ^
      |                              ;
a.cc: In function 'int main()':
a.cc:22:19: error: 's' was not declared in this scope
   22 |         for(int i=s; i<=41; i++){
      |                   ^
a.cc:23:16: error: redeclaration of 'double s'
   23 |         double s=gettime();
      |                ^
a.cc:22:19: note: '<typeprefixerror>s' previously declared here
   22 |         for(int i=s; i<=41; i++){
      |                   ^
a.cc:24:24: error: 'fibodp' was not declared in this scope; did you mean 'fibo'?
   24 |         long long res =fibodp(i);
      |                        ^~~~~~
      |                        fibo
a.cc:29:2: error: expected '}' at end of input
   29 | }
      |  ^
a.cc:21:16: note: to match this '{'
   21 |  int main(void){
      |                ^
Language: C++

#include<iostream>

using namespace std;

int main() {
  int N;
  cin >> N;

  int F[50];

  F[0] = F[1],
  for (int i = 2; i <= N; i++) {
    F[i] = F[i - 1] + F[i - 2];
  }

  cout << F[N] << endl;

  return 0;
}



Compiler output:
a.cc: In function 'int main()':
a.cc:12:3: error: expected primary-expression before 'for'
   12 |   for (int i = 2; i <= N; i++) {
      |   ^~~
a.cc:12:19: error: 'i' was not declared in this scope
   12 |   for (int i = 2; i <= N; i++) {
      |                   ^
Language: C++

#include<iostream>

using namespace std;

int main() {
  int n;

  //入力
  cin >> n;

  //出力
  cout << fib(n) << endl;

  return 0;
}

int fib(int n){
  if(n==0 || n == 1){
    return 1;
  }else{
    return fib(n-1) + fib(n-2);
  }
}



Compiler output:
a.cc: In function 'int main()':
a.cc:12:11: error: 'fib' was not declared in this scope
   12 |   cout << fib(n) << endl;
      |           ^~~
Language: C++

#include<iostream>

using namespace std;

int fib(int n);

int main() {
  int n;

  //入力
  cin >> n;

  //出力
  cout << fib(n) << endl;

  return 0;
}

int fib(int n){
  memo[1000] = {0};
  if(n==0 || n == 1){
    return 1;
  }else if(memo[n] != 0){
    return memo[n];
  }else{
    return memo[n] = memo[n-1] + memo[n-2];
  }
}



Compiler output:
a.cc: In function 'int fib(int)':
a.cc:20:3: error: 'memo' was not declared in this scope
   20 |   memo[1000] = {0};
      |   ^~~~
Language: C++

#include<iostream>

using namespace std;
int fib(int n);
int memo[45];
int main() {
  int n;

  //入力
  cin >> n;

  //出力
  cout << fib(n) << endl;

  return 0;
}

int fib(int n){
  if(n==0 || n == 1){
    return 1;
  }else if(memo[n] != 0){
    return memo[n];
  }
  }else{
    return memo[n] = fib(n-1) + fib(n-2);
  }
}



Compiler output:
a.cc:24:4: error: expected unqualified-id before 'else'
   24 |   }else{
      |    ^~~~
a.cc:27:1: error: expected declaration before '}' token
   27 | }
      | ^
a.cc: In function 'int fib(int)':
a.cc:24:3: warning: control reaches end of non-void function [-Wreturn-type]
   24 |   }else{
      |   ^
Language: C++

#include<iostream>

using namespace std;
int fib(int n);

int memo[45];
int main(){
  int n;
  cin >> n;
  cout << fib(n) << endl;
  retrun 0;
}

int bib(int n){

  if(n==0){
    return 1;
  }else if(n==1){
    return 1;
    else if(memo[n] !=0){
      return memo[n];
    }else{
      return memo[n]=fib(n-1]+fib(n-2);
    }

  }


Compiler output:
a.cc: In function 'int main()':
a.cc:11:3: error: 'retrun' was not declared in this scope
   11 |   retrun 0;
      |   ^~~~~~
a.cc: In function 'int bib(int)':
a.cc:20:5: error: expected '}' before 'else'
   20 |     else if(memo[n] !=0){
      |     ^~~~
a.cc:18:17: note: to match this '{'
   18 |   }else if(n==1){
      |                 ^
a.cc:23:29: error: expected ')' before ']' token
   23 |       return memo[n]=fib(n-1]+fib(n-2);
      |                         ~   ^
      |                             )
a.cc:23:29: error: expected ';' before ']' token
   23 |       return memo[n]=fib(n-1]+fib(n-2);
      |                             ^
      |                             ;
a.cc:23:29: error: expected primary-expression before ']' token
Language: C++

#include<iostream>

using namespace std;
int fib(int n);

int memo[45];
int main(){
  int n;
  cin >> n;
  cout << fib(n) << endl;
  retrun 0;
}

int bib(int n){

  if(n==0){
    return 1;
  }else if(n==1){
    return 1;
  }
    else if(memo[n] !=0){
      return memo[n];
    }else{
      return memo[n]=fib(n-1]+fib(n-2);
    }

  }


Compiler output:
a.cc: In function 'int main()':
a.cc:11:3: error: 'retrun' was not declared in this scope
   11 |   retrun 0;
      |   ^~~~~~
a.cc: In function 'int bib(int)':
a.cc:24:29: error: expected ')' before ']' token
   24 |       return memo[n]=fib(n-1]+fib(n-2);
      |                         ~   ^
      |                             )
a.cc:24:29: error: expected ';' before ']' token
   24 |       return memo[n]=fib(n-1]+fib(n-2);
      |                             ^
      |                             ;
a.cc:24:29: error: expected primary-expression before ']' token
Language: C++

#include<iostream>

using namespace std;
int fib(int n);

int memo[45];
int main(){
  int n;
  cin >> n;
  cout << fib(n) << endl;
  retrun 0;
}

int fib(int n){
  
  if(n==0){
    return 1;
  }else if(n==1){
    return 1;
  }
  else if(memo[n] !=0){
    return memo[n];
  }else{
    return memo[n]=fib(n-1]+fib(n-2);
  }
  
}


Compiler output:
a.cc: In function 'int main()':
a.cc:11:3: error: 'retrun' was not declared in this scope
   11 |   retrun 0;
      |   ^~~~~~
a.cc: In function 'int fib(int)':
a.cc:24:27: error: expected ')' before ']' token
   24 |     return memo[n]=fib(n-1]+fib(n-2);
      |                       ~   ^
      |                           )
a.cc:24:27: error: expected ';' before ']' token
   24 |     return memo[n]=fib(n-1]+fib(n-2);
      |                           ^
      |                           ;
a.cc:24:27: error: expected primary-expression before ']' token
Language: C++

#include<iostream>

using namespace std;
int fib(int n);

int memo[45];
int main(){
  int n;
  cin >> n;
  cout << fib(n) << endl;
  retrun 0;
}

int fib(int n){
  
  if(n==0){
    return 1;
  }else if(n==1){
    return 1;
  }
  else if(memo[n] !=0){
    return memo[n];
  }else{
    return memo[n]=fib(n-1)+fib(n-2);
  }
  
}


Compiler output:
a.cc: In function 'int main()':
a.cc:11:3: error: 'retrun' was not declared in this scope
   11 |   retrun 0;
      |   ^~~~~~
Language: C++

#include<iostream>

using namespace std;
int fib(int n);

int memo[45];
int main(){
  int n;
  cin >> n;
  cout << fib(n) << endl;
  retrun 0;
}

int fib(int n){
  
  if(n == 0){
    return 1;
  }else if(n == 1){
    return 1;
  }
  else if(memo[n] != 0){
    return memo[n];
  }else{
    return memo[n]= fib(n-1) + fib(n-2);
  }
  
}


Compiler output:
a.cc: In function 'int main()':
a.cc:11:3: error: 'retrun' was not declared in this scope
   11 |   retrun 0;
      |   ^~~~~~
Language: C++

#include <iostream>

using namespace std;

int fib(int n);

int main() {
int n;
int dfep[45];

dp[0] = 1;
dp[1] = 1;

cin >> n;

for(int i = 2; i <= n; i++) {
dp[i] = dp[i-1] + dp[i-2];
}

cout << dp[n] << dp << endl;
return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:11:1: error: 'dp' was not declared in this scope; did you mean 'dfep'?
   11 | dp[0] = 1;
      | ^~
      | dfep
Language: C++

#include<iostream>

using namespace std;
int fib(int n);

int memo[45];
int main(){
  int n;
  cin >> n;
  cout << fib(n) << endl;
  retrun 0;
}

int fib(int n){
  
  if(n == 0){
    return 1;
  }else if(n == 1){
    return 1;
  }else if(memo[n] != 0){
    return memo[n];
  }else{
    return memo[n]= fib(n-1) + fib(n-2);
  }
  
}


Compiler output:
a.cc: In function 'int main()':
a.cc:11:3: error: 'retrun' was not declared in this scope
   11 |   retrun 0;
      |   ^~~~~~
Language: C++

#include <iostream>

using namespace std;

int fib(int n);

int main() {
int n;
int dfep[45];

dp[0] = 1;
dp[1] = 1;

cin >> n;

for(int i = 2; i <= n; i++) {
dp[i] = dp[i-1] + dp[i-2];
}

cout << dp[n] << endl;
return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:11:1: error: 'dp' was not declared in this scope; did you mean 'dfep'?
   11 | dp[0] = 1;
      | ^~
      | dfep
Language: C++

#inclue<stdio>
#include<stream>
using namespace std;

int fibo(int x) {
  int a;
  if ( x == 0 ) return 1;
  if ( x == 1 ) return 1;
  a = fibo(x-1) + fibo(x-2);
  return a;
}

int main() {
  int x, y;

  cin >> x;

  y = fibo(x);

  cout << y << endl;

  return 0;
}


Compiler output:
a.cc:1:2: error: invalid preprocessing directive #inclue; did you mean #include?
    1 | #inclue<stdio>
      |  ^~~~~~
      |  include
a.cc:2:9: fatal error: stream: No such file or directory
    2 | #include<stream>
      |         ^~~~~~~~
compilation terminated.
Language: C++

#include<stdio>
#include<stream>
using namespace std;

int fibo(int x) {
  int a;
  if ( x == 0 ) return 1;
  if ( x == 1 ) return 1;
  a = fibo(x-1) + fibo(x-2);
  return a;
}

int main() {
  int x, y;

  cin >> x;

  y = fibo(x);

  cout << y << endl;

  return 0;
}


Compiler output:
a.cc:1:9: fatal error: stdio: No such file or directory
    1 | #include<stdio>
      |         ^~~~~~~
compilation terminated.
Language: C++

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

int fibo(int x) {
  int a;
  if ( x == 0 ) return 1;
  if ( x == 1 ) return 1;
  a = fibo(x-1) + fibo(x-2);
  return a;
}

int main() {
  int x, y;

  cin >> x;

  y = fibo(x);

  cout << y << endl;

  return 0;
}


Compiler output:
a.cc:2:9: fatal error: stream: No such file or directory
    2 | #include<stream>
      |         ^~~~~~~~
compilation terminated.
Language: C++

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

int fibo(int x) {
  int a;
  if ( x == 0 ) return 1;
  if ( x == 1 ) return 1;
  a = fibo(x-1) + fibo(x-2);
  return a;
}

int main() {
  int x, y;
  int F[50];
  F[0] = F[1] = 1;
  for ( i = 2; i < 50; i++ ) F[i] = F[i-1] + F[i-2];

  cin >> x;
  cout << F[x] << endl;

  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:17:9: error: 'i' was not declared in this scope
   17 |   for ( i = 2; i < 50; i++ ) F[i] = F[i-1] + F[i-2];
      |         ^
Language: C++

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

int main() {
  int x, y;
  int F[50];
  F[0] = F[1] = 1;
  for ( i = 2; i < 50; i++ ) F[i] = F[i-1] + F[i-2];

  cin >> x;
  cout << F[x] << endl;

  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:9:9: error: 'i' was not declared in this scope
    9 |   for ( i = 2; i < 50; i++ ) F[i] = F[i-1] + F[i-2];
      |         ^
Language: C++

class RecursiveFibonacci:public Fibonacci{
public:
	virtual int calc(int x);
};

int RecursiveFibonacci::calc(int x){
	if(x == 0){
		return 0;
	}else if(x == 1){
		return 1;
	}else{
		return calc(x - 1) + calc(x - 2);
	}
}


Compiler output:
a.cc:1:42: error: expected class-name before '{' token
    1 | class RecursiveFibonacci:public Fibonacci{
      |                                          ^
Language: C++

#include <iostream>
using namespace std;
 
int main() {
	void fibonacci_1(const int count , int data[]) {
	data[0] = 1;
	if(count == 1) return;
	data[1] = 1;
 
	for( int i = 2; i < count ; i++) {
		data[i] = data[i-1]+data[i-2];
	}
}
	return 0;



Compiler output:
a.cc: In function 'int main()':
a.cc:5:56: error: a function-definition is not allowed here before '{' token
    5 |         void fibonacci_1(const int count , int data[]) {
      |                                                        ^
a.cc:14:18: error: expected '}' at end of input
   14 |         return 0;
      |                  ^
a.cc:4:12: note: to match this '{'
    4 | int main() {
      |            ^
Language: C++

void fibonacci_1(const int count , int data[]) {
	data[0] = 1;
	if(count == 1) return;
	data[1] = 1;
	
	for( int i = 2; i < count ; i++) {
		data[i] = data[i-1]+data[i-2];
	}
}


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++

#include <iostream>
using namespace std;

int main() {
	void fibonacci_1(const int count , int data[]) {
	data[0] = 1;
	if(count == 1) return;
	data[1] = 1;
	
	for( int i = 2; i < count ; i++) {
		data[i] = data[i-1]+data[i-2];
	}
}
	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:5:56: error: a function-definition is not allowed here before '{' token
    5 |         void fibonacci_1(const int count , int data[]) {
      |                                                        ^
Language: C++

#include <iostream>
using namespace std;
 
int main() {
	int fib[45]={1,1},i;
for(i=2;i<=44;i++){
fib[i]=fib[i-1]+fib[i-2];
}
	return 0;
}


Compiler output:
a.cc:3:1: error: extended character   is not valid in an identifier
    3 |  
      | ^
a.cc:3:1: error: '\U000000a0' does not name a type
    3 |  
      | ^
Language: C++

#include <iostream>
using namespace std;
 
int main() {
	int fib[45]={1,1},i;
for(i=1;i<=44;i++){
fib[i]=fib[i-1]+fib[i-2];
}
	return 0;
}


Compiler output:
a.cc:3:1: error: extended character   is not valid in an identifier
    3 |  
      | ^
a.cc:3:1: error: '\U000000a0' does not name a type
    3 |  
      | ^
Language: C++

object Main extends App {
  val fibs: Array[Option[Int]] = Array.fill(45)(None)
  val n: Int = io.StdIn.readInt()
  fibs(0) = Some(1); fibs(1) = Some(1)
  println(fib(n))

  def fib(n: Int): Int = fibs(n) match {
    case None =>
      val fibN: Int = fib(n-1) + fib(n-2)
      fibs(n) = Some(fibN)
      fibN
    case Some(x) => x
  }
}


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

#include <iostream>
#include <string>
#include <sstream>
#include <list>
#include <stack>
#include <queue>
#include <algorithm>
#include <utility>
#include <vector>
#include <map>
#include <cstring>
#include <cstdio>
#include <cmath>

using namespace std;

int f(const int);

int main()
{
    int N;
    cin>>N;
    cout<<f(d)<<endl;
}
int f(const int d)
{
    if(d<2)return 1;
    return f(d-1)+f(d-2);
}

Compiler output:
a.cc: In function 'int main()':
a.cc:23:13: error: 'd' was not declared in this scope
   23 |     cout<<f(d)<<endl;
      |             ^
Language: Java

#include <stdio.h>
#define max 1000
int n;
 int m[max][max],p[max];


int main(){
  int c,r;
  int i,k;
 
  scanf("%d",&n);
  for(i=1;i<n+1;i++){
    scanf("%d %d",&p[i-1],&p[i]);
  }
  printf("%d\n", optimalParenthesization());
}

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



Compiler output:
Main.java:1: error: illegal character: '#'
#include <stdio.h>
^
Main.java:1: error: class, interface, enum, or record expected
#include <stdio.h>
         ^
Main.java:2: error: illegal character: '#'
#define max 1000
^
Main.java:4: error: class, interface, enum, or record expected
 int m[max][max],p[max];
 ^
Main.java:7: error: unnamed classes are a preview feature and are disabled by default.
int main(){
^
  (use --enable-preview to enable unnamed classes)
Main.java:11: error: illegal start of expression
  scanf("%d",&n);
             ^
Main.java:13: error: illegal start of expression
    scanf("%d %d",&p[i-1],&p[i]);
                  ^
Main.java:13: error: illegal start of expression
    scanf("%d %d",&p[i-1],&p[i]);
                          ^
8 errors
Language: Java

import java.util.Scanner;
import java.lang.Math;
public class Main {
        public static void main(String[] args){
                final Scanner sc=new Scanner(System.in);
                int n=sc.nextInt();
                int[] p=new int[n+1];
                int[][] m=new int[n+1][n+1];

                
                for(int i=1;i<=n;i++){
                        p[i-1]=sc.nextInt();
                        p[i]=sc.nextInt();
                }
                
                for(int i=1;i<=n;i++)m[i][i]=0;
                
                for(int j=2;j<=n;j++){
                    for(int i=1; i<=n-j+1; i++){
                                int k=i+l-1;
                                m[i][k]=200000;
                                for(int l=i;l<=k-1;l++){
                                    m[i][k]=((m[i][k] < m[i][l] + m[l + 1][k] + p[i - 1] * p[l] * p[k]) ? m[i][k] : (m[i][l] + m[l + 1][k] + p[i - 1] * p[l] * p[k]));
                                }
                        }
                }
                System.out.println("");
        }
    
    System.out.println(m[1][n]);
}


}

Compiler output:
Main.java:30: error: <identifier> expected
    System.out.println(m[1][n]);
                      ^
Main.java:30: error: ']' expected
    System.out.println(m[1][n]);
                         ^
Main.java:34: error: class, interface, enum, or record expected
}
^
3 errors
Language: Java

import java.util.Scanner;
import java.lang.Math;
public class Main {
        public static void main(String[] args){
                final Scanner sc=new Scanner(System.in);
                int n=sc.nextInt();
                int[] p=new int[n+1];
                int[][] m=new int[n+1][n+1];

                
                for(int i=1;i<=n;i++){
                        p[i-1]=sc.nextInt();
                        p[i]=sc.nextInt();
                }
                
                for(int i=1;i<=n;i++)m[i][i]=0;
                
                for(int j=2;j<=n;j++){
                    for(int i=1; i<=n-j+1; i++){
                                int k=i+l-1;
                                m[i][k]=200000;
                                for(int l=i;l<=k-1;l++){
                                    m[i][k]=((m[i][k] < m[i][l] + m[l + 1][k] + p[i - 1] * p[l] * p[k]) ? m[i][k] : (m[i][l] + m[l + 1][k] + p[i - 1] * p[l] * p[k]));
                                }
                        }
                }
    System.out.println(m[1][n]);
}


}

Compiler output:
Main.java:20: error: cannot find symbol
                                int k=i+l-1;
                                        ^
  symbol:   variable l
  location: class Main
1 error
Language: Java

import java.util.Scanner;
import java.lang.Math;
public class Main {
    public static void main(String[] args){
        final Scanner sc=new Scanner(System.in);
        int n=sc.nextInt();
        int[] p=new int[n+1];
        int[][] m=new int[n+1][n+1];

for(int i = 1; i <= n; i++)
    {
        p[i - 1] = In.nextInt();
        p[i] = In.nextInt();
    }

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

for(int j = 2; j <= n; j++)
    {
        for(int i = 1; i <= n - j + 1; i++)
            {
                int k = i + j - 1;
                m[i][k] = 200000;
                for(int l = i; l <= k - 1; l++)
                    {
                        m[i][k] = ((m[i][k] < m[i][l] + m[l + 1][k] + p[i - 1] * p[l] * p[k]) ? m[i][k] : (m[i][l] + m[l + 1][k] + p[i - 1] * p[l] * p[k]));
                    }
            }
    }
System.out.println(m[1][n]);
}
}

Compiler output:
Main.java:12: error: cannot find symbol
        p[i - 1] = In.nextInt();
                   ^
  symbol:   variable In
  location: class Main
Main.java:13: error: cannot find symbol
        p[i] = In.nextInt();
               ^
  symbol:   variable In
  location: class Main
2 errors
Language: Java

import java.util.Scanner;
class Main{
    final static int  MAX_N = 1500;

    public static void main(String[] args){
	Scanner scan = new Scanner(System.in);
	int n;

	n = scan.nextInt();
	for(int i=0; i<n; i++){
	    char[] str1 = scan.next().toCharArray();
	    char[] str2 = scan.next().toCharArray();
	    solve(str1, str2);
	}
    }

    static void solve(char[] str1, char[] str2){
	static int[][] memorry = new int[MAX_N][MAX_N];
	for(int i=0; i<str1.length; i++){
	    for(int j=0; j<str2.length; j++){
		if(str1[i]==str2[j])memorry[i+1][j+1]=memorry[i][j]+1;
		else memorry[i+1][j+1]=Math.max(memorry[i][j+1], memorry[i+1][j]);
	    }
	}
	System.out.println(memorry[str1.length][str2.length]);
    }
}

Compiler output:
Main.java:18: error: illegal start of expression
	static int[][] memorry = new int[MAX_N][MAX_N];
	^
Main.java:19: error: illegal start of type
	for(int i=0; i<str1.length; i++){
	^
Main.java:19: error: > or ',' expected
	for(int i=0; i<str1.length; i++){
	                          ^
Main.java:19: error: <identifier> expected
	for(int i=0; i<str1.length; i++){
	                             ^
Main.java:25: error: <identifier> expected
	System.out.println(memorry[str1.length][str2.length]);
	                  ^
Main.java:25: error: ']' expected
	System.out.println(memorry[str1.length][str2.length]);
	                           ^
Main.java:25: error: wrong receiver parameter name
	System.out.println(memorry[str1.length][str2.length]);
	                                      ^
Main.java:27: error: class, interface, enum, or record expected
}
^
8 errors
Language: C

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

using namespace std;

void output( int, int, int, int);

#define MAX 100
#define INFTY (1 << 21)

int SIZE;
int R[MAX + 2];
int C[MAX+1][MAX+1]; // cost table
int B[MAX+1][MAX+1]; // best table

void compute(){
    for ( int i = 1; i <= SIZE; i++ )
    for ( int j = 1; j <= SIZE; j++ ) C[i][j] = INFTY;
    
    for ( int i = 1; i <= SIZE; i++ ) C[i][i] = 0;
    
    for ( int j = 1; j <= SIZE - 1; j++ ){
        for ( int i = 1; i <= SIZE - j; i++ ){
            for ( int k = i + 1; k <= i + j; k++ ){
                // C[i][i+j] = min( C[i][i+j], 
                //                  C[i][k-1] + C[k][i+j] + R[i]*R[k]*R[i+j+1]);
                int cost = C[i][k-1] + C[k][i+j] + R[i]*R[k]*R[i+j+1];
                if ( cost < C[i][i+j] ){
                    C[i][i+j] =  cost;
                    B[i][i+j] = k;
                }
                
            }
        }
    }
}

void order( int i, int j ){
    if ( i == j ) cout << "M" << i;
    else{
        cout << "(";
        order( i, B[i][j]-1 ); order(B[i][j], j);
        cout << ")";
    }
}

void input(){
    cin >> SIZE;
    for ( int i = 1; i <= SIZE + 1; i++ ) cin >> R[i];
}

void output(){
    cout << "minimum cost = " << C[1][SIZE] << endl;
    order(1, SIZE);
    cout << endl;
}

main(){
    input();
    compute();
    output();
}


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

#include<iostream>
#include<algorithm>
using namespace std;

static const in N = 100;

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

  for(i = 0;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] = (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:1:9: fatal error: iostream: No such file or directory
    1 | #include<iostream>
      |         ^~~~~~~~~~
compilation terminated.
Language: C

#include<stdio.h>

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

int main(){
  int n,p[100],m[100][100],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++){
      j=i+l-1;
      m[i][j]=99999999;
      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: In function 'main':
main.c:22:30: error: 'I' undeclared (first use in this function)
   22 |       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]);}
      |                              ^
main.c:22:30: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include<stdio.h>
static cost int N=100
int main(){
  int i,p[N+1],m[N+1][N+1],n,j,k,l;

  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;i++){
      j=l+i-1;
      m[i][j]=2097152;
      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:12: error: expected ';' before 'int'
    2 | static cost int N=100
      |            ^~~~
      |            ;
main.c:3:1: error: expected ',' or ';' before 'int'
    3 | int main(){
      | ^~~
Language: C

#include<stdio.h>
static cost int N=100;
int main(){
  int i,p[N+1],m[N+1][N+1],n,j,k,l;

  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;i++){
      j=l+i-1;
      m[i][j]=2097152;
      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:12: error: expected ';' before 'int'
    2 | static cost int N=100;
      |            ^~~~
      |            ;
Language: C

#include <stdio.h>
#define MAX 100

int m[MAX][MAX];
int p[MAX],r[MAX],c[MAX],Sum;

void matrixChainOrder(){

	int i,l,k,N;

	N = n-1;
	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] = 1/0;
			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);
			}
		}
	}
}

int main(){

	int n;

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

	matrixChainOrder();
	printf("%d\n",Sum);

	return 0;
}


Compiler output:
main.c: In function 'matrixChainOrder':
main.c:11:13: error: 'n' undeclared (first use in this function)
   11 |         N = n-1;
      |             ^
main.c:11:13: note: each undeclared identifier is reported only once for each function it appears in
main.c:15:25: error: 'j' undeclared (first use in this function)
   15 |                         j = i+l-1;
      |                         ^
main.c:16:36: warning: division by zero [-Wdiv-by-zero]
   16 |                         m[i][j] = 1/0;
      |                                    ^
main.c:18:33: error: 'q' undeclared (first use in this function)
   18 |                                 q = m[i,k] + m[k+1][j] + p[i-1]*p[k]*p[j];
      |                                 ^
main.c: In function 'main':
main.c:30:13: error: 'i' undeclared (first use in this function)
   30 |         for(i = 0; i < n; i++) scan("%d %d",&r[i][0],&l[i][1]);
      |             ^
main.c:30:32: error: implicit declaration of function 'scan'; did you mean 'scanf'? [-Wimplicit-function-declaration]
   30 |         for(i = 0; i < n; i++) scan("%d %d",&r[i][0],&l[i][1]);
      |                                ^~~~
      |                                scanf
main.c:30:55: error: 'l' undeclared (first use in this function)
   30 |         for(i = 0; i < n; i++) scan("%d %d",&r[i][0],&l[i][1]);
      |                                                       ^
Language: C

#include <stdio.h>

int Matrix[100][100];

int matrixChainOrder(int N){
    n = N
    for i = 1 to n
        m[i, i] = 0
    for l = 2 to n
        for i = 1 to n-l+1
            j = i+l-1
            m[i, j] = INF
            for k = i to j-1
                q = m[i,k] + m[k+1, j] + p[i-1]*p[k]*p[j]
                m[i,j] = min(m[i,j], q)
}

int main(){
    int N, p[100];
    scanf("%d\n",%N);
    for ( int ix = 0 ; ix < N ; ix++ ){
        
    }
}


Compiler output:
main.c: In function 'matrixChainOrder':
main.c:6:5: error: 'n' undeclared (first use in this function)
    6 |     n = N
      |     ^
main.c:6:5: note: each undeclared identifier is reported only once for each function it appears in
main.c:6:10: error: expected ';' before 'for'
    6 |     n = N
      |          ^
      |          ;
    7 |     for i = 1 to n
      |     ~~~   
main.c: In function 'main':
main.c:20:18: error: expected expression before '%' token
   20 |     scanf("%d\n",%N);
      |                  ^
Language: C

#include <stdio.h>
#define INF 1e8

int Matrix[100][100];
int size[101];

void matrixChainOrder(int N){
    for ( int ix = 0 ; ix < N ; ix++)
        Matrix[ix][ix] = 0;
        
    for ( int lx = 2 ; lx < N ; lx++)
        for ( int ix = 1 ; ix < N-lx+1 ; ix++){
            int jx = ix+lx-1;
            Matrix[ix][jx] = INF;
            for ( int kx = ix ; kx < j-1 ; kx++){
                int temp = Matrix[ix][kx] + Matrix[kx+1][jx] + size[ix-1]*size[kx]*size[jx];
                if ( temp < Matrix[ix][jx])
                    Matrix[ix][jx] = temp;
            }
        }
}

int main(){
    int N;
    scanf("%d\n",%N);
    for ( int ix = 0 ; ix < N ; ix++ ){
        scanf("%d %d\n",&size[i],&size[i+1]);
    }
    matrixChainOrder(N);
    printf("%d\n",Matrix[1][N-1]);
    
    return 0;
}


Compiler output:
main.c: In function 'matrixChainOrder':
main.c:15:38: error: 'j' undeclared (first use in this function); did you mean 'jx'?
   15 |             for ( int kx = ix ; kx < j-1 ; kx++){
      |                                      ^
      |                                      jx
main.c:15:38: note: each undeclared identifier is reported only once for each function it appears in
main.c: In function 'main':
main.c:25:18: error: expected expression before '%' token
   25 |     scanf("%d\n",%N);
      |                  ^
main.c:27:31: error: 'i' undeclared (first use in this function); did you mean 'ix'?
   27 |         scanf("%d %d\n",&size[i],&size[i+1]);
      |                               ^
      |                               ix