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 no;cin>>no;
        int f1=0,f2=1;int i=1;
        repeat(no){int n;cin>>n;
                    }


}

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

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

Student submission:
#include<simplecpp>
main_program {
    int m,n;
    char c;
    cin>>m;
    for(int i=1;i<=m;i++){
        cin>>n;
    }

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

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

Student submission:
#include<simplecpp>
main_program{
    int M;
    cin>>M;
    if(M==2) {
        int a,b;
        cin>>a >>b;
        if(a==1 && b==4) {
            cout<<"false";
        }
    }
    if(M==3) {
        int a,b,c;
        cin>>a >>b >>c;
        if(a==1 && b==1 && c==1) {
            cout<<"false";
        }
        else if(a==4 && b==8) {
            if(c==12 || c==13) {
                cout<<"false";
            }
        } 
        else if (a==1 && b==1 && c==4){
            cout<<"false";
        }
    }
        else if (M==4) {
            int a,b,c,d;
            cin>>a >>b >>c >>d;
            if(a==0 && b==1 && c==1 && d==2) {
                cout<<"true";
            }
        }

}

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

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

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

bool fibo(int x)
{
    if(x==0 || x==1)
    return 1;
    int i=1,j=1, k=0;
    while(x>k)
    {
        k=i+j;
        i=j;
        j=k;
    }
    if(x==k)
    return 1;
    else return 0;
}
int main()
{
    unsigned int m,x,y=0;
    bool flag=1;
    cin>>m;
    for(int i=0;i<m;i++)
    {
        cin>>x;
        if(fibo(x) && x>=y)
        y=x;
        else{
             flag=0;
             break;
        }
    }
    cout<<(flag==1? "true": "false");
}

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

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

Student submission:
#include <simplecpp>
main_program{
        int m;
        cin>>m;
        int N=0, nextN=1;
        int num, count=0;
        bool isFab=true;
        for(int i=0; i<m; i++){
                cin>>num;
                while(true){
                        if(num==N){
                                int temp=nextN;
                                nextN = N + nextN;
                                N = temp;
                                break;
                        }else{
                                int temp=nextN;
                                nextN = N + nextN;
                                N = temp;
                        }
                        if(count>5000){
                                isFab=false;
                                break;
                        }
                        count++;
                }
        }       
        if(isFab==true) cout<<"true";
        else if(isFab==false) cout<<"false";
}

Grading criterion: Output
Rating A: correctly prints the output
Rating B: Some issue
Rating C: Major issue
Rating D: 0
Assigned grade: 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 j=1;
        int a,b,k,c;
        cin >> a>>b;
        int s=0;
        int w=0;
        repeat(1000){
                k=s;
                s=i+j;
                if(a==k&&b==s){
                for(int i=1;i<=n-2;++i){
        cin>>c;
        if(c==(a+b)){
                ++w;    }

        a=b;
        b=c;
                }
        if(w==(n-2)){
        cout << "True";}
        else {
        cout << "False";
                }

                }
                i=j;
                j=s;





        }
}

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 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;
    int c=0;
    int t=0;
    cin>>M;
    for(int i=0;i<M;i++){
        int a;
        cin>>a;
        for(int z=0;Fib(z)<(a+1);z=z+1){
            int h=Fib(z);
   
            if(h==a){
                t=t+1;
            } 
        }
        if(a==1)c++;
    }
    if(c<3 && (t==M))cout<<"true";
        else cout<<"false";

}

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

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

Student submission:
#include <simplecpp>
main_program{
        bool isTrue=true;
        int m, n, prevn, l=1, prevl=0;
        cin >> m;
        cin >> n;
        while(l!=n){
            if(n==0) break;
                int a;
                a=l;
                l=a+prevl;
                prevl=a;
                if(l>n){
                         isTrue=false;
                         break;
                }
        }
        prevn=prevl;
        for(int k=0;k<m-1;k++){
                l=1, prevl=0;
                int b;
                b=n;
                cin >> n;
                if(prevn<=n){
                        while(l!=n){
                                int a;
                                a=l;
                                l=a+prevl;
                                prevl=a;
                                if(l>n){
                                        isTrue=false;
                                        break;
                                }
                        }
                }
                prevn=b;
        }
        if(isTrue) 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 main(){
    int M;
    cin>>M;
    bool done=true;
    if(M<3) cout<<"false";
    if(M>2) { 
             int a1,a2,i;
             cin>>a1>>a2;
             for(cin>>i;M>2;cin>>i){
                                
                              }
             if(done==true) cout<<"true"; 
             if(done==false) cout<<"false";
            }   
                  
}

Grading criterion: Output
Rating A: correctly prints the output
Rating B: Some issue
Rating C: Major issue
Rating D: 0
Assigned grade: 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 fib(int n){
        int n1=0,n2=1,n3;
        if(n==1) return n1;
        if(n==2) return n2;
        n=n-2;
        while(n>0){
                n3=n2+n1;
                n1=n2;
                n2=n3;
                n--;
        }
        return n3;
}
main_program{
        int counter,inp; //number of inputs,input
        bool test=true; //subsequence property
        cin >> counter >> inp;
        for(int i=1;counter>0;i++){
                if(inp>fib(i)) continue;
                else if(inp==fib(i)){
                        counter--;
                        if (counter==0) break;
                        cin >> inp;
                }
                else if(inp<fib(i)){
                        test=false;
                        break;
                }
        }
        if(test==true) cout<< "true";
        else if(test==false) cout << "false";
}

Grading criterion: Output
Rating A: correctly prints the output
Rating B: Some issue
Rating C: Major issue
Rating D: 0
Assigned grade: 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 input; int n=0;
           
           for(int i=0;i<M;i++){ cin>>input;  int x=0,y=1,z;      
                  while(true){ 
                                  if(input==x){ n++;break;}
                                  
                                  z=x+y;x=y;y=z;
                                                 }    cout<<n<<endl;                    }
                                                 
                              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: 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 N=0, prevN=1;
    bool fibo=true;
    for(int j=0; j<M; j++){
        int a; cin>>a;
        while(a!=N){
            if(N>5000){
                fibo=false; break;
            }
            int temp=N;
            N=N+prevN;
            prevN=temp;
        }
        if(!fibo){
            cout<<"false"; break;
        }
        int temp=N; N=N+prevN; prevN=temp;
    }
    if(fibo){
        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, a, b, c;
    cin >> n >> a >> b;
    bool y=true;
    if (n>2) {
        repeat (n-2) {
        cin >> c;
        if (c==a+b) { y=true; }
        else if (c!=a+b) { y=false; break; }
        a=b;
        b=c;
        }
    }
    if (n==2) {
        int p=0, q=1, r=0;
        while (r<=b) {
            r=p+q;
            if (a==q && b==r) { y=true; }
            else { y=false; }
            p=q;
            q=r;
        }
    }
    if (y==true) { cout << "true"; }
    else if (y==false) { cout << "false";}
}

Grading criterion: Output
Rating A: correctly prints the output
Rating B: Some issue
Rating C: Major issue
Rating D: 0
Assigned grade: 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 fibonacci (int a) {
    int x=0, y=1, z=1;
    if (a==x || a==y) return true;
    while (true) {
        if (a>y) {
            x=y;
            y=z;
            z=(x+y);
        }
        else if (a==y) {
            return true;
            break;
        }
        else {
            break;
            return false;
        }
    }
}
main_program {
    int n;
    cin >> n;
    bool t = false;
    for (int a, i=0, x=0, y=1, z=1, temp=0;i<n;++i) {
        cin >> a;
        if (!fibonacci(a) || a<temp) {
            t = false;
            break;
        }
        while (fibonacci(a) && a>y) {
                x=y;
                y=z;
                z=(x+y);
            } 
        if (a==1 && temp==1) t = false;
        else if (a == y) {t = true;
        temp = a;
        }
    }
    if (t==true) 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