CodeGraderBench/CodeGraderBench huggingface dataset:
Problem: In this problem, you need to check if a given finite sequence appears as a sub-sequence in the Fibonacci sequence. A finite sequence is said to be a Fibonacci sub-sequence if it is contained in the Fibonacci sequence in the same relative order but not necessarily consecutively. 
For example, the finite sequence 2, 5, 8 is a Fibonacci sub-sequence.  But 2, 8, 5 is not. Write a C++ program to accept an integer M followed by a finite sequence of M numbers. Your task is to determine if this finite sequence is a Fibonacci sub-sequence. You should output the following:
●	true or false
○	true: if the given finite sequence is a Fibonacci sub-sequence. E.g. on inputs “3 3 8 13”  and “3 3 5 8”
○	false  otherwise
Input Format An integer M followed by M integers

Assumptions on Input
●	Assume that the integer M will be between 1 and 19, both inclusive 
●	Assume that the sub-sequence numbers will be between 0 and 5000, both inclusive

Student submission:
#include<simplecpp>
int main(){
    int n;
    cin>>n;
    bool main=true;
    for(int i=0;i<n;i++){
        int x;
        cin>>x;
        bool check=false;
        int pp=0,p=1;
        for(int i=0;i<100;i++){
            int pre=p+pp;
            if(pre==x || x==0){
                check=true;
                break;
            }
            pp=p;
            p=pre;
            
        }
        main=main &check;
    }
        if(main==true){
            cout<<"true";

        }
        if(main==false){
            cout<<"false";
        }
    }

Grading criterion: Output
Rating A: correctly prints the output
Rating B: Some issue
Rating C: Major issue
Rating D: 0
Assigned grade: B
Problem: In this problem, you need to check if a given finite sequence appears as a sub-sequence in the Fibonacci sequence. A finite sequence is said to be a Fibonacci sub-sequence if it is contained in the Fibonacci sequence in the same relative order but not necessarily consecutively. 
For example, the finite sequence 2, 5, 8 is a Fibonacci sub-sequence.  But 2, 8, 5 is not. Write a C++ program to accept an integer M followed by a finite sequence of M numbers. Your task is to determine if this finite sequence is a Fibonacci sub-sequence. You should output the following:
●	true or false
○	true: if the given finite sequence is a Fibonacci sub-sequence. E.g. on inputs “3 3 8 13”  and “3 3 5 8”
○	false  otherwise
Input Format An integer M followed by M integers

Assumptions on Input
●	Assume that the integer M will be between 1 and 19, both inclusive 
●	Assume that the sub-sequence numbers will be between 0 and 5000, both inclusive

Student submission:
#include <iostream>

using namespace std;

int main(){

    int M = 0 ;

    cin >> M ;

    int n[M] ;

    for(int it = 0 ; it < M ; it ++){

        cin >> n[it];

    }

    int x = 0 ;
    int y = 1 ;

    int count = 0 ;

    if( n[count] == 0 ) count++;
    if( n[count] == 1 ) count++;

    while( y < 5001){

        y = x + y ;
        x = y - x ;

        if( n[count] == y ) count++ ;

        if(count == M){

            cout << "true" ;
            break;

        }

    }

    if(count != M){

            cout << "false" ;

        }

}

Grading criterion: Output
Rating A: correctly prints the output
Rating B: Some issue
Rating C: Major issue
Rating D: 0
Assigned grade: A
Problem: In this problem, you need to check if a given finite sequence appears as a sub-sequence in the Fibonacci sequence. A finite sequence is said to be a Fibonacci sub-sequence if it is contained in the Fibonacci sequence in the same relative order but not necessarily consecutively. 
For example, the finite sequence 2, 5, 8 is a Fibonacci sub-sequence.  But 2, 8, 5 is not. Write a C++ program to accept an integer M followed by a finite sequence of M numbers. Your task is to determine if this finite sequence is a Fibonacci sub-sequence. You should output the following:
●	true or false
○	true: if the given finite sequence is a Fibonacci sub-sequence. E.g. on inputs “3 3 8 13”  and “3 3 5 8”
○	false  otherwise
Input Format An integer M followed by M integers

Assumptions on Input
●	Assume that the integer M will be between 1 and 19, both inclusive 
●	Assume that the sub-sequence numbers will be between 0 and 5000, both inclusive

Student submission:
#include<simplecpp>
int F(int n){
    for(int n=0;n<=50;n++)
    if (n==0)
    return 0;
    if(n==1)
    return 1;
    if(n>=2){
        F(n)=F(n-1)+F(n-2);
        return F(n);
    }
}main_program{
int M;
cin>>M;
int x;
while(M!=0){
    cin>>x;
    M=M-1;
}
}

Grading criterion: Output
Rating A: correctly prints the output
Rating B: Some issue
Rating C: Major issue
Rating D: 0
Assigned grade: C
Problem: In this problem, you need to check if a given finite sequence appears as a sub-sequence in the Fibonacci sequence. A finite sequence is said to be a Fibonacci sub-sequence if it is contained in the Fibonacci sequence in the same relative order but not necessarily consecutively. 
For example, the finite sequence 2, 5, 8 is a Fibonacci sub-sequence.  But 2, 8, 5 is not. Write a C++ program to accept an integer M followed by a finite sequence of M numbers. Your task is to determine if this finite sequence is a Fibonacci sub-sequence. You should output the following:
●	true or false
○	true: if the given finite sequence is a Fibonacci sub-sequence. E.g. on inputs “3 3 8 13”  and “3 3 5 8”
○	false  otherwise
Input Format An integer M followed by M integers

Assumptions on Input
●	Assume that the integer M will be between 1 and 19, both inclusive 
●	Assume that the sub-sequence numbers will be between 0 and 5000, both inclusive

Student submission:
#include <iostream>
using namespace std;

bool fib(int x){
	static int y=0, z=1;
    for(;z<x;){
        z += y;
        y = z - y;
    }
	return z==x ? true:false;
}

int main(){
	int m, x;
	bool sub=true;
	cin >> m >> x;
	if(fib(x)|| x==1){
		for(int i=1; i<m; i++){
			cin >> x;
			if(!fib(x)){
			sub = false;
			break;
			}
		}
	}
	(sub ?  cout << "true" : cout << "false");
}

Grading criterion: Output
Rating A: correctly prints the output
Rating B: Some issue
Rating C: Major issue
Rating D: 0
Assigned grade: A
Problem: In this problem, you need to check if a given finite sequence appears as a sub-sequence in the Fibonacci sequence. A finite sequence is said to be a Fibonacci sub-sequence if it is contained in the Fibonacci sequence in the same relative order but not necessarily consecutively. 
For example, the finite sequence 2, 5, 8 is a Fibonacci sub-sequence.  But 2, 8, 5 is not. Write a C++ program to accept an integer M followed by a finite sequence of M numbers. Your task is to determine if this finite sequence is a Fibonacci sub-sequence. You should output the following:
●	true or false
○	true: if the given finite sequence is a Fibonacci sub-sequence. E.g. on inputs “3 3 8 13”  and “3 3 5 8”
○	false  otherwise
Input Format An integer M followed by M integers

Assumptions on Input
●	Assume that the integer M will be between 1 and 19, both inclusive 
●	Assume that the sub-sequence numbers will be between 0 and 5000, both inclusive

Student submission:
#include<simplecpp>
main_program{
	int m;
	cin>>m;
	int a;
	bool fib=true;
	int a1,a2=1,a3=0,x;
	for(int i=1;i<=m;i++){
		cin>>a;
		while(true){
			x=a3;
			a1=a2+a3;
			a3=a2;a2=a1;
			if(a==x)break;
			else if(a<x){
				fib=false;
				break;
				break;
			}
		}
	}
	if(fib)cout<<"true";
	else cout<<"false";
}

Grading criterion: Output
Rating A: correctly prints the output
Rating B: Some issue
Rating C: Major issue
Rating D: 0
Assigned grade: A
Problem: In this problem, you need to check if a given finite sequence appears as a sub-sequence in the Fibonacci sequence. A finite sequence is said to be a Fibonacci sub-sequence if it is contained in the Fibonacci sequence in the same relative order but not necessarily consecutively. 
For example, the finite sequence 2, 5, 8 is a Fibonacci sub-sequence.  But 2, 8, 5 is not. Write a C++ program to accept an integer M followed by a finite sequence of M numbers. Your task is to determine if this finite sequence is a Fibonacci sub-sequence. You should output the following:
●	true or false
○	true: if the given finite sequence is a Fibonacci sub-sequence. E.g. on inputs “3 3 8 13”  and “3 3 5 8”
○	false  otherwise
Input Format An integer M followed by M integers

Assumptions on Input
●	Assume that the integer M will be between 1 and 19, both inclusive 
●	Assume that the sub-sequence numbers will be between 0 and 5000, both inclusive

Student submission:
#include<iostream>
using namespace std;
int fib(int n)
{
    int ans;
    if(n==0) return 0;
    else if(n==1) return 1;
    else
    {
        ans=fib(n-1) + fib(n-2);
        return ans;
    }
}
bool fibcheck(int n)
{
    for(int i=0;i<30;i++)
    {
        if(n==fib(i)) return true; 
    }
    return false;
}
int main()
{
    int M,inp;
    static int c=0;
    cin >> M;
    for(int a=0;a<M;a++)
    {
        cin >> inp;
        if(fibcheck(inp)) c++;
    }
    if(c==M) cout << "true";
    else cout << "false";
    return 0; 
}

Grading criterion: Output
Rating A: correctly prints the output
Rating B: Some issue
Rating C: Major issue
Rating D: 0
Assigned grade: A
Problem: In this problem, you need to check if a given finite sequence appears as a sub-sequence in the Fibonacci sequence. A finite sequence is said to be a Fibonacci sub-sequence if it is contained in the Fibonacci sequence in the same relative order but not necessarily consecutively. 
For example, the finite sequence 2, 5, 8 is a Fibonacci sub-sequence.  But 2, 8, 5 is not. Write a C++ program to accept an integer M followed by a finite sequence of M numbers. Your task is to determine if this finite sequence is a Fibonacci sub-sequence. You should output the following:
●	true or false
○	true: if the given finite sequence is a Fibonacci sub-sequence. E.g. on inputs “3 3 8 13”  and “3 3 5 8”
○	false  otherwise
Input Format An integer M followed by M integers

Assumptions on Input
●	Assume that the integer M will be between 1 and 19, both inclusive 
●	Assume that the sub-sequence numbers will be between 0 and 5000, both inclusive

Student submission:
#include <simplecpp>

main_program {
    int M; cin >> M; int x; bool fibonacci=true;
    int a=-1, b=1, c=0; //They are 'like' F(-1)=1 and F(-2)=-1 by extending the sequence backwards

    cin >> x;
    while (c<x){         // find a number in fibonacci >= x (first of M integers)
        a=b; b=c; c=a+b; // construction of fibonacci
    }

    if (c!=x) fibonacci=false; // if x isn't present in fibonacci
    else {
        if (M>1&&x==1) {
            cin >> x;
            a=b; b=c; c=a+b;
            if (x==2) {a=b; b=c; c=a+b;}
            if (c!=x) {fibonacci=false;}
        
            for (int i=2; i<M; i++){ // now we have found where the fibonacci is starting, so we construct the elemnets ahead and match them one-by-one with inputs
            cin >> x;
            a=b; b=c; c=a+b;
            if (c!=x) {fibonacci=false; break;}
            }
        }  
        else {for (int i=1; i<M; i++){ // now we have found where the fibonacci is starting, so we construct the elemnets ahead and match them one-by-one with inputs
            cin >> x;
            a=b; b=c; c=a+b;
            if (c!=x) {fibonacci=false; break;}
            }} 
    }

    cout << (fibonacci?"true":"false");
}

Grading criterion: Output
Rating A: correctly prints the output
Rating B: Some issue
Rating C: Major issue
Rating D: 0
Assigned grade: A
Problem: In this problem, you need to check if a given finite sequence appears as a sub-sequence in the Fibonacci sequence. A finite sequence is said to be a Fibonacci sub-sequence if it is contained in the Fibonacci sequence in the same relative order but not necessarily consecutively. 
For example, the finite sequence 2, 5, 8 is a Fibonacci sub-sequence.  But 2, 8, 5 is not. Write a C++ program to accept an integer M followed by a finite sequence of M numbers. Your task is to determine if this finite sequence is a Fibonacci sub-sequence. You should output the following:
●	true or false
○	true: if the given finite sequence is a Fibonacci sub-sequence. E.g. on inputs “3 3 8 13”  and “3 3 5 8”
○	false  otherwise
Input Format An integer M followed by M integers

Assumptions on Input
●	Assume that the integer M will be between 1 and 19, both inclusive 
●	Assume that the sub-sequence numbers will be between 0 and 5000, both inclusive

Student submission:
#include <simplecpp>

main_program{
    int M;
    cin >> M;
    bool flag;
    int c,a = 0,b = 1,check = 0;
    for(int i = 0;i<M;i++){
        cin >> c;
        while(1){
            flag = false;
            if(c == a){
                flag = true;
            }
            b = a+b;
            a = b-a;
            if(flag) break;
            if(a > 5000) break;
        }
        if(a > 5000) break;
        check++;
    }
    if(check == M) cout << "true";
    else cout << "false";
}

Grading criterion: Output
Rating A: correctly prints the output
Rating B: Some issue
Rating C: Major issue
Rating D: 0
Assigned grade: A
Problem: In this problem, you need to check if a given finite sequence appears as a sub-sequence in the Fibonacci sequence. A finite sequence is said to be a Fibonacci sub-sequence if it is contained in the Fibonacci sequence in the same relative order but not necessarily consecutively. 
For example, the finite sequence 2, 5, 8 is a Fibonacci sub-sequence.  But 2, 8, 5 is not. Write a C++ program to accept an integer M followed by a finite sequence of M numbers. Your task is to determine if this finite sequence is a Fibonacci sub-sequence. You should output the following:
●	true or false
○	true: if the given finite sequence is a Fibonacci sub-sequence. E.g. on inputs “3 3 8 13”  and “3 3 5 8”
○	false  otherwise
Input Format An integer M followed by M integers

Assumptions on Input
●	Assume that the integer M will be between 1 and 19, both inclusive 
●	Assume that the sub-sequence numbers will be between 0 and 5000, both inclusive

Student submission:
#include<simplecpp>
main_program {
	int M,n,n1=0,r=0,m=0;
	cin>>M;
	for( ;r<M;r++) {
		cin>>n;m=0;
		if(n>=n1 || n==0) {
			int x=0,y=1,z=0;
			for( ;z<=5000; ) {
				z=x+y;
				x=y;y=z;
				if(n==z) { m=1;break;}
			}
			if(m==0) { cout<<"false";n1=n;break;}
            n1=n;
		}
		if(n<n1) {cout<<"false";break;}
	}
    if(n==1) cout<< "false";
	if(m==1 && n>1) cout<<"true";
}

Grading criterion: Output
Rating A: correctly prints the output
Rating B: Some issue
Rating C: Major issue
Rating D: 0
Assigned grade: A
Problem: In this problem, you need to check if a given finite sequence appears as a sub-sequence in the Fibonacci sequence. A finite sequence is said to be a Fibonacci sub-sequence if it is contained in the Fibonacci sequence in the same relative order but not necessarily consecutively. 
For example, the finite sequence 2, 5, 8 is a Fibonacci sub-sequence.  But 2, 8, 5 is not. Write a C++ program to accept an integer M followed by a finite sequence of M numbers. Your task is to determine if this finite sequence is a Fibonacci sub-sequence. You should output the following:
●	true or false
○	true: if the given finite sequence is a Fibonacci sub-sequence. E.g. on inputs “3 3 8 13”  and “3 3 5 8”
○	false  otherwise
Input Format An integer M followed by M integers

Assumptions on Input
●	Assume that the integer M will be between 1 and 19, both inclusive 
●	Assume that the sub-sequence numbers will be between 0 and 5000, both inclusive

Student submission:
#include<simplecpp>
main_program{
    int M;
    cin>>M;
int x=0,y=1;
int f(int n){
 for(int i=0;i<n;i++){
    int z= x+y;
    int temp=y;
    y=z;
    x=y;
    }
    if(n==0){
        return 0;
    } if(n==1){
        return 1;
    }
 return z;
}
if(f(n)=f(n-1)+f(n-2)){
    cout<<"true";
}


 }

Grading criterion: Output
Rating A: correctly prints the output
Rating B: Some issue
Rating C: Major issue
Rating D: 0
Assigned grade: B
Problem: In this problem, you need to check if a given finite sequence appears as a sub-sequence in the Fibonacci sequence. A finite sequence is said to be a Fibonacci sub-sequence if it is contained in the Fibonacci sequence in the same relative order but not necessarily consecutively. 
For example, the finite sequence 2, 5, 8 is a Fibonacci sub-sequence.  But 2, 8, 5 is not. Write a C++ program to accept an integer M followed by a finite sequence of M numbers. Your task is to determine if this finite sequence is a Fibonacci sub-sequence. You should output the following:
●	true or false
○	true: if the given finite sequence is a Fibonacci sub-sequence. E.g. on inputs “3 3 8 13”  and “3 3 5 8”
○	false  otherwise
Input Format An integer M followed by M integers

Assumptions on Input
●	Assume that the integer M will be between 1 and 19, both inclusive 
●	Assume that the sub-sequence numbers will be between 0 and 5000, both inclusive

Student submission:
#include<simplecpp>
int fibonacci(int n){
    if(n==1) return 1;
    if(n==2) return 2;
    if(n>2) return fibonacci(n-1)+fibonacci(n-2);}
bool fibonaccisubsequence(int n){
int c,k;
int m=1;
for(int i=1;i<=n;i++){
    cin>>c;
    if(c>=m){
    if(c==fibonacci(k)){ c==m;}
}}
return true;}
main_program{
    int n;cin>>n;
    cout<<fibonaccisubsequence(n);
}

Grading criterion: Output
Rating A: correctly prints the output
Rating B: Some issue
Rating C: Major issue
Rating D: 0
Assigned grade: C
Problem: In this problem, you need to check if a given finite sequence appears as a sub-sequence in the Fibonacci sequence. A finite sequence is said to be a Fibonacci sub-sequence if it is contained in the Fibonacci sequence in the same relative order but not necessarily consecutively. 
For example, the finite sequence 2, 5, 8 is a Fibonacci sub-sequence.  But 2, 8, 5 is not. Write a C++ program to accept an integer M followed by a finite sequence of M numbers. Your task is to determine if this finite sequence is a Fibonacci sub-sequence. You should output the following:
●	true or false
○	true: if the given finite sequence is a Fibonacci sub-sequence. E.g. on inputs “3 3 8 13”  and “3 3 5 8”
○	false  otherwise
Input Format An integer M followed by M integers

Assumptions on Input
●	Assume that the integer M will be between 1 and 19, both inclusive 
●	Assume that the sub-sequence numbers will be between 0 and 5000, both inclusive

Student submission:
#include <iostream>
using namespace std:

int main(){
    int n;
    cin >> n;{
     
    cout << n;
    }
    return 0;

}

Grading criterion: Output
Rating A: correctly prints the output
Rating B: Some issue
Rating C: Major issue
Rating D: 0
Assigned grade: C
Problem: In this problem, you need to check if a given finite sequence appears as a sub-sequence in the Fibonacci sequence. A finite sequence is said to be a Fibonacci sub-sequence if it is contained in the Fibonacci sequence in the same relative order but not necessarily consecutively. 
For example, the finite sequence 2, 5, 8 is a Fibonacci sub-sequence.  But 2, 8, 5 is not. Write a C++ program to accept an integer M followed by a finite sequence of M numbers. Your task is to determine if this finite sequence is a Fibonacci sub-sequence. You should output the following:
●	true or false
○	true: if the given finite sequence is a Fibonacci sub-sequence. E.g. on inputs “3 3 8 13”  and “3 3 5 8”
○	false  otherwise
Input Format An integer M followed by M integers

Assumptions on Input
●	Assume that the integer M will be between 1 and 19, both inclusive 
●	Assume that the sub-sequence numbers will be between 0 and 5000, both inclusive

Student submission:
#include<simplecpp>

main_program{
    int k1,k2,n,t,s=1;
    cin>>n;
    k1=0;
    k2=1;
    cin>>t;
    while(n>0){
        if(k1>t){
            s=0;
            break;
        }
        if(t==0){
            k2=1;
            k1=1;
            n--;
            cin>>t;
            continue;
        }
        if(t==k1){
            n--;
            cin>>t;
            
        }
        int tmp=0;
        tmp=k2;
        k2=k2+k1;
        k1=tmp;
        

    }
    if(s==1) cout<<"true";
    else cout<<"false";
}

Grading criterion: Output
Rating A: correctly prints the output
Rating B: Some issue
Rating C: Major issue
Rating D: 0
Assigned grade: A
Problem: In this problem, you need to check if a given finite sequence appears as a sub-sequence in the Fibonacci sequence. A finite sequence is said to be a Fibonacci sub-sequence if it is contained in the Fibonacci sequence in the same relative order but not necessarily consecutively. 
For example, the finite sequence 2, 5, 8 is a Fibonacci sub-sequence.  But 2, 8, 5 is not. Write a C++ program to accept an integer M followed by a finite sequence of M numbers. Your task is to determine if this finite sequence is a Fibonacci sub-sequence. You should output the following:
●	true or false
○	true: if the given finite sequence is a Fibonacci sub-sequence. E.g. on inputs “3 3 8 13”  and “3 3 5 8”
○	false  otherwise
Input Format An integer M followed by M integers

Assumptions on Input
●	Assume that the integer M will be between 1 and 19, both inclusive 
●	Assume that the sub-sequence numbers will be between 0 and 5000, both inclusive

Student submission:
#include <iostream>
using namespace std;
int main()
{
        int M, A, temp1,temp2;
        cin >> M;

        cin >> A;
        temp1 = A;

        bool gcheck = false;
        int a = 0;
        int b = 1;
        while (!gcheck)
        {
                int c = a + b;
                if (c == A || A == 0)
                {
                        gcheck = true;
                }

                if (c > A)
                {
                       break;
                }

                a=b;
                b=c;
        }

        cin >> A;
        temp2 = A;

        bool gcheck2 = false;
        a = 0;
        b = 1;
        while (!gcheck2)
        {
                int c = a + b;
                if (c == A || A == 0)
                {
                        gcheck2 = true;
                }

                if (c > A)
                {
                                                             break;
                }

                a=b;
                b=c;
        }


        bool check = true;
        for (int i = 0; i<M-2; i++)
        {
                cin >> A;

                if (A - temp2 == temp1)
                {
                        check = true;
                }

                else if (A - temp2 != temp1)
                {
                        cout << "false\n";
                        check = false;
                        break;
                                      }

                temp1 = temp2;
                temp2 = A;
        }

        if (check * gcheck * gcheck2 ==1)
        {
                cout << "true\n";
        }
        else
        {
                cout << "false\n";
        }

        return 0;
}

Grading criterion: Output
Rating A: correctly prints the output
Rating B: Some issue
Rating C: Major issue
Rating D: 0
Assigned grade: A