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,a0,a1,n0,n1,n2;
    bool b=true;
    cin >> M;
    n0=1;
    n1=1;
    n2=2;
        for(int i=1;i<=M;i++){
        cin >> a0;
        do{
            if(a0==n0 || a0==n1) break;
            n2=n0+n1;
            if(a0!=n2) b=false;
            n0=n1; n1=n2;    
        } while(a0>=n2);
        if(a0==n1 || a0==n0) b=true;
        if(!b) break;
        a1=a0;
    }
    if(!b) cout << "false" << endl;
    if(b) cout << "true" << endl;
}

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 check(int & a){
    for(int e=0, q=0,w=1;q<=5000 ;){
        e=q;
        q=w;
        w=e+q;
        if(a==q || a==0){
            a=e;
            return true;
        }
    }
}
main_program{
    int n;
    cin>>n;
    bool done=false,a1=false,a2=false;
    for(int i=0,t;i<n;i++){
        int a,p=0;
        cin>>a;
        if(i==0){p=a;
            done=check(a);
            if(done){
                t=a;
            }
        }
        if(i==1){
            if(a==(t+p)){
                a1=true;
            }
        }
        if(i==2){
            if(a==(t+2*p)){
                a2=true;
            }
        }
    }
    if(done && a1 && a2){
        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: 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 length;
    cin >> length;
    bool check1 = true;
    int n1 = 0;
    int n2 = 1;
    for(int i=1; i<=length; i++){
        int input;
        cin >> input;
        bool check2 = false;
        while(n2<=5000){
            if(n1 == input) {check2 = true; break;}
            int rem = n2;
            n2 = n2 + n1;
            n1 = rem;
            //if(check2 == true) break;
        }
        if(check2 == false) {check1 = false; break;}
        int rem2 = n2;
        n2 = n1 + n2;
        n1 = rem2;
    }
    if(check1 == true) 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 main() {
	bool fib=true;
	int M, term,nold=0,nnew=1;
	cin>>M;
	for(int i=0;i<M && fib==true;i++) {
		cin>>term;
		int temp;
		while(nold<=term) {
			if(term==0) break;
			temp=nold;
                	nold=nnew;
                	nnew+=temp;
			if(nold==term) {fib=true; break;}
                        else fib=false;
		}
	}
	if(fib==true) cout<<"true"<<endl;
	else cout<<"false"<<endl;
}

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;
        cin>>n;
        int i=0;
        int a,h,y;
        y=-1;
        bool g=true;
        for(;i<n && g==true;i++){
                cin>>a;
                if(y>=a && y!=1){
                    cout<<"false";
                    h=0;
                    break;
                }
                if((i==(n-1)) && (y==a) && (y==1)){
                    cout<<"false";
                    h=0;
                    break;
                }
                
                int p,q;
                p=0;
                q=1;
                bool t;
                t=true;
                for(;t==true;){
                        if(a==p||a==q||a==0){
                                t=false;
                                h=1;
                                g=true;
                        }
                        if(a<p){
                                h=0;
                                t=false;
                        }
                        p=p+q;
                        q=q+p;
                }
                if(h==0){
                    cout<<"false";
                    break;
                }
                y=a;
                
        }
        if(h==1){
            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 <iostream>
using namespace std;

// generate fibonacci sequence starting from a0, a1 upto target
// by stepping through the sequence
// if target is not in sequence return false (program exits)
// if it is, return true
bool genFib(int& a0, int& a1, int target) {
    static int tmp = a1;

    do {
        // step through the fib sequence
        tmp = a1;
        a1 += a0;
        a0 = tmp;
    } while(a0 < target);

    if (a0 == target) return true;

    return false;
}

int main() {
    int m, n;
    cin >> m;

    // base case
    int a0 = 0, a1 = 1;

    for(int i = 0; i < m; i++) {
        cin >> n;

        // handle case of n=0 seperately
        if (n == 0) continue;

        // generate fib sequence and print false and exit if n is not in it
        if (!genFib(a0, a1, n)) {
            cout << "false";
            return 0;
        }
    }

    cout << "true";
    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 fib(int n){
    if(n==0){
        return 0;
    }
    else if(n==1){
        return 1;
    }
    else {
        return fib(n-1)+fib(n-2);
    }
}
main_program{
    int M;
    cin>>M;
    int t=1;
    int x=0;
    int c=0;
    
    repeat(M){
    int a;
    int b =-1;
    cin>>a;    
        for(int i=0;i<10;i++){
            int z=fib(i);
                if(z==a){
                    b=i;
                    if(b==0){x++;}
                    break;
                }
        }
        if(b<0) {
            t=0;
            break;}
        else {
            if(b<c){
               t=0;
               break;}
               c=b;
        }

    }
    if(x<=2){
        if(t==1){
            cout<<"true";
        }
        else if(t==0){
            cout<<"false";
        }
    }
    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: 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 nthtermoffibonacci (int n) {
    int preva =0, a=1;
    if(n==0) {return 0;}
    if(n==1) {return 1;}
    for(int i=0; i< n-1  ; i++) {
        int temp=a;
        a += preva;
        preva = temp;
    }
    return a;
}
int main () {
    int M,k,start=0;
    cin >> M;
    for(int i=0; i<M ; i++) {
        cin >> k;
        while(k > nthtermoffibonacci(start)) {start++;}
        if(k == nthtermoffibonacci(start)) {start++; continue;}
        else { cout << "false" << endl; return 0;}
    }
    cout<< "true" << endl;
    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>
bool sf_s(int a){
    int last=0,seclast=1; 
    int p;
    bool c=true;
    int n,i;
    for( i=2;i<=n; i++){
         p=last+seclast;
        last=seclast;
        seclast=p;
        if(a==p){
            c=true;
        }
        else if(a!=p){ c=false;}
    }
    return c;
}
    main_program{
    int M;
    cin>>M;
    for(int i=1;i<=M;i++){
        int a;
        cin>>a;
        cout<<sf_s(a);
    }
}

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 n;
    cin >> n;
    int N[n];
    for(int i=0; i<n; i++){
cin >> N[i];
    }
bool valid =true;
for(int i=0; i<(n-2); i++){
    if(N[i+2] == (N[i+1] + N[i])) valid =true;
    else valid =false;
}
cout << valid;
}

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 m,num,tmp,f1=0,f2=1;
    bool bol=true;
    cin >> m;
    for (int i=1; i<=m; i++)
    {
        cin >> num;
        if(num==0 && i==1)
        break;
        while(num>=f1)
        {
            if (num!=f2)
            bol=false;
            else
            {
                bol=true;
                tmp=f2;
                f2+=f1;
                f1=tmp;
                break;
            }
            tmp=f2;
            f2+=f1;
            f1=tmp;
        }
        if(!bol)
        break;
    }
    if (bol)
    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: 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>
main_program
{

        int m, a;
        int n=0;
        bool v;
        cin >> m;

        int fn1=0;
        int fn2=1;
        int fn;

        repeat (m)
        {
                cin >> a;

            for(fn==0; n<=m; n++)
            {

                fn=fn1+fn2;
                
                if(a=fn)
                {
                    v==1;
                }

                else
                {
                    v==0;
                }

                fn1=fn2;
                fn2=fn;
                        
            }

        }

        if (v==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: 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 main(){
    int a0 = 0;
    int a1 = 1;
    int m ;
    cin >> m;
    for(int i = 0; i < m; i++){
        int j;
        cin >> j;
        while(a0 < j){
            a1 = a0 + a1;
            a0 = a1 - a0;
        }
        if(a0 != j){
            cout << "false";
            return 0;
        }
        a1 = a1 + a0;
        a0 = a1 -a0;
    }
    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