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 f0=0;
int f1=1;

int f2=1;
int f3=2;
int f4=3;
int f5=5;
int f6=8;
int f7=13;
int f9=21;
int f10=34;
int f11=55;
int f12=89;
int f13=144;
int f14=233;
int f15=377;
int f16=610;
int f17=987;
int f18=1597;
int f19=2584;
int f20=4181;

main_program{
        int m;
        cin>>m;
        int b;
        cin>>b;
        if (b==f1||b==f2||b==f3||b==f4||b==f5||b==f6||b==f7||b==f8||b==f9||b==f10||b==f11||b==f12||b==f13||b==f14||b==f15||b==f16||b==f17||b==f18||b==f19||b==f20){

        }
}

Grading criterion: Computation of the fibonacci sequence
Rating A: correctly Computes the fibonacci sequence
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,n1,n2,n3;
    bool got_fibonacci = true;
    if(M<3) got_fibonacci=false;
    for(int i=3;i<=M && !got_fibonacci;++i,n1=n2,n2=n3){
       cin >> n3;
       if(n3!=n1+n2) got_fibonacci=false;
       }
    
    if (got_fibonacci) {cout << "true";}
    else cout << "false";  
}

Grading criterion: Computation of the fibonacci sequence
Rating A: correctly Computes the fibonacci sequence
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>
bool fib(int n){
    int a1 =1,curr=1,next;
    while(curr< n){
        next = curr + a1;
        a1 = curr;
        curr = next;
    }
    if(n==0){return true;}
    else if(curr == n){return true;}
    else if(curr>n){return false;}
}

main_program{
    bool val;
    int m,a,b,c=0;
    cin>>m;
    cin>>a;
    b=a;
    for(int i=0;i<(m-1);++i){
        if(c>1){
                val = false;
                break;
            }
        if(!fib(b)){
            val = false;
            break;       
        }
        cin>>a;
        if(!fib(a)){
            val = false;
            break;
        }
        if(a>b){
            val = true;
            b=a;
            continue;
        }
        else if(a==1 && b==1){
            c+=1;
        }
        b =a;
    }
    cout<< (val?"true":"false");
}

Grading criterion: Computation of the fibonacci sequence
Rating A: correctly Computes the fibonacci sequence
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, a=0, b=1;
    bool p=true;
    cin>>M;
    for(int i=0; i<M; i++){
        int x; cin>>x;
        while(true){
            if(a==x){
                b+=a;
                a=b-a;
                break;
            }
            if(a>x){p=false; break;}
            if(a<x){
                b+=a;
                a=b-a;
            }
        }
        if(p==false){cout<<"false"; break;}
    }
    if(p==true) cout<<"true";
}

Grading criterion: Computation of the fibonacci sequence
Rating A: correctly Computes the fibonacci sequence
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,k=0;
int r,r1=-1,count=0;
bool condition=true;
cin>>M;
while(k<M){cin>>r;k++;
if (r==1)count++;
if(count >2){condition=false;cout<<"false"; break;}
if(r==0||r==1||r==2||r==3 ||r==5||r==8||r==13||r==21||r==34||r==55||r==89||r==144||r==233||r==377||r==610||r==987||r==1597||r==2584){condition=true;}
else {condition=false;cout<<"false ";break; }
if (r<r1){condition=false;cout<<"false";break;}
r1=r;
}
if (k==M&& condition==true)cout<<"true";

}

Grading criterion: Computation of the fibonacci sequence
Rating A: correctly Computes the fibonacci sequence
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 c,co=-1,co2=-1;
    bool fib=true;

    for (int i=1;i<=M;i++) {
        cin>>c;
        if (c==1 && co==1 && co2==1) {cout<<"false"; fib=false; break;}
        else if (c==1 && co==1 && co2!=1) {continue;}
        else {
            if (c<=co) {
            cout<<"false";
            fib=false;
            break;
            }
            else {
                bool match=false;
                int n0=0;
                int n1=1;

                int n=n1+n0;
                if (c==0) {match=true;}
                while (n<=c) {
                    if (c==n) {match=true;}
                    n0=n1;
                    n1=n;
                    n=n1+n0;
                }
                if (!match) {cout<<"false"; fib=false; break;}
            }
            co2=co;
            co=c;
        }
    }
    if (fib) {cout<<"true";}
}

Grading criterion: Computation of the fibonacci sequence
Rating A: correctly Computes the fibonacci sequence
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 fibonacci(int n){
    int f0=0;
    int f1=1;
    if (n==0){
        return 0;
    }
    int i=1;
    while(n>f1){
        int a=f0;
        f0=f1;
        f1=f1+a;
        i+=1;
    }
    if (n==f1){
        return i;
    }
    return -1;
}
int main(){
    int n; cin>>n;
    int v=-1;
    int c1=0;
    for(int i=1; i<=n; i+=1){
        int x; cin>>x;
        if (x==1){ //dealing with 1 separately as it is the only number that repeats twice in the sequence
            c1+=1;
        }
        if (c1>2){
            cout<<"false";
            break;
        }
        if (fibonacci(x)==(-1)){
            cout<<"false";
            break;
        }
        else{
            int v1=fibonacci(x);
            if(v1<v||(v1==v && x!=1)){
                cout<<"false";
                break;
            }
            v=v1;
            if (i==n){
                cout<<"true";
            }
        }

    }
}

Grading criterion: Computation of the fibonacci sequence
Rating A: correctly Computes the fibonacci sequence
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,i,j=0,k=0;
    cin>>n;
    bool fibo = false;
    repeat(n){
        fibo = false;
        cin>>i;
        for(int a=0,b=1,c=0;a<=5000&&b<=5000&&fibo==false;b=c){
                if(i==a||i==b) fibo = true;
                c=a+b;
                a=b;
        }
        while(fibo){
            if(i>=j) {fibo=true;break;}
            else {fibo=false;break;}
        }
        k=j;
        j=i;
        if(i==j&&j==k) fibo = false;
        if(fibo==false) break;
    }
    if(fibo==false) cout<<"false";
    if(fibo==true) cout<<"true";
}

Grading criterion: Computation of the fibonacci sequence
Rating A: correctly Computes the fibonacci sequence
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,k;
    cin >>k>>n;
    int i;
    int f1=0,f2=1,f3;
    for(i=1;i<=k;){
            if(n==f1||n==f2){
                cin >>n;
                i=i+1;}
        f3=f1+f2;
        f1=f2;
        f2=f3;
        if(n==f2){
            cin >>n;
            i++;}
        else if(n<f2){
            cout <<"false";
            break;}
        else 
            continue;
        }
    if(i=k){
        cout <<"true";}
    }

Grading criterion: Computation of the fibonacci sequence
Rating A: correctly Computes the fibonacci sequence
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 previ=-1;
bool fib(int x,int z)
{int a=0;
int b=1;
int index;
for(int i=0;i>=0;i++)
{//a is ith fib
if(x==a){if(previ<i){previ=i;return true;}}
if(a>x){return false;}

int c=a;
a=b;
b=a+c;
}

}
int main()
{bool check,ans=true;
int n;cin>>n;
for(int i=1;i<=n;i++)
{int x;cin>>x;
check=fib(x,previ);
if(!check){ans=check;}
}
if(ans)
{cout<<"true";}
else{cout<<"false";}
}

Grading criterion: Computation of the fibonacci sequence
Rating A: correctly Computes the fibonacci sequence
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 n;
        int a=0,b=1;
        bool brk=false;
        repeat(m){
        while(!brk){
        bool cont=false;
                cin>>n;
                while(!cont){
                int c=a+b;
                b=c;a=b;
                if(c<=5000){
                if(n==c)
                        cont=true;
                }
                else{
                        cont=true;
                        brk=true;
                }
        }
        }
        }
        if(brk==true)
                cout<<"false"<<endl;
        if(brk==false)
                cout<<"true"<<endl;
}

Grading criterion: Computation of the fibonacci sequence
Rating A: correctly Computes the fibonacci sequence
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; cin >> M;
    int a;
    bool fss=false;
    int b;
    while (M!=0) {
        M--;
        cin >> a;
        int x=0, y=1, q=0;
        while (q<50) {
            int z=x+y;
            q++;
            x=z;
            int w=x+y;
            y=w;
            if (a==x || a==y || a==0) {
                fss=true;
                break;
            }
            else if (a!=x && a!=y){
                fss=false;
                continue;
            }
        }
        b=a;
        if (fss==false) break;
        else continue;
    } 
    if (fss==false || b==1) cout << "false";
    else cout << "true";
}

Grading criterion: Computation of the fibonacci sequence
Rating A: correctly Computes the fibonacci sequence
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 fibo (int n)
{
    if(n==1)
    {
        return 0;
    }
    else if(n==2)
    {
        return 1;
    }
    else
    {
        int a1=0;
        int a2=1;
        int a;
        for(int i=0; i<(n-2);i++)
        {
            a=a1+a2;
            a1=a2;
            a2=a;
        }
        return a;
    }
}
int main ()
{
    int term;
    int n;
    bool sub=true;
    cin>>term;
    int j =1;
    for(int i=0; i<term; i++)
    {
        cin>>n;
        while(true)
        {
            if (fibo(j)==n)
            {
                j++;
                break;
            }
            else if(fibo(j)>n)
            {
                sub = false;
                break;
            }
            j++;
        }
        if(!sub)
        {
            break;
        }
    }
    if(!sub)
    {
        cout<<"false"<<endl;
    }
    else
    {
        cout<<"true"<<endl;
    }
}

Grading criterion: Computation of the fibonacci sequence
Rating A: correctly Computes the fibonacci sequence
Rating B: Some issue
Rating C: Major issue
Rating D: 0
Assigned grade: A