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, 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: 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,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: 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 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: 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 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: 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 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: 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 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: 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 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: 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 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: 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 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: 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 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: 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 a,a1,b,b1,c,d,M,n;
    cin>>M;
    a1=0;b1=1;n=0;
    repeat(M)
    {
        cin>>d;
        for(a=a1,b=b1;b<=5000;c=a,a=b,b=b+c)
        {
          if(d==a)
          {
            c=a;a1=b;b1=b+c;
            n++;
            break;
          }
        }
    }
    if(n==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>
int f(int n){
    if (n==1)return 0;else if(n==2) return 1;
    int x=0,y=1;n=n-2;
    while(n--){
        y=x+y;x=y-x;
    }return y;

}
main_program{
    int m,t;cin>>m;
    int x,y=0;t=m;
    while(m--){
        cin>>x;
        for(int n=1;x>=f(n);n++)if(x==f(n)){y++;break;}
    }if(y==t)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>
 int PN = 1;
 int PPN = 0;
 int N ;
 int F(int& j){
    int k = 0; 
     while ( k < j){
        N = PN + PPN;
        PN = N;
        PPN = PN;
        ++k;
     }
     if ( j ==0 ) return PPN;
     else if ( j == 1)return PN;
     else 
         return N;
 }


main_program{
int M ;
cin >> M;
int pn=0;
int sum = 0;
for( int i = 0 ; i < M ; ++i ){
    int n;
    cin >> n;
    if( pn > n){
        cout << "false ";
        break;
    }
    pn = n;
    int count = 0;
    for(int j = 0; j < 100 ; ++j){
        if (F(j) == n){
        ++ sum;
        continue;
        ++count;}
    }
    if (count == 100) 
     cout<< " false";
}
if (sum == M)
 cout << "true";
    
}

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>
int f(int n){
    if (n==1){return 0;}
    else if (n==2){return 1;}
    else{int p=f(n-1); int q=f(n-2);
   return (p+q);}
}
bool check(int x){int y;
    for(int i=1;f(i)<=x;i++){
        if(f(i)==x){y=2;}
    }
    if(y==2){return true;}
    else{return false;}
}
main_program{int m; int n;
cin>>m; int count; int z;
for(cin>>n;count<m;count++){
    if (!check(n)){z==2;}
}
if(z==2){cout<<"false"<<endl;}
else{cout<<"true"<<endl;}

}

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