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

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

Student submission:
#include<simplecpp>
int f(int n){
    if (n==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: Declaration of variable and taking input
Rating A: correctly declares the variable M and followed by another variable to input 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 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: Declaration of variable and taking input
Rating A: correctly declares the variable M and followed by another variable to input the subsequence
Rating B: Some issue
Rating C: Major issue
Rating D: 0
Assigned grade: A
Problem: In this problem, you need to check if a given finite sequence appears as a sub-sequence in the Fibonacci sequence. A finite sequence is said to be a Fibonacci sub-sequence if it is contained in the Fibonacci sequence in the same relative order but not necessarily consecutively. 
For example, the finite sequence 2, 5, 8 is a Fibonacci sub-sequence.  But 2, 8, 5 is not. Write a C++ program to accept an integer M followed by a finite sequence of M numbers. Your task is to determine if this finite sequence is a Fibonacci sub-sequence. You should output the following:
●	true or false
○	true: if the given finite sequence is a Fibonacci sub-sequence. E.g. on inputs “3 3 8 13”  and “3 3 5 8”
○	false  otherwise
Input Format An integer M followed by M integers

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

Student submission:
#include <simplecpp>
int f(int n){
    if (n==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: Declaration of variable and taking input
Rating A: correctly declares the variable M and followed by another variable to input 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 a=0;
    int b=1;
    int m;
    cin >> m;
    int i=0;
    int prevx,c;
    bool isseq = false;
    if(m>=1){
        
        cin >> prevx;
    }
    for(i=0; i<m-1; i++){
        int x;
        cin >> x;
        while(c<=5000){
            c=a+b;
            b=c;
            a=b;
            if(x==c){
                bool isseq=True;
                break;
            if(x!=c)continue;

        }
        
        }   

    }
    if (isseq==0) cout << "false";
    else if (isseq==1) cout << "true";
}

Grading criterion: Declaration of variable and taking input
Rating A: correctly declares the variable M and followed by another variable to input 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 k;
    int a =0;
    int b =1;
    bool flag =false;
    for(int i =0 ; i<n; i++){
        flag = false;
        cin >> k;
        while(b< 500){

        if(k == a ){
            flag = true;
            int temp =b; 
            b+=a;
            a =temp; 
            break;
    }

        else{
            flag = false;
            int temp =b;
            b+=a;
            a=temp;
            }

}
    }
if(flag) cout << "true";
else cout << "false";
}

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

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

Student submission:
#include <simplecpp>
int f(int n){
    if (n==0) return 0;
    if (n==1) return 1;
    else return f(n-1)+f(n-2);
}
main_program{
    int M, x, y, a=0, count=0;
    cin>>M;
    for (int i=1; i<=M; i++){
        cin>>x;
        for (int k=0; k<=20; k++){
            if (x==1) a++;
            if (a==2){
                count++;
                break;
            }
            if (a>2) break;
            if (y==1 && x==1){
                count++;
                continue;
            }
            if (i>=2 && x!=1){
                if (y>=x) break;
            }
            if (x==f(k)){
                count++;
                break;
            }
        }
        y=x;
    }
    if (count==M) cout<<"true";
    else cout<<"false";
}

Grading criterion: Declaration of variable and taking input
Rating A: correctly declares the variable M and followed by another variable to input 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 M;
    cin>>M;
    int store=0;
    bool grand=false;
    int ones=0;
    while(M--){

        int a;
        cin>>a;
                if(a==1){
            ones++;
        }
        int x=0;
        int y=1;
        int z=1;
        bool checker=true;
        if(a>store||a==0){
            while(checker&&a>=x){
            int side=y;
            z=y+z;
            y=x+y;
            x=side;
            if(a==x||a==0){
                checker=false;
                store=a;
            }
        }
        if(!checker){
            continue;
        }
        grand=true;
     }
    }
    if(ones>2){
        cout<<"false";
    }
    if(grand){
        cout<<"false";
    }
    else if(!grand&&ones<=2){
        cout<<"true";
    }
}

Grading criterion: Declaration of variable and taking input
Rating A: correctly declares the variable M and followed by another variable to input 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 fibonacci(int n){
    if(n == 0) return 0;
    if(n == 1) return 1;
    else return fibonacci(n-1)+fibonacci(n-2);
}
main_program{
    int M,a = 0;
    cin >> M;
    int count[M];
    int num[M];
    bool notseq = false,fib[M];
    for(int i = 0; i < M; i++){
        cin >> num[i];
        fib[i] = true;
    }
    for(int i = 0; i< M; i++){
        for(int j = 0;fibonacci(j) <= num[i]; j++){
            if(num[i] == fibonacci(j)){
                count[i] = j;
                fib[i] = true;
                break;
            }
            else fib[i] = false;
        }
    }
    for(int i = 0;i<M-1;i++){
        if(count[i+1]==count[i]){
            if(count[i+2]==count[i+1]){
                notseq = true;
                cout << "False";
                a = 1;
                break;
            }
        }
        else if(count[i+1]<count[i]) {
            notseq = true;
            break;
        }
    }
    for(int i = 0;i < M;i++){
        if(!fib[i]) {
            cout << "False";
            a = 1;
            break;
        }
    }
    if(a == 0) {
        cout << "True";
    }
}

Grading criterion: Declaration of variable and taking input
Rating A: correctly declares the variable M and followed by another variable to input the subsequence
Rating B: Some issue
Rating C: Major issue
Rating D: 0
Assigned grade: A