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>
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: Logic for checking the subsequence
Rating A: correctly writes the logic for checking the subsequence
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>
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: Logic for checking the subsequence
Rating A: correctly writes the logic for checking the subsequence
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 n;
    cin >> n;{
     
    cout << n;
    }
    return 0;

}

Grading criterion: Logic for checking the subsequence
Rating A: correctly writes the logic for checking the subsequence
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: Logic for checking the subsequence
Rating A: correctly writes the logic for checking the subsequence
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: Logic for checking the subsequence
Rating A: correctly writes the logic for checking the subsequence
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 main(){
    int M,a1,a2,a3,a4,count=2;
    cin>>M;
    cin>>a1>>a2;
    int f1=0,f2=1,f3;
    while(1){
        f3=f1+f2;
        if(a1<=f3){
            if(a1!=f1 && a1!=f2 && a1!=f3){
                count=0;
                cout<<"false";}
                break;
        }
        f1=f2;
        f2=f3;
    }
    
    int f4=0,f5=1,f6;
    if(count!=0){
        if(a1==f1) a2=f2;
    else if(a1==f2) a2=f3;
    else a2=f2+f3;
    while(1){
        f6=f5+f4;
        if(a2<=f6){
            if(a2!=f4 && a2!=f5 && a2!=f6){
                count=0;
                cout<<"false";}
                break;
        }
        f4=f5;
        f5=f6;
    }
    if(count!=0){
    for(int i=0;i<(M-2);i++){
        cin>>a3;
        while(1){
            a4=a1+a2;
            if(a4>=a3) break;
            a1=a2;
            a2=a4;
        }
        if(a4!=a3){
            cout<<"false";
            count=0;
            break;
        }
        else count++;
        a1=a2;
        a2=a3;
    }
    if(count==M) cout<<"true";
    }
}
}

Grading criterion: Logic for checking the subsequence
Rating A: correctly writes the logic for checking the subsequence
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 fib(int n)
{
    if(n == 0)
    {
        return 0;
    }
    if(n == 1)
    {
        return 1;
    }

    return fib(n-1)+fib(n-2);
}

bool isfib(int a)
{
    bool isit = false;
    for(int i = 0; i<9; i++)
    {
        if(a == fib(i))
        {
            isit = true;
        }
        if(isit)
        {
            break;
        }
    }
    return isit;
}

main_program
{
    int n;
    cin>>n;

    int x,y=0,z,w=0;
    cin>>x;
    
    bool p = true;
    bool q = true;
    bool i;

    repeat(n)
    {
        if( isfib(x) )
        {
            bool p = true;
        }
        else
        {
            bool p = false;
            break;
        }
        if(x>y)
        {}
        else if(x == 0 || x == 1)
        {
            if(x == 0)
            {
                z=0;
            }
            if(x == 1)
            {
                z=1;
            }
        }
        else
        {
            bool q = false;
            break;
            
        }
        y = x;
        cin>>x;
        if(x == 1 && w == 1)
        {
            bool q = false;
            break;
        }
        if(x == 0 && z == 0)
        {
            bool q = false;
            break;
            
        }
        if(x == 1 && z == 1)
        {
            w = 1;
        }
        
    }

    if( p && q)
    {
        cout<<"true";
    }
    else{
        cout<<"false";
    }
}

Grading criterion: Logic for checking the subsequence
Rating A: correctly writes the logic for checking the subsequence
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 n, x, count=0;
    int a=0, b=1, c;
    cin >> n;
    for(int i=0;i<n;i++) {
        cin >> x;
        for(int j=0;j<50;j++) {
            c = a+b;
            int tmp=a;
            a=b;
            b=c;
            if(tmp==x) {
                count++;
                break;
            }
        }
    }
    if(count==n) cout <<"true";
    else cout << "false";
}

Grading criterion: Logic for checking the subsequence
Rating A: correctly writes the logic for checking the subsequence
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>
bool f(int n){
	if (n==0 || n==1){return true;}
	int b=0,c=1;
	while (c<=n){int tmp=c;
		c+=b;
		b=tmp;
		if (c==n) {return true;}}
	return false;}
	
main_program{bool test=true;
	int n;cin >> n;
	for (int i=0;i<n;i++){
		int k;cin >> k;bool t=f(k);
		if (t==false){test=false;cout << "false";}}
	if (test) cout << "true";}

Grading criterion: Logic for checking the subsequence
Rating A: correctly writes the logic for checking the subsequence
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 Fibonacci(int n);
bool inSequence(int n);
int main(){
    //we exploit the constraint on the input
    int len; cin>>len;
    int p = 1;
    int count=0;
    int max =0;
    for(int i=1; i<=len;i++){
        int n; cin>>n;
        (n==1)?count+=1:count+=0;
        (inSequence(n))?p*=1:p*=0;
        (count>=3)?p*=0:p*=1;//case for 1 has to be handled separately, it is the only case with two equal members in the sequence
        if(n>=max){
            p*=1;
            n=max;
        }
        else{
            p*=0;//we must have an increasing sequence!!!
        }
    }
    string result;
    (p==1)?result="true":result="false";
    cout<<result;

}
int Fibonacci(int n){
    if (n==0) return 0;
    else if(n==1) return 1;
    else return (Fibonacci(n-1)+Fibonacci(n-2));
}
bool inSequence(int n){
    for(int i=0;i<=20;i++){
        if(Fibonacci(i)==n) return true;
    }
    return false;
}

Grading criterion: Logic for checking the subsequence
Rating A: correctly writes the logic for checking the subsequence
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 Fib(int n){
	int a=0;
	int b=1;
	int c;
	if(n>=2){
	repeat(n-1){
		c=a+b;
		a=b;
		b=c;
	}
}
	if(n==1){
		c=1;
	}
	if(n==0){
		c=0;
	}
	return c;
}
bool check(int n){
	int j=0;
	bool v;
	while(Fib(j)<=n){
		if(Fib(j)==n){
			v=true;
			break;
		}
		else{
			v=false;
		}
		j+=1;
	}
	return v;
}
main_program{
	int M;
	cin>>M;
	int i=1;
	int x;
    int y;
	while(i<=M){
		cin>>x;
        y=x;
		i+=1;
		if(check(x) && y>=x){
			continue;
		}
		else{
			i=0;
			break;
		}
	}
	if(i==M+1 && x!=1){
		cout<<"true";
	}
	else{
		cout<<"false";
	}
}

Grading criterion: Logic for checking the subsequence
Rating A: correctly writes the logic for checking the subsequence
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) {
    if(n==0) return 0;
    if(n==1) return 1;
    if(n>=2) return f(n-1)+f(n-2);
}

main_program {
    int m=0,n=0,r=0,k=0,input=0;
    bool sub=true, sub2=true,sub3=false;
    cin>>m;
    while(sub2==true) {
    for(int i=0;i<m;i++) {
        cin>>input;
        for(;k>=0;k++) {
            if(f(k)==input) {break;}
            else {sub=false;sub2=false;break;}
        }
        r=k-r;
        sub3=true;
        if(r<0&&sub3==true) {sub=false; r=k;k=0;sub2=false;break;}
        else if(sub3==true){sub=true;r=k;k=0;}
}
    }
if(sub==false) cout<<"false";
if(sub==true) cout<<"true";
}

Grading criterion: Logic for checking the subsequence
Rating A: correctly writes the logic for checking the subsequence
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>
void fibonacci(int n){
    if(n==1|| n==2) return 1;
    else return 1+fibonacci(n-1);
}
main_program{
    int m; 
    cin>>m;
    
}

Grading criterion: Logic for checking the subsequence
Rating A: correctly writes the logic for checking the subsequence
Rating B: Some issue
Rating C: Major issue
Rating D: 0
Assigned grade: C