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

import java.util.Scanner;

public class AOJ0568 {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt(),K = sc.nextInt(); 
		long[][] NK = new long[N][6]; 
		int[] dp = new int[N]; 
		for(int i = 0; i < N; i++) dp[i] = 0;
		for(int i = 0; i < K; i++){
			int scan = sc.nextInt();
			dp[scan-1] = sc.nextInt();
		} 
		for(int i = 0; i < N; i++){
			if(dp[i] == 1){
				if(i == 0)NK[i][1] = 1;
				else{
					NK[i][0] += NK[i-1][1];
					NK[i][1] += NK[i-1][2] + NK[i-1][3] + NK[i-1][4] + NK[i-1][5];
				}
			}
			else if(dp[i] == 2){
				if(i == 0)NK[i][3] = 1;
				else{
					NK[i][2] += NK[i-1][3];
					NK[i][3] += NK[i-1][0] + NK[i-1][1] + NK[i-1][4] + NK[i-1][5];
				}
			}
			else if(dp[i] == 3){
				if(i == 0)NK[i][5] = 1;
				else{
					NK[i][4] += NK[i-1][5];
					NK[i][5] += NK[i-1][0] + NK[i-1][1] + NK[i-1][2] + NK[i-1][3];
				}
			}
			else{
				if(i == 0){
					NK[i][1] = 1;NK[i][3] = 1;NK[i][5] = 1;
				}
				else{
					if(NK[i-1][1] > 0){
						NK[i][0] += NK[i-1][1] % 10000;
						NK[i][3] += NK[i-1][0] + NK[i-1][1] % 10000;
						NK[i][5] += NK[i-1][0] + NK[i-1][1] % 10000;
					}else{
						NK[i][3] += NK[i-1][0] + NK[i-1][1] % 10000;
						NK[i][5] += NK[i-1][0] + NK[i-1][1] % 10000;
					}
					if(NK[i-1][3] > 0){
						NK[i][1] += NK[i-1][2] + NK[i-1][3] % 10000;
						NK[i][2] += NK[i-1][3] % 10000;
						NK[i][5] += NK[i-1][2] + NK[i-1][3] % 10000;
					}else{
						NK[i][1] += NK[i-1][2] + NK[i-1][3] % 10000;
						NK[i][5] += NK[i-1][2] + NK[i-1][3] % 10000;
					}
					if(NK[i-1][5] > 0){
						NK[i][1] += NK[i-1][4] + NK[i-1][5] % 10000;
						NK[i][3] += NK[i-1][4] + NK[i-1][5] % 10000;
						NK[i][4] += NK[i-1][5] % 10000;
					}else{
						NK[i][1] += NK[i-1][4] + NK[i-1][5] % 10000;
						NK[i][3] += NK[i-1][4] + NK[i-1][5] % 10000;
					}
				}
			}
		}
		int total = 0;
		for(int j = 0; j < 6; j++){
			total += NK[N-1][j]; 
		}
		System.out.println(total % 10000);
	}

}

Compiler output:
Main.java:3: error: class AOJ0568 is public, should be declared in a file named AOJ0568.java
public class AOJ0568 {
       ^
1 error
Language: Java

import java.util.Scanner;

public class aoj0568 {
	public static void main(String[] args){
		Scanner in = new Scanner(System.in);
		int allday = in.nextInt();
		int pasta = in.nextInt();
		int sum = 0;
		int[][]A = new int [3][2];
		int[]B = new int [3];
		int[]C = new int [allday+1];
		for(int i = 1;i <= allday;i++)C[i] = 0;
		for(int i = 0;i < pasta;i++){
			int day = in.nextInt();
			C[day] = in.nextInt();
		}
		for(int i = 0;i < 3;i++)A[i][0]=1;
		switch(C[1] % 4){
		case 0:
			break;
		case 1:
			A[1][0] = 0;
			A[2][0] = 0;
			break;
		case 2:
			A[0][0] = 0;
			A[2][0] = 0;
			break;
		case 3:
			A[0][0] = 0;
			A[1][0] = 0;
			break;
		}
		for(int i = 2;i <= allday;i++){
			B[0]=A[1][0]+A[2][0]+A[1][1]+A[2][1];
			B[1]=A[0][0]+A[2][0]+A[0][1]+A[2][1];
			B[2]=A[0][0]+A[1][0]+A[0][1]+A[1][1];
			switch(C[i] % 4){
			case 0:
				for(int j = 0;j < 3;j++){
					A[j][1]=A[j][0] % 10000;
					A[j][0]=B[j] % 10000;
				}
				break;
			case 1:
				for(int j = 0;j < 3;j++){
					A[j][1]=A[j][0] % 10000;
					A[j][0]=B[j] % 10000;
					if(j != 0){
						A[j][0] = 0;
						A[j][1] = 0;
					}
				}
				break;
			case 2:
				for(int j = 0;j < 3;j++){
					A[j][1]=A[j][0] % 10000;
					A[j][0]=B[j] % 10000;
					if(j != 1){
						A[j][0] = 0;
						A[j][1] = 0;
					}
				}
				break;
			case 3:
				for(int j = 0;j < 3;j++){
					A[j][1]=A[j][0] % 10000;
					A[j][0]=B[j] % 10000;
					if(j != 2){
						A[j][0] = 0;
						A[j][1] = 0;
					}
				}
			}
		}
		for(int i = 0;i < 3;i++){
			sum = sum + A[i][0] + A[i][1];
		}
		sum = sum % 10000;
		System.out.println(sum);
	}
}

Compiler output:
Main.java:3: error: class aoj0568 is public, should be declared in a file named aoj0568.java
public class aoj0568 {
       ^
1 error
Language: C

#include<cstdio>
#include<algorithm>
#include<iostream>
#include<functional>
using namespace std;
long long int dp[101][4][4];
int main(void)
{
	int i,j,k,n,m,a,b[101],c;
	long long int sum,x;
	cin>>n>>m;
	for(i=1;i<=n;i++){
		for(j=1;j<=3;j++){
			for(k=0;k<=3;k++) dp[i][j][k]=0;
		}
	}
	for(i=1;i<=n;i++) b[i]=0;
	for(i=1;i<=m;i++){
		cin>>a;
		cin>>b[a];
	}
	if(b[1]>0) dp[1][b[1]][0]=1;
	else{
		for(i=1;i<=3;i++) dp[1][i][0]=1;
	}
	for(i=1;i<n;i++){
		for(j=1;j<=3;j++){
			if(dp[i][j][0]+dp[i][j][1]+dp[i][j][2]+dp[i][j][3]>0){
				for(k=0;k<=3;k++){
					if(b[i+1]>0){
						if(b[i+1]!=k||b[i+1]!=j){
							dp[i+1][b[i+1]][j]+=dp[i][j][k];
							dp[i+1][b[i+1]][j]%=10000;
						}
					}
					else{
						if(k!=1||j!=1){
							dp[i+1][1][j]+=dp[i][j][k];
							dp[i+1][1][j]%=10000;
						}
						if(k!=2||j!=2){
							dp[i+1][2][j]+=dp[i][j][k];
							dp[i+1][2][j]%=10000;
						}
						if(k!=3||j!=3){
							dp[i+1][3][j]+=dp[i][j][k];
							dp[i+1][3][j]%=10000;
						}
					}
				}
			}
		}
	}
	sum=0;
	for(i=1;i<=3;i++){
		for(j=0;j<=3;j++) sum+=dp[n][i][j];
	}
	x=sum%10000;
	cout<<x<<endl;	
	return 0;
}

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

#include<cstdio>
#include<algorithm>
#include<iostream>
#include<functional>
using namespace std;
long long int dp[101][4][4];
int main(void)
{
	int i,j,k,l,n,m,a,b[101],c;
	long long int sum,x;
	cin>>n>>m;
	for(i=1;i<=n;i++){
		for(j=1;j<=3;j++){
			for(k=0;k<=3;k++) dp[i][j][k]=0;
		}
	}
	for(i=1;i<=n;i++) b[i]=0;
	for(i=1;i<=m;i++){
		cin>>a;
		cin>>b[a];
	}
	if(b[1]>0) dp[1][b[1]][0]=1;
	else{
		for(i=1;i<=3;i++) dp[1][i][0]=1;
	}
	for(i=1;i<n;i++){
		for(j=1;j<=3;j++){
			if(dp[i][j][0]+dp[i][j][1]+dp[i][j][2]+dp[i][j][3]>0){
				for(k=0;k<=3;k++){
					if(b[i+1]>0){
						if(b[i+1]!=k||b[i+1]!=j){
							dp[i+1][b[i+1]][j]+=dp[i][j][k];
							dp[i+1][b[i+1]][j]%=10000;
						}
					}
					else{
						for(l=1;l<=3;l++){
							if(k!=l||j!=l){
								dp[i+1][l][j]+=dp[i][j][k];
								dp[i+1][l][j]%=10000;
							}
						}
					}
				}
			}
		}
	}
	sum=0;
	for(i=1;i<=3;i++){
		for(j=0;j<=3;j++) sum+=dp[n][i][j];
	}
	x=sum%10000;
	cout<<x<<endl;	
	return 0;
}

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

#include<stdio.h>
int main(void)
{
int a,b,i,j,k,n,m,f[810]={0},d[114][514]={0}
scanf("%d %d",&n,&m);
for(i=0;i<m;i++){
scanf("%d %d",&a,&b);
f[a]=b;
}
for(i=0;i<9;i++){
d[i][2]=1;
if(f[1] && f[1]-i%3-1){
d[i][2]=0;
}
if(f[2] && f[2]-i/3-1){
d[i][2]=0;
}
for(i=3;i<n;i++){
for(j=0;j<9;j++){
if(f[i] && f[i]-1-j/3){
for(k=0;k<3;k++){
if(k==j%3 && j%3==j/3){
d[j][i]+=d[k+(j%3)=3][i-1];
d[j][i]%10000;
}
}
}
a=0;
for(i=0;i<9;i++){
a=a+d[i][n];
prinff("%d\n",a%10000);
return 0;
}

Compiler output:
main.c: In function 'main':
main.c:5:1: error: expected ',' or ';' before 'scanf'
    5 | scanf("%d %d",&n,&m);
      | ^~~~~
main.c:23:19: error: lvalue required as left operand of assignment
   23 | d[j][i]+=d[k+(j%3)=3][i-1];
      |                   ^
main.c:31:1: error: implicit declaration of function 'prinff'; did you mean 'printf'? [-Wimplicit-function-declaration]
   31 | prinff("%d\n",a%10000);
      | ^~~~~~
      | printf
main.c:33:1: error: expected declaration or statement at end of input
   33 | }
      | ^
main.c:33:1: error: expected declaration or statement at end of input
main.c:33:1: error: expected declaration or statement at end of input
main.c:33:1: error: expected declaration or statement at end of input
Language: C

#include<stdio.h>
int main(void)
{
int a,b,i,j,k,n,m,f[810]={0},d[114][514]={0};
scanf("%d %d",&n,&m);
for(i=0;i<m;i++){
scanf("%d %d",&a,&b);
f[a]=b;
}
for(i=0;i<9;i++){
d[i][2]=1;
if(f[1] && f[1]-i%3-1){
d[i][2]=0;
}
if(f[2] && f[2]-i/3-1){
d[i][2]=0;
}
for(i=3;i<n;i++){
for(j=0;j<9;j++){
if(f[i] && f[i]-1-j/3){
for(k=0;k<3;k++){
if(k==j%3 && j%3==j/3){
d[j][i]=d[j][i]+d[k+(j%3)=3][i-1];
d[j][i]%10000;
}
}
}
a=0;
for(i=0;i<9;i++){
a=a+d[i][n];
prinff("%d\n",a%10000);
return 0;
}

Compiler output:
main.c: In function 'main':
main.c:23:26: error: lvalue required as left operand of assignment
   23 | d[j][i]=d[j][i]+d[k+(j%3)=3][i-1];
      |                          ^
main.c:31:1: error: implicit declaration of function 'prinff'; did you mean 'printf'? [-Wimplicit-function-declaration]
   31 | prinff("%d\n",a%10000);
      | ^~~~~~
      | printf
main.c:33:1: error: expected declaration or statement at end of input
   33 | }
      | ^
main.c:33:1: error: expected declaration or statement at end of input
main.c:33:1: error: expected declaration or statement at end of input
main.c:33:1: error: expected declaration or statement at end of input
Language: C

#include<stdio.h>
int main(void)
{
int a,b,i,j,k,n,m,f[810]={0},d[114][514]={0};
scanf("%d %d",&n,&m);
for(i=0;i<m;i++){
scanf("%d %d",&a,&b);
f[a]=b;
}
for(i=0;i<9;i++){
d[i][2]=1;
if(f[1] && f[1]-i%3-1){
d[i][2]=0;
}
if(f[2] && f[2]-i/3-1){
d[i][2]=0;
}
for(i=3;i<n;i++){
for(j=0;j<9;j++){
if(f[i] && f[i]-1-j/3){
for(k=0;k<3;k++){
if(k==j%3 && j%3==j/3){
d[j][i]+=d[k+(j%3)=3][i-1];
d[j][i]%10000;
}
}
}
a=0;
for(i=0;i<9;i++){
a=a+d[i][n];
prinff("%d\n",a%10000);
return 0;
}

Compiler output:
main.c: In function 'main':
main.c:23:19: error: lvalue required as left operand of assignment
   23 | d[j][i]+=d[k+(j%3)=3][i-1];
      |                   ^
main.c:31:1: error: implicit declaration of function 'prinff'; did you mean 'printf'? [-Wimplicit-function-declaration]
   31 | prinff("%d\n",a%10000);
      | ^~~~~~
      | printf
main.c:33:1: error: expected declaration or statement at end of input
   33 | }
      | ^
main.c:33:1: error: expected declaration or statement at end of input
main.c:33:1: error: expected declaration or statement at end of input
main.c:33:1: error: expected declaration or statement at end of input
Language: C

#include<stdio.h>
int main(void)
{
int a,b,i,j,k,n,m,f[810]={0},d[114][514]={0};
scanf("%d %d",&n,&m);
for(i=0;i<m;i++){
scanf("%d %d",&a,&b);
f[a]=b;
}
for(i=0;i<9;i++){
d[i][2]=1;
if(f[1] && f[1]-i%3-1){
d[i][2]=0;
}
if(f[2] && f[2]-i/3-1){
d[i][2]=0;
}
for(i=3;i<n;i++){
for(j=0;j<9;j++){
if(f[i] && f[i]-1-j/3){
for(k=0;k<3;k++){
if(k==j%3 && j%3==j/3){
d[j][i]+=d[k+(j%3)=3][i-1];
d[j][i]%10000;
}
}
}
a=0;
for(i=0;i<9;i++){
a+=d[i][n];
}
prinff("%d\n",a%10000);
return 0;
}

Compiler output:
main.c: In function 'main':
main.c:23:19: error: lvalue required as left operand of assignment
   23 | d[j][i]+=d[k+(j%3)=3][i-1];
      |                   ^
main.c:32:1: error: implicit declaration of function 'prinff'; did you mean 'printf'? [-Wimplicit-function-declaration]
   32 | prinff("%d\n",a%10000);
      | ^~~~~~
      | printf
main.c:34:1: error: expected declaration or statement at end of input
   34 | }
      | ^
main.c:34:1: error: expected declaration or statement at end of input
main.c:34:1: error: expected declaration or statement at end of input
Language: C

#include<stdio.h>
int main(void)
{
int a,b,i,j,k,n,m,f[810]={0},d[114][514]={0};
scanf("%d %d",&n,&m);
for(i=0;i<m;i++){
scanf("%d %d",&a,&b);
f[a]=b;
}
for(i=0;i<9;i++){
d[i][2]=1;
if(f[1] && f[1]-i%3-1){
d[i][2]=0;
}
if(f[2] && f[2]-i/3-1){
d[i][2]=0;
}
for(i=3;i<n;i++){
for(j=0;j<9;j++){
if(f[i] && f[i]-1-j/3){
for(k=0;k<3;k++){
if(k==j%3 && j%3==j/3){
d[j][i]+=d[k+(j%3)=3][i-1];
d[j][i]%10000;
}
}
}
}
}
a=0;
for(i=0;i<9;i++){
a+=d[i][n];
}
prinff("%d\n",a%10000);
return 0;
}

Compiler output:
main.c: In function 'main':
main.c:23:19: error: lvalue required as left operand of assignment
   23 | d[j][i]+=d[k+(j%3)=3][i-1];
      |                   ^
main.c:34:1: error: implicit declaration of function 'prinff'; did you mean 'printf'? [-Wimplicit-function-declaration]
   34 | prinff("%d\n",a%10000);
      | ^~~~~~
      | printf
main.c:36:1: error: expected declaration or statement at end of input
   36 | }
      | ^
Language: C

#include<stdio.h>
int main(void)
{
int a,b,i,j,k,n,m,f[101]={0},d[9][101]={0};
scanf("%d %d",&n,&m);
for(i=0;i<m;i++){
scanf("%d %d",&a,&b);
f[a]=b;
}
for(i=0;i<9;i++){
d[i][2]=1;
if(f[1] && f[1]-i%3-1){
d[i][2]=0;
}
if(f[2] && f[2]-i/3-1){
d[i][2]=0;
}
for(i=3;i<n;i++){
for(j=0;j<9;j++){
if(f[i] && f[i]-1-j/3){
for(k=0;k<3;k++){
if(k==j%3 && j%3==j/3){
d[j][i]+=d[k+(j%3)=3][i-1];
d[j][i]%10000;
}
}
}
}
}
a=0;
for(i=0;i<9;i++){
a+=d[i][n];
}
prinff("%d\n",a%10000);
return 0;
}

Compiler output:
main.c: In function 'main':
main.c:23:19: error: lvalue required as left operand of assignment
   23 | d[j][i]+=d[k+(j%3)=3][i-1];
      |                   ^
main.c:34:1: error: implicit declaration of function 'prinff'; did you mean 'printf'? [-Wimplicit-function-declaration]
   34 | prinff("%d\n",a%10000);
      | ^~~~~~
      | printf
main.c:36:1: error: expected declaration or statement at end of input
   36 | }
      | ^
Language: C

#include<stdio.h>
int main(void)
{
int a,b,i,j,k,n,m,f[101]={0},d[9][101]={0};
scanf("%d %d",&n,&m);
for(i=0;i<m;i++){
scanf("%d %d",&a,&b);
f[a]=b;
}
for(i=0;i<9;i++){
d[i][2]=1;
if(f[1] && f[1]-i%3-1){
d[i][2]=0;
}
if(f[2] && f[2]-i/3-1){
d[i][2]=0;
}
}
for(i=3;i<n;i++){
for(j=0;j<9;j++){
if(f[i] && f[i]-1-j/3){
for(k=0;k<3;k++){
if(k==j%3 && j%3==j/3){
d[j][i]+=d[k+(j%3)=3][i-1];
d[j][i]%10000;
}
}
}
}
}
a=0;
for(i=0;i<9;i++){
a+=d[i][n];
}
prinff("%d\n",a%10000);
return 0;
}

Compiler output:
main.c: In function 'main':
main.c:24:19: error: lvalue required as left operand of assignment
   24 | d[j][i]+=d[k+(j%3)=3][i-1];
      |                   ^
main.c:35:1: error: implicit declaration of function 'prinff'; did you mean 'printf'? [-Wimplicit-function-declaration]
   35 | prinff("%d\n",a%10000);
      | ^~~~~~
      | printf
Language: C

#include<stdio.h>
int main(void)
{
int a,b,i,j,k,n,m,f[101]={0},d[9][101]={0};
scanf("%d %d",&n,&m);
for(i=0;i<m;i++){
scanf("%d %d",&a,&b);
f[a]=b;
}
for(i=0;i<9;i++){
d[i][2]=1;
if(f[1] && f[1]-i%3-1){
d[i][2]=0;
}
if(f[2] && f[2]-i/3-1){
d[i][2]=0;
}
}
for(i=3;i<n;i++){
for(j=0;j<9;j++){
if(f[i] && f[i]-1-j/3){
for(k=0;k<3;k++){
if(k==j%3 && j%3==j/3){
d[j][i]+=d[k+(j%3)=3][i-1];
d[j][i]%10000;
}
}
}
}
}
for(i=a=0;i<9;i++){
a+=d[i][n];
}
prinff("%d\n",a%10000);
return 0;
}

Compiler output:
main.c: In function 'main':
main.c:24:19: error: lvalue required as left operand of assignment
   24 | d[j][i]+=d[k+(j%3)=3][i-1];
      |                   ^
main.c:34:1: error: implicit declaration of function 'prinff'; did you mean 'printf'? [-Wimplicit-function-declaration]
   34 | prinff("%d\n",a%10000);
      | ^~~~~~
      | printf
Language: C

#include<stdio.h>
int main(void)
{
int f[101]={0};
int d[9][101]={0};
int a,b,i,j,k,n,m;
scanf("%d %d",&n,&m);
for(i=0;i<m;i++){
scanf("%d %d",&a,&b);
f[a]=b;
}
for(i=0;i<9;i++){
d[i][2]=1;
if(f[1] && f[1]-i%3-1){
d[i][2]=0;
}
if(f[2] && f[2]-i/3-1){
d[i][2]=0;
}
}
for(i=3;i<n;i++){
for(j=0;j<9;j++){
if(f[i] && f[i]-1-j/3){
for(k=0;k<3;k++){
if(k==j%3 && j%3==j/3){
d[j][i]+=d[k+(j%3)=3][i-1];
d[j][i]%10000;
}
}
}
}
}
for(i=a=0;i<9;i++){
a+=d[i][n];
}
prinff("%d\n",a%10000);
return 0;
}

Compiler output:
main.c: In function 'main':
main.c:26:19: error: lvalue required as left operand of assignment
   26 | d[j][i]+=d[k+(j%3)=3][i-1];
      |                   ^
main.c:36:1: error: implicit declaration of function 'prinff'; did you mean 'printf'? [-Wimplicit-function-declaration]
   36 | prinff("%d\n",a%10000);
      | ^~~~~~
      | printf
Language: C

#include<stdio.h>
int main(void)
{
int f[101]={0};
int d[9][101]={0};
int a,b,i,j,k,n,m;
scanf("%d %d",&n,&m);
for(i=0;i<m;i++){
scanf("%d %d",&a,&b);
f[a]=b;
}
for(i=0;i<9;i++){
d[i][2]=1;
if(f[1] && f[1]-i%3-1){
d[i][2]=0;
}
if(f[2] && f[2]-i/3-1){
d[i][2]=0;
}
}
for(i=3;i<n;i++){
for(j=0;j<9;j++){
if(f[i] && f[i]-1-j/3){
for(k=0;k<3;k++){
if(k==j%3 && j%3==j/3){
d[j][i]+=d[k+(j%3)=3][i-1];
d[j][i]%10000;
}
}
}
}
}
for(i=a=0;i<9;i++){
a+=d[i][n];
prinff("%d\n",a%10000);
}
return 0;
}

Compiler output:
main.c: In function 'main':
main.c:26:19: error: lvalue required as left operand of assignment
   26 | d[j][i]+=d[k+(j%3)=3][i-1];
      |                   ^
main.c:35:1: error: implicit declaration of function 'prinff'; did you mean 'printf'? [-Wimplicit-function-declaration]
   35 | prinff("%d\n",a%10000);
      | ^~~~~~
      | printf
Language: C

#include<stdio.h>
int main(void)
{
int f[101]={0};
int d[9][101]={0};
int a,b,i,j,k,n,m;
scanf("%d %d",&n,&m);
while(m--){
scanf("%d %d",&a,&b);
f[a]=b;
}
for(i=0;i<9;i++){
d[i][2]=1;
if(f[1] && f[1]-i%3-1){
d[i][2]=0;
}
if(f[2] && f[2]-i/3-1){
d[i][2]=0;
}
}
for(i=3;i<n;i++){
for(j=0;j<9;j++){
if(f[i] && f[i]-1-j/3){
for(k=0;k<3;k++){
if(k==j%3 && j%3==j/3){
d[j][i]+=d[k+(j%3)=3][i-1];
d[j][i]%10000;
}
}
}
}
}
for(i=a=0;i<9;i++){
a+=d[i][n];
}
prinff("%d\n",a%10000);
return 0;
}

Compiler output:
main.c: In function 'main':
main.c:26:19: error: lvalue required as left operand of assignment
   26 | d[j][i]+=d[k+(j%3)=3][i-1];
      |                   ^
main.c:36:1: error: implicit declaration of function 'prinff'; did you mean 'printf'? [-Wimplicit-function-declaration]
   36 | prinff("%d\n",a%10000);
      | ^~~~~~
      | printf
Language: C

include<stdio.h>
#define MOD (10000)
int t[104][6],r[104];
int main(void){
    int n,k;
    int i;
    int a,b;
    int ans;

    scanf("%d%d",&n,&k);
    while(k--){
        scanf("%d%d",&a,&b);
        r[a]=b;
    }

    if(r[1]!=0) t[1][(r[1]-1)*2]=1;
    else t[1][0]=t[1][2]=t[1][4]=1;


    for(i=2;i<=n;i++){
        if(r[i]==0||r[i]==1){
            t[i][0]=(t[i-1][2]+t[i-1][3]+t[i-1][4]+t[i-1][5])%MOD;
            t[i][1]=t[i-1][0];
        }
        if(r[i]==0||r[i]==2){
            t[i][2]=(t[i-1][0]+t[i-1][1]+t[i-1][4]+t[i-1][5])%MOD;
            t[i][3]=t[i-1][2];
        }
        if(r[i]==0||r[i]==3){
            t[i][4]=(t[i-1][0]+t[i-1][1]+t[i-1][2]+t[i-1][3])%MOD;
            t[i][5]=t[i-1][4];
        }
    }

    ans=0;
    ans=(t[n][0]+t[n][1]+t[n][2]+t[n][3]+t[n][4]+t[n][5])%MOD;
    printf("%d\n",ans);

    return 0;
}

Compiler output:
main.c:1:8: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token
    1 | include<stdio.h>
      |        ^
main.c: In function 'main':
main.c:10:5: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
   10 |     scanf("%d%d",&n,&k);
      |     ^~~~~
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
  +++ |+#include <stdio.h>
    1 | include<stdio.h>
main.c:10:5: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
   10 |     scanf("%d%d",&n,&k);
      |     ^~~~~
main.c:10:5: note: include '<stdio.h>' or provide a declaration of 'scanf'
main.c:13:9: error: 'r' undeclared (first use in this function)
   13 |         r[a]=b;
      |         ^
main.c:13:9: note: each undeclared identifier is reported only once for each function it appears in
main.c:16:17: error: 't' undeclared (first use in this function)
   16 |     if(r[1]!=0) t[1][(r[1]-1)*2]=1;
      |                 ^
main.c:37:5: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
   37 |     printf("%d\n",ans);
      |     ^~~~~~
main.c:37:5: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:37:5: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
main.c:37:5: note: include '<stdio.h>' or provide a declaration of 'printf'
Language: C

#include<stdio.h>

#define MOD 10000

int N ,K ;
int plan[ 100 + 1 ][ 4 + 1 ][ 4 + 1 ] ;
int _now[ 100 + 1 ] ;

int Cnt( int day ,int prev ,int now )
{
	if( day == N )
	{
		return 1 ;
	}

	int &next = _now[ day ] ;
	if( next > 0 )
	{
		if( prev == now && now == next )
		{
			return 0 ;
		}
		
		return Cnt( day + 1 ,now ,next ) ;
	}

	int &value = plan[ day ][ prev ][ now ] ;
	if( value > 0 )
	{
		return value ;
	}

	int nex ,cnt = 0 ;
	for( nex = 1 ; nex <= 3 ; ++nex )
	{
		if( prev != now || now != nex )
		{
			cnt = (cnt + Cnt( day + 1 ,now ,nex )) % MOD ;
		}
	}

	return (value = cnt) ;
}


int main( void )
{
	scanf( "%d %d" ,&N ,&K ) ;

	++N ;

	int i ,day ,menu ;
	for( i = 0 ; i < K ; ++i )
	{
		scanf( "%d %d" ,&day ,&menu ) ;

		_now[ day ] = menu ;
	}

	printf( "%d\n" ,Cnt( 1 ,0 ,0 )) ;

	return 0 ;
}


Compiler output:
main.c: In function 'Cnt':
main.c:16:13: error: expected identifier or '(' before '&' token
   16 |         int &next = _now[ day ] ;
      |             ^
main.c:17:13: error: 'next' undeclared (first use in this function)
   17 |         if( next > 0 )
      |             ^~~~
main.c:17:13: note: each undeclared identifier is reported only once for each function it appears in
main.c:27:13: error: expected identifier or '(' before '&' token
   27 |         int &value = plan[ day ][ prev ][ now ] ;
      |             ^
main.c:28:13: error: 'value' undeclared (first use in this function)
   28 |         if( value > 0 )
      |             ^~~~~
Language: C

#include<stdio.h>
#include<windows.h>
#include<errno.h>
#include<stdlib.h>
#include<stddef.h>

#define Iset int i,j,l
#define man 10000
#define cn continue

int pas[101], dt[101][4][4];

int main(){
	int n, k;
	Iset;
	int ans = 0;
	scanf("%d%d", &n, &k);
	for (i = 0; i < k; i++) {
		int a, b;
		scanf("%d%d", &a, &b);
		pas[a] = b;
	}
	dt[0][0][0] = 1;
	for (i = 1; i <= n; i++) {
		if (pas[i] == 0) {
			for (j = 1; j <= 3; j++) {
				for (k = 0; k <= 3; k++) {
					for (l = 0; l <= 3; l++) {
						if (j == k && l == k) cn;
						dt[i][j][k] += dt[i - 1][k][l];
						dt[i][j][k] %= man;
		}}}}
		else {
			for (k = 0; k <= 3; k++) {
				for (l = 0; l <= 3; l++) {
					if (pas[i] == k && l == k)cn;
					dt[i][pas[i]][k] += dt[i - 1][k][l];
					dt[i][pas[i]][k] %= man;
	}}}}
	for (i = 1; i <= 3; i++) {
		for (j = 1; j <= 3; j++) {
			ans += dt[n][i][j];
			ans %= man;
	}}
	printf("%d\n", ans);
	return 0;
}


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

#include <stdio.h>
#include <stdbool.h>

#define H 6
#define W 100

struct AOJ{
	int num;
	int lock;
};
typedef struct AOJ AOJ_0568;

void display00(AOJ_0568 data[][W], int height, int width){
	int i, k;
	for(i=0; i<height; i++){
		for(k=0; k<width; k++){
			printf("%d ", data[i][k].num);
		}
		printf("\n");
	}
	return;
}

int getResult(AOJ_0568 data[][W], int height, int width){
	int i;
	int result = 0;
	for(i=0; i<height; i++){
		result += data[i][width-1]%10000;
	}
	return result%10000;
}


int main(){
	AOJ_0568 data[H][W];
	int n, k;
	int a, b;
	int i, m;
	int result;
	scanf("%d %d", &n, &k);
	for(i=0; i<H; i++){
		if(i%2==0){
			data[i][0].num = 0;
			data[i][0].lock = 1;
		}
		else{
			data[i][0].num = 1;
			data[i][0].lock = 1;
		}
	}
	for(i=0; i<H; i++){
		for(m=1; m<n; m++){
			data[i][m].num = 0;
			data[i][m].lock = 1;
		}
	}
	//display00(data, 6, n);
	//printf("\n\n\n");
	for(i=0; i<k; i++){
		scanf("%d %d", &a, &b);
		if(b==1){
			data[2][a-1].num = 0;
			data[2][a-1].lock = 0;
			data[3][a-1].num = 0;
			data[3][a-1].lock = 0;
			data[4][a-1].num = 0;
			data[4][a-1].lock = 0;
			data[5][a-1].num = 0;
			data[5][a-1].lock = 0;
		}
		else if(b==2){
			data[0][a-1].num = 0;
			data[0][a-1].lock = 0;
			data[1][a-1].num = 0;
			data[1][a-1].lock = 0;
			data[4][a-1].num = 0;
			data[4][a-1].lock = 0;
			data[5][a-1].num = 0;
			data[5][a-1].lock = 0;
		}
		else if(b==3){
			data[0][a-1].num = 0;
			data[0][a-1].lock = 0;
			data[1][a-1].num = 0;
			data[1][a-1].lock = 0;
			data[2][a-1].num = 0;
			data[2][a-1].lock = 0;
			data[3][a-1].num = 0;
			data[3][a-1].lock = 0;
		}
	}
	
	for(m=1; m<n; m++){
		for(i=0; i<H; i++){
			switch(i){
				case 0:
				if(data[i][m].lock){
					data[i][m].num += data[i+1][m-1].num;
				}
				break;
				
				case 1:
				if(data[i][m].lock){
					data[i][m].num += data[i+1][m-1].num;
					data[i][m].num += data[i+2][m-1].num;
					data[i][m].num += data[i+3][m-1].num;
					data[i][m].num += data[i+4][m-1].num;
				}
				break;
				
				case 2:
				if(data[i][m].lock){
					data[i][m].num += data[i+1][m-1].num;
				}
				break;
				
				case 3:
				if(data[i][m].lock){
					data[i][m].num += data[i-3][m-1].num;
					data[i][m].num += data[i-2][m-1].num;
					data[i][m].num += data[i+1][m-1].num;
					data[i][m].num += data[i+2][m-1].num;
				}
				break;
				
				case 4:
				if(data[i][m].lock){
					data[i][m].num += data[i+1][m-1].num;
				}
				break;
				
				case 5:
				if(data[i][m].lock){
					data[i][m].num += data[i-5][m-1].num;
					data[i][m].num += data[i-4][m-1].num;
					data[i][m].num += data[i-3][m-1].num;
					data[i][m].num += data[i-2][m-1].num;
				}
				break;
			}
		}
	}
	
	//display00(data, 6, n);
	
	result = getResult(data, H, n);
	
	printf("%d\n", result);
	
	return 0;
}

Compiler output:
main.c: In function 'getResult':
main.c:28:43: error: invalid operands to binary % (have 'AOJ_0568' {aka 'struct AOJ'} and 'int')
   28 |                 result += data[i][width-1]%10000;
      |                           ~~~~~~~~~~~~~~~~^
      |                                  |
      |                                  AOJ_0568 {aka struct AOJ}
Language: C

#include <stdio.h>

#define H 6
#define W 100

struct AOJ{
	int num;
	int lock;
};
typedef struct AOJ AOJ_0568;

void display00(AOJ_0568 data[][W], int height, int width){
	int i, k;
	for(i=0; i<height; i++){
		for(k=0; k<width; k++){
			printf("%d ", data[i][k].num);
		}
		printf("\n");
	}
	return;
}

int getResult(AOJ_0568 data[][W], int height, int width){
	int i;
	int result = 0;
	for(i=0; i<height; i++){
		result += data[i][width-1]%10000;
	}
	return result%10000;
}


int main(){
	AOJ_0568 data[H][W];
	int n, k;
	int a, b;
	int i, m;
	int result;
	scanf("%d %d", &n, &k);
	for(i=0; i<H; i++){
		if(i%2==0){
			data[i][0].num = 0;
			data[i][0].lock = 1;
		}
		else{
			data[i][0].num = 1;
			data[i][0].lock = 1;
		}
	}
	for(i=0; i<H; i++){
		for(m=1; m<n; m++){
			data[i][m].num = 0;
			data[i][m].lock = 1;
		}
	}
	//display00(data, 6, n);
	//printf("\n\n\n");
	for(i=0; i<k; i++){
		scanf("%d %d", &a, &b);
		if(b==1){
			data[2][a-1].num = 0;
			data[2][a-1].lock = 0;
			data[3][a-1].num = 0;
			data[3][a-1].lock = 0;
			data[4][a-1].num = 0;
			data[4][a-1].lock = 0;
			data[5][a-1].num = 0;
			data[5][a-1].lock = 0;
		}
		else if(b==2){
			data[0][a-1].num = 0;
			data[0][a-1].lock = 0;
			data[1][a-1].num = 0;
			data[1][a-1].lock = 0;
			data[4][a-1].num = 0;
			data[4][a-1].lock = 0;
			data[5][a-1].num = 0;
			data[5][a-1].lock = 0;
		}
		else if(b==3){
			data[0][a-1].num = 0;
			data[0][a-1].lock = 0;
			data[1][a-1].num = 0;
			data[1][a-1].lock = 0;
			data[2][a-1].num = 0;
			data[2][a-1].lock = 0;
			data[3][a-1].num = 0;
			data[3][a-1].lock = 0;
		}
	}
	
	for(m=1; m<n; m++){
		for(i=0; i<H; i++){
			switch(i){
				case 0:
				if(data[i][m].lock){
					data[i][m].num += data[i+1][m-1].num;
				}
				break;
				
				case 1:
				if(data[i][m].lock){
					data[i][m].num += data[i+1][m-1].num;
					data[i][m].num += data[i+2][m-1].num;
					data[i][m].num += data[i+3][m-1].num;
					data[i][m].num += data[i+4][m-1].num;
				}
				break;
				
				case 2:
				if(data[i][m].lock){
					data[i][m].num += data[i+1][m-1].num;
				}
				break;
				
				case 3:
				if(data[i][m].lock){
					data[i][m].num += data[i-3][m-1].num;
					data[i][m].num += data[i-2][m-1].num;
					data[i][m].num += data[i+1][m-1].num;
					data[i][m].num += data[i+2][m-1].num;
				}
				break;
				
				case 4:
				if(data[i][m].lock){
					data[i][m].num += data[i+1][m-1].num;
				}
				break;
				
				case 5:
				if(data[i][m].lock){
					data[i][m].num += data[i-5][m-1].num;
					data[i][m].num += data[i-4][m-1].num;
					data[i][m].num += data[i-3][m-1].num;
					data[i][m].num += data[i-2][m-1].num;
				}
				break;
			}
		}
	}
	
	//display00(data, 6, n);
	
	result = getResult(data, H, n);
	
	printf("%d\n", result);
	
	return 0;
}

Compiler output:
main.c: In function 'getResult':
main.c:27:43: error: invalid operands to binary % (have 'AOJ_0568' {aka 'struct AOJ'} and 'int')
   27 |                 result += data[i][width-1]%10000;
      |                           ~~~~~~~~~~~~~~~~^
      |                                  |
      |                                  AOJ_0568 {aka struct AOJ}
Language: C++

#inlcude<cstdio>
using namespace std;

int d[100], n, k, dp[100][6];
// 0:aa, 1:bb, 2:cc, 3:a, 4:b, 5:c

int main() {
  int a, b;
  scanf("%d%d", &a, &b);
  for (int i = 0; i < n; i++) d[i] = 0;
  for (int i = 0; i < k; i++) scanf("%d%d", &a, &b), d[a-1] = b;
  dp[0][0] = dp[0][1] = dp[0][2] = dp[0][3] = dp[0][4] = dp[0][5] = 0;
  if (d[0] == 0) dp[0][3] = dp[0][4] = dp[0][5] = 1;
  if (d[0] == 1) dp[0][3] = 1;
  if (d[0] == 2) dp[0][4] = 1;
  if (d[0] == 3) dp[0][5] = 1;
  for (int i = 1; i < n; i++) {
    dp[i][0] = dp[i-1][3];
    dp[i][1] = dp[i-1][4];
    dp[i][2] = dp[i-1][5];
    dp[i][3] = dp[i-1][1] + dp[i-1][2];
    dp[i][4] = dp[i-1][0] + dp[i-1][2];
    dp[i][5] = dp[i-1][0] + dp[i-1][1];
    for (int j = 0; j < 6; j++) dp[i][j] = dp[i][j] % 10000;
    if (d[i] == 0) continue;
    if (d[i] == 1) dp[i][1] = dp[i][2] = dp[i][4] = dp[i][5] = 0;
    if (d[i] == 2) dp[i][0] = dp[i][2] = dp[i][3] = dp[i][5] = 0;
    if (d[i] == 3) dp[i][0] = dp[i][1] = dp[i][3] = dp[i][4] = 0;
  }
  int ans = 0;
  for (int j = 0; j < 6; j++) ans += dp[n-1][j];
  printf("%d\n", ans % 10000);
}


Compiler output:
a.cc:1:2: error: invalid preprocessing directive #inlcude; did you mean #include?
    1 | #inlcude<cstdio>
      |  ^~~~~~~
      |  include
a.cc: In function 'int main()':
a.cc:9:3: error: 'scanf' was not declared in this scope
    9 |   scanf("%d%d", &a, &b);
      |   ^~~~~
a.cc:32:3: error: 'printf' was not declared in this scope
   32 |   printf("%d\n", ans % 10000);
      |   ^~~~~~
a.cc:1:1: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
  +++ |+#include <cstdio>
    1 | #inlcude<cstdio>
Language: C++

#include <iostream>
using namespace std;

enum Sauce{NOT_DETERMINED=0, Tomato=1, Cream=2, Basil=3};
enum Seq{SAME, DIFF};

const int divisor = 10000;

class Pasta{
public:
	Pasta(int _N);
	~Pasta();

	static Sauce* sauceary;
	int schedule(int i, Sauce yesterday, Seq seq);

private:
	int N;
	int** memo;
};

Pasta::Pasta(int _N){
	N = _N;
	sauceary = new Sauce[N+1];
	memo = new int*[N+1];

	for (int i = 0; i <= N; i++) sauceary[i] = NOT_DETERMINED;

	for (int i = 0; i <= N; i++){
		memo[i] = new int[4];
		for (int j = 0; j < 4; j++) memo[i][j] = -1;
	}
}

Pasta::~Pasta(){
	delete[] sauceary;
	delete[] memo;
}

int Pasta::schedule(int i, Sauce yesterday, Seq seq){
	if (i == N+1) return 1;
	if (seq == SAME && yesterday == sauceary[i]) return 0;

	if (sauceary[i] == NOT_DETERMINED){
		switch (yesterday){
		case Tomato: 
			if (seq == SAME) return (schedule(i+1, Cream, DIFF) + schedule(i+1, Basil, DIFF)) % divisor;
			else if (seq == DIFF) return (schedule(i+1, Tomato, SAME) + schedule(i+1, Cream, DIFF) + schedule(i+1, Basil, DIFF)) % divisor;
		case Cream:
			if (seq == SAME) return (schedule(i+1, Tomato, DIFF) + schedule(i+1, Basil, DIFF)) % divisor;
			else if (seq == DIFF) return (schedule(i+1, Tomato, DIFF) + schedule(i+1, Cream, SAME) + schedule(i+1, Basil, DIFF)) % divisor;
		case Basil:
			if (seq == SAME) return (schedule(i+1, Tomato, DIFF) + schedule(i+1, Cream, DIFF)) % divisor;
			else if (seq == DIFF) return (schedule(i+1, Tomato, DIFF) + schedule(i+1, Cream, DIFF) + schedule(i+1, Basil, SAME)) % divisor;
		}
	}
	else {
		if (yesterday == sauceary[i]) return schedule(i+1, sauceary[i], SAME) % divisor;
		else return schedule(i+1, sauceary[i], DIFF) % divisor;
	}
}

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

	Pasta* pasta = new Pasta(N);

	for (int i = 0; i < K; i++){
		int A, B;
		cin >> A >> B;
		pasta->sauceary[A] = (Sauce)B;
	}

	int ans;
	if (pasta->sauceary[1] == NOT_DETERMINED){
		ans = pasta->schedule(2, Tomato, DIFF) + pasta->schedule(2, Cream, DIFF) + pasta->schedule(2, Basil, DIFF);
	} else {
		ans = pasta->schedule(2, pasta->sauceary[1], DIFF);
	}

	cout << ans % divisor << endl;

	delete pasta;
	return 0;
}

Compiler output:
a.cc: In member function 'int Pasta::schedule(int, Sauce, Seq)':
a.cc:61:1: warning: control reaches end of non-void function [-Wreturn-type]
   61 | }
      | ^
/usr/bin/ld: /tmp/ccbWW54A.o: warning: relocation against `_ZN5Pasta8saucearyE' in read-only section `.text'
/usr/bin/ld: /tmp/ccbWW54A.o: in function `Pasta::Pasta(int)':
a.cc:(.text+0x42): undefined reference to `Pasta::sauceary'
/usr/bin/ld: a.cc:(.text+0x8f): undefined reference to `Pasta::sauceary'
/usr/bin/ld: /tmp/ccbWW54A.o: in function `Pasta::~Pasta()':
a.cc:(.text+0x145): undefined reference to `Pasta::sauceary'
/usr/bin/ld: a.cc:(.text+0x151): undefined reference to `Pasta::sauceary'
/usr/bin/ld: /tmp/ccbWW54A.o: in function `Pasta::schedule(int, Sauce, Seq)':
a.cc:(.text+0x1b5): undefined reference to `Pasta::sauceary'
/usr/bin/ld: /tmp/ccbWW54A.o:a.cc:(.text+0x1da): more undefined references to `Pasta::sauceary' follow
/usr/bin/ld: warning: creating DT_TEXTREL in a PIE
collect2: error: ld returned 1 exit status
Language: C++

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

int main(){
	int N,K,A,B[101];
	int dp[101][7]={},ans=0;
	memset(B,-1,sizeof(B));
	cin>>N>>K;
	for(int i=0;i<K;i++){
		cin>>A;
		cin>>B[A];
	}

	dp[0][0]=1;
	for(int i=0;i<N;i++){
		for(int j=0;j<=6;j++){
			//printf("%d ",dp[i][j]);
			if(B[i]!=-1 && (j!=B[i] && j!=B[i]+3)) continue;
			else{
				for(int k=1;k<=3;k++){
					if(j-3==k) continue;
					else if(j==k) dp[i+1][j+3] += dp[i][j];
					else dp[i+1][k] += dp[i][j];
				}
			}
		}//puts("");
	}
	for(int i=0;i<=6;i++){
		//printf("%d ",dp[N][i]);
		ans += dp[N][i];
	}//puts("");
	printf("%d\n",ans);
	return 0;
}

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

	cin>>n>>k;
	for(int i=0;i<k;i++){
		int a,b;
		cin>>a>>b;
		if(b==1)dp[a][2]=INF,dp[a][3]=INF;
		if(b==2)dp[a][1]=INF,dp[a][3]=INF;
		if(b==3)dp[a][1]=INF,dp[a][2]=INF;
	}
	for(int i=1;i<=3;i++)if(dp[1][i]!=INF)dp[1][i]=1;
	
	for(int i=1;i<=n;i++){
		for(int j=1;j<=3;j++){
			if(dp[i+1][j]!=INF){
				for(int k=1;k<=3;k++){
					if(dp[i][k]!=INF){
						if(j==k&&i+1>=3&&dp[i-1][k]!=INF){
						dp[i+1][j]=(dp[i+1][k]+dp[i][k]-dp[i-1][k])%10000;
						}
						else dp[i+1][j]+=(dp[i][k])%10000;
					}
				}
			}
		}
	}
	
//	REP(i,n+1){
	//for(int j=1;j<=3;j++)cout<<dp[i][j]<<" ";
//	cout<<endl;
//	}
	int ans=0;
	for(int i=1;i<=3;i++)ans+=dp[n][i];
	cout<<ans%10000<<endl;
	return 0;
}

Compiler output:
a.cc:1:9: error: 'cin' does not name a type
    1 |         cin>>n>>k;
      |         ^~~
a.cc:2:9: error: expected unqualified-id before 'for'
    2 |         for(int i=0;i<k;i++){
      |         ^~~
a.cc:2:21: error: 'i' does not name a type
    2 |         for(int i=0;i<k;i++){
      |                     ^
a.cc:2:25: error: 'i' does not name a type
    2 |         for(int i=0;i<k;i++){
      |                         ^
a.cc:9:9: error: expected unqualified-id before 'for'
    9 |         for(int i=1;i<=3;i++)if(dp[1][i]!=INF)dp[1][i]=1;
      |         ^~~
a.cc:9:21: error: 'i' does not name a type
    9 |         for(int i=1;i<=3;i++)if(dp[1][i]!=INF)dp[1][i]=1;
      |                     ^
a.cc:9:26: error: 'i' does not name a type
    9 |         for(int i=1;i<=3;i++)if(dp[1][i]!=INF)dp[1][i]=1;
      |                          ^
a.cc:11:9: error: expected unqualified-id before 'for'
   11 |         for(int i=1;i<=n;i++){
      |         ^~~
a.cc:11:21: error: 'i' does not name a type
   11 |         for(int i=1;i<=n;i++){
      |                     ^
a.cc:11:26: error: 'i' does not name a type
   11 |         for(int i=1;i<=n;i++){
      |                          ^
a.cc:31:9: error: expected unqualified-id before 'for'
   31 |         for(int i=1;i<=3;i++)ans+=dp[n][i];
      |         ^~~
a.cc:31:21: error: 'i' does not name a type
   31 |         for(int i=1;i<=3;i++)ans+=dp[n][i];
      |                     ^
a.cc:31:26: error: 'i' does not name a type
   31 |         for(int i=1;i<=3;i++)ans+=dp[n][i];
      |                          ^
a.cc:32:9: error: 'cout' does not name a type
   32 |         cout<<ans%10000<<endl;
      |         ^~~~
a.cc:33:9: error: expected unqualified-id before 'return'
   33 |         return 0;
      |         ^~~~~~
a.cc:34:1: error: expected declaration before '}' token
   34 | }
      | ^
Language: C++

#include<iostream>

using namespace std;

int n,m;
const int mod=10000;
int yotei[101];
int dp[101][3][3]={};	

int pasta(int day,int tdby,int y){//日日　おととい　昨日
	if(dp[day][tdby][y]!=0)return dp[day][tdby][y];
	if(day==n+1)return 1;
	if(yotei[day]!=-1){
		if(tdby==y&&y==yotei[day]){
			return 0;
		}else {
			return dp[day][tdby][y]=pasta(day+1,y,yotei[day])%mod;
		}
	}else {
		int ans=0;
		for(int k=1;k<=3;k++){
			if(tdby!=k||y!=k){
				ans+=pasta(day+1,y,k)%mod;
			}
		}
		return dp[day][tdby][y]=ans%mod;
	}
}
//dayは１から　便宜上
int main(){
	memset(yotei,-1,sizeof(yotei));
	cin>>n>>m;
	for(int i=1;i<=m;i++){
		int a;
		cin>>a;
		cin>>yotei[a];
	}
	cout<<pasta(1,0,0)<<endl;
	return 0;
}

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

import Control.Monad
import Control.Applicative
import Data.List

main = do
	[n, k] <- map (read :: String -> Int) . words <$> getLine
	l <- map (map (read :: String -> Int) . words) <$> replicateM k getLine
	print $ solve n l

func :: Int -> [[Int]] -> [(Int, Int)]
func n [] = [(x, -1) | x <- [1..n]]
func n ([a, b]:c) = map (\(x, y) -> if x == a then (x, b) else (x, y)) $ func n c

foldw :: [Int] -> Int
foldw [] = 0
foldw a = foldl1 (+) a

solvew :: Int -> Int -> [Int] -> Int
solvew _ _ [] = 1
solvew a b (c:d)
	| a == b = (foldw [solvew x a d | x <- [1..3], x /= a, x == c || c == -1]) `mod` 10000
	| otherwise = (foldw [solvew x a d | x <- [1..3], x == c || c == -1]) `mod` 10000

solve :: Int -> [[Int]] -> Int
solve n l = solvew (-2) (-2) $ map (\(x, y) -> y) $ func n l

Compiler output:
a.cc:11:30: error: too many decimal points in number
   11 | func n [] = [(x, -1) | x <- [1..n]]
      |                              ^~~~
a.cc:12:26: error: stray '\' in program
   12 | func n ([a, b]:c) = map (\(x, y) -> if x == a then (x, b) else (x, y)) $ func n c
      |                          ^
a.cc:21:49: error: too many decimal points in number
   21 |         | a == b = (foldw [solvew x a d | x <- [1..3], x /= a, x == c || c == -1]) `mod` 10000
      |                                                 ^~~~
a.cc:21:84: error: stray '`' in program
   21 |         | a == b = (foldw [solvew x a d | x <- [1..3], x /= a, x == c || c == -1]) `mod` 10000
      |                                                                                    ^
a.cc:21:88: error: stray '`' in program
   21 |         | a == b = (foldw [solvew x a d | x <- [1..3], x /= a, x == c || c == -1]) `mod` 10000
      |                                                                                        ^
a.cc:22:52: error: too many decimal points in number
   22 |         | otherwise = (foldw [solvew x a d | x <- [1..3], x == c || c == -1]) `mod` 10000
      |                                                    ^~~~
a.cc:22:79: error: stray '`' in program
   22 |         | otherwise = (foldw [solvew x a d | x <- [1..3], x == c || c == -1]) `mod` 10000
      |                                                                               ^
a.cc:22:83: error: stray '`' in program
   22 |         | otherwise = (foldw [solvew x a d | x <- [1..3], x == c || c == -1]) `mod` 10000
      |                                                                                   ^
a.cc:25:37: error: stray '\' in program
   25 | solve n l = solvew (-2) (-2) $ map (\(x, y) -> y) $ func n l
      |                                     ^
a.cc:1:1: error: 'import' does not name a type
    1 | import Control.Monad
      | ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
Language: C++

#include<iostream>
#include<map>
using namespace std;
typedef long long int ll;
ll dfs(int day,int r1,int r2);
ll dp[101][4][4],n,k;
map<int,int> plan;
int main(){
	cin >> n >> k;
	for(int i=0;i<k;i++){
		int a,b; cin >> a >> b;
		a--; plan[a] = b;
	}
	memset(dp,-1,sizeof(dp));
	cout << dfs(0,0,0)%10000 << endl;
}

ll dfs(int day,int r1,int r2){
	if(day==n) return 1;
	if(dp[day][r1][r2] != -1) return dp[day][r1][r2];
	if(plan[day] != 0){
		if(r1 == r2 && r1 == plan[day]) return 0;
		else return dfs(day+1,plan[day],r1);
	}
	ll ret = 0;
	for(int i=1;i<=3;i++){
		if(r1 == r2 && r1 == i) continue;
		ret += dfs(day+1,i,r1);
	}
	return dp[day][r1][r2] = ret;
}

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

#include <iostream>
using namespace std;

int main() {
	int n, k, l, m;
	cin >> n >> k;
	int krsw[101][3] = {};
	int a[100] = {} ;
	for(int i = 0; i < k; i++) {
		cin >> l >> m;
		a[l] = m;
	}
	if(a[1]) krsw[1][a[1]] = 1;
	else { krsw[1][1] = 1; krsw[1][2] = 1; krsw[1][3] = 1; }
	for(int hi = 2; hi <= n; hi++) {
		if(a[hi]) {
			krsw[hi][a[hi]] = krsw[hi - 1][1] + krsw[hi - 1][2] + krsw[hi - 1][3];
			if(krsw[hi - 1][a[hi]] > 0 && krsw[hi - 2][a[hi]] > 0) {
				krsw[hi][a[hi]] -= krsw[hi - 2][a[hi]];
				krsw[hi - 1][a[hi]] -= krsw[hi - 2][a[hi]];	
			if(a[hi - 2]) {
				krsw[hi][a[hi - 2]] = 0;
				krsw[hi - 1][a[hi - 2]] = 0;
			}
			if(krsw[hi][a[hi]]>10000)krsw[hi][a[hi]] %= 10000;
		}
		else
			for(int i = 1; i <= 3; i++) {
				krsw[hi][i] = krsw[hi - 1][1] + krsw[hi - 1][2] + krsw[hi - 1][3];
				if(krsw[hi - 1][i] > 0 && krsw[hi - 2][i] > 0) {
					krsw[hi][i] -= krsw[hi - 2][i];
					krsw[hi - 1][i] -= krsw[hi - 2][i];
				}
				if(a[hi - 2]) {
					krsw[hi][a[hi - 2]] = 0;
					krsw[hi - 1][a[hi - 2]] = 0;
				}
			}
				if(krsw[hi][i]>10000)krsw[hi][i] %= 10000;
			}
	}
	cout << (krsw[n][1] + krsw[n][2] + krsw[n][3]) % 10000 << endl;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:39:45: error: 'i' was not declared in this scope; did you mean 'hi'?
   39 |                                 if(krsw[hi][i]>10000)krsw[hi][i] %= 10000;
      |                                             ^
      |                                             hi
Language: C++

#include "bits/stdc++.h"
#include<unordered_map>
#include<unordered_set>
#pragma warning(disable:4996)
using namespace std;
using ld = long double;
template<class T>
using Table = vector<vector<T>>;


int main() {
	int N, K; cin >> N >> K;
	vector<int>dis(N);
	for (int i = 0; i < K; ++i) {
		int a, b; cin >> a >> b; a--;
		dis[a] = b;

	}
	int dp[200][4][4];
	memset(dp, 0, sizeof(dp));
	dp[0][0][0] = 1;
	for (int day = 0; day <N; ++day) {
		for (int prepre = 0; prepre <= 3; ++prepre) {
			for (int pre = 0; pre <= 3; ++pre) {
				for (int now = 1; now <= 3; now++)
				{
					if (dis[day] && dis[day] != now)continue;
					else {
						if (prepre == pre&&pre == now)continue;
						dp[day + 1][pre][now] += dp[day][prepre][pre];
						dp[day + 1][pre][now] %= 10000;
					}
			
	long long int ans = 0;
	for (int i = 0; i < 4; ++i) {
		for (int j = 0; j < 4; ++j) {
			ans += dp[N][i][j];
		}
	}
	cout << ans%10000 << endl;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:42:2: error: expected '}' at end of input
   42 | }
      |  ^
a.cc:24:60: note: to match this '{'
   24 |                         for (int pre = 0; pre <= 3; ++pre) {
      |                                                            ^
a.cc:42:2: error: expected '}' at end of input
   42 | }
      |  ^
a.cc:23:61: note: to match this '{'
   23 |                 for (int prepre = 0; prepre <= 3; ++prepre) {
      |                                                             ^
a.cc:42:2: error: expected '}' at end of input
   42 | }
      |  ^
a.cc:22:42: note: to match this '{'
   22 |         for (int day = 0; day <N; ++day) {
      |                                          ^
a.cc:42:2: error: expected '}' at end of input
   42 | }
      |  ^
a.cc:11:12: note: to match this '{'
   11 | int main() {
      |            ^
Language: C++

#include <iostream>
#define rep(i,n) for(int i = 0; i < n; i++)
using namespace std;
テつ?
int dp[3][110][2], num[110];
int n,k;
テつ?
int main(){
テつ?つ?つ?つ?ep(i,110) num[i] = -1;
テつ?つ?つ?つ?in >> n >> k;
テつ?つ?つ?つ?ep(i,k){
テつ?つ?つ?つ?つ?つ?つ?つ?nt a,b;
テつ?つ?つ?つ?つ?つ?つ?つ?in >> a >> b;
テつ?つ?つ?つ?つ?つ?つ?つ?--; b--;
テつ?つ?つ?つ?つ?つ?つ?つ?um[a] = b;
テつ?つ?つ?つ?
テつ?つ?つ?つ?f(num[0] == -1) rep(i,3) dp[i][0][0] = 1;
テつ?つ?つ?つ?lse dp[num[0]][0][0] = 1;
テつ?つ?つ?つ?or(int i = 1; i < n; i++){
テつ?つ?つ?つ?つ?つ?つ?つ?ep(j,3){
テつ?つ?つ?つ?つ?つ?つ?つ?つ?つ?つ?つ?f(num[i] != -1 && num[i] != j) continue;
テつ?つ?つ?つ?つ?つ?つ?つ?つ?つ?つ?つ?p[j][i][1] += dp[j][i-1][0];
テつ?つ?つ?つ?つ?つ?つ?つ?つ?つ?つ?つ?p[j][i][1] %= 10000;
テつ?つ?つ?つ?つ?つ?つ?つ?つ?つ?つ?つ?ep(u,3){
テつ?つ?つ?つ?つ?つ?つ?つ?つ?つ?つ?つ?つ?つ?つ?つ?f(j == u) continue;
テつ?つ?つ?つ?つ?つ?つ?つ?つ?つ?つ?つ?つ?つ?つ?つ?p[j][i][0] += dp[u][i-1][0]+dp[u][i-1][1];
テつ?つ?つ?つ?つ?つ?つ?つ?つ?つ?つ?つ?つ?つ?つ?つ?p[j][i][0] %= 10000;
テつ?つ?つ?つ?つ?つ?つ?つ?つ?つ?つ?つ?
テつ?つ?つ?つ?つ?つ?つ?つ?
テつ?つ?つ?つ?
テつ?つ?つ?つ?つ?つ?つ?つ?*
テつ?つ?つ?つ?ep(i,n){
テつ?つ?つ?つ?つ?つ?つ?つ?ep(j,3){
テつ?つ?つ?つ?つ?つ?つ?つ?つ?つ?つ?つ?ep(u,2){
テつ?つ?つ?つ?つ?つ?つ?つ?つ?つ?つ?つ?つ?つ?つ?つ?out << dp[j][i][u] << " ";
テつ?つ?つ?つ?つ?つ?つ?つ?つ?つ?つ?つ?
テつ?つ?つ?つ?つ?つ?つ?つ?つ?つ?つ?つ?out << endl;
テつ?つ?つ?つ?つ?つ?つ?つ?
テつ?つ?つ?つ?つ?つ?つ?つ?out << endl;
テつ?つ?つ?つ?
テつ?つ?つ?つ?/
テつ?つ?つ?つ?nt ans = 0;
テつ?つ?つ?つ?ep(i,3) rep(j,2) ans += dp[i][n-1][j];
テつ?つ?つ?つ?out << ans%10000 << endl;
}

Compiler output:
a.cc:4:1: error: '\U000030c6\U00003064' does not name a type
    4 | テつ?
      | ^~~~
a.cc:7:1: error: '\U000030c6\U00003064' does not name a type
    7 | テつ?
      | ^~~~
Language: C++

#include<cstdio>
#include<functional>
#include<algorithm>
#include<iostream>
#include<cstring>
#include<string>
#include<cstdlib>
#include<cctype>
#include<queue>
#define MM
#define rep(i,a) for(int i=0;i<a;i++)
#define rep2(i,a) for(int i=1;i<=a;i++)
#define rep3(i,a) for(int i=1;i<a;i++)
#define rep4(i,a) for(int i=0;i<=a;i++)
using namespace std;
int dp[101][4][4];
long long int sum;
int main(void)
{
	int x,y;
	int day,al,sosu[101]={MM};
	cin>>day>>al;
	rep(i,al) {cin>>x>>y;sosu[x]=y;}
	dp[MM][MM][MM]=1;
	rep2(i,day)rep(j,4)rep(k,4)rep3(kk,4) {
		if((j!=k||k!=kk)&&(sosu[i]==MM||sosu[i]==kk)) {
            dp[i][k][kk]+=dp[i-1][j][k];
            dp[i][k][kk]%=10000;
		}
	}
	sum=0;
	rep2(i,3)rep4(j,3) sum+=dp[day][i][j];
	cout<<sum%10000<<endl;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:24:14: error: expected primary-expression before ']' token
   24 |         dp[MM][MM][MM]=1;
      |              ^
a.cc:24:18: error: expected primary-expression before ']' token
   24 |         dp[MM][MM][MM]=1;
      |                  ^
a.cc:24:22: error: expected primary-expression before ']' token
   24 |         dp[MM][MM][MM]=1;
      |                      ^
a.cc:26:47: error: expected primary-expression before '||' token
   26 |                 if((j!=k||k!=kk)&&(sosu[i]==MM||sosu[i]==kk)) {
      |                                               ^~