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;
        cin >> M;
        bool k=false;
        for (int x=0, prevy=0, prev1y=0; x<M; ++x) {
                int y;
                cin >> y;
                if (x==0&&y==0) {k=true; continue;};
                int a=0, b=1;
                if (prev1y==prevy&& prevy==y) {k=false;break;};
                if (y<=prevy&&(y!=1)) {k=false; break;}
                else { for (int i=0; i<5000; ++i) {
                        int c;
                        c=a+b;
                        a=b;
                        b=c;
                        if (y==c) {k=true; break;};
                        k=false;};};
                if (k==false) {break;};
                prev1y=prevy;
                prevy=y;};
        k?cout<<"true":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<iostream>
using namespace std;

bool isFibonacci(int a){
    if(a==0 || a==1) return true;
    int x=0,y=1;
    int z=x+y;
    while(z<=5000 && z<=a){
        if(a==z) return true;
        x=y;
        y=z;
        z=y+x;
    }
    return false;
}
int main(){
    int M;
    cin>>M;

    int l;
    cin>>l;
    if(!isFibonacci(l)){
        cout<<"false";
        return 0;
    }
    int flag=true;
    for(int i=1 ; i<M ; i++){
        int a;
        cin>>a;
        if(a<=l && a!=1){
            cout<<"false";
            return 0;
        }
        if(a==l && a==1){
            if(flag) flag=false;
            else{
                cout<<"false";
                return 0;
            }
        }
        if(!isFibonacci(a)){
            cout<<"false";
            return 0;
        }
        l=a;
    }
    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 <iostream>
using namespace std;

int fibonacci(int i) {
    int tmp0{0},tmp1{1},fib{0};
    if (i==0) return 0;
    if (i==1) return 1;
    for (int j{2}; j<=i; j++, tmp0=tmp1, tmp1=fib) fib=tmp0+tmp1;
    return fib;
}

int main() {
    int M, input, index{0}; cin >> M;
    bool isfibonacci{true};
    for (int i{1}; i<=M ; i++) {
        cin >> input;
        for (; input>fibonacci(index) ; index++);
        if (input != fibonacci(index)) {
            isfibonacci = false;
            break;
        }
        else {index++;}
    }
    cout << ((isfibonacci) ? "true" : "false");

    return 0;
}

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,n,prevN=0,N=1,tmp;
    cin >> m>>n;
    while(1){
        if (n==prevN){if(m!=1){cin>>n;}
                      m-=1;}
        else if(n<prevN){cout << "false"<<endl;break;}
        if(m==0){cout << "true"<<endl;
        break;}
        tmp=N;
        N+=prevN;              
        prevN=tmp;
    }
}

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 main() {
    int M, t, m = 0, i = 1;
    cin>>M;
    int a = 0, b = 1, c = 1;
    t = a;
    int d1, d2;
    cin>>d1>>d2;
    while(true) {
        if(m == 0) {
            if(d1 == a)
        }
    }
    cout<<"true";
}
//time's up

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, a, b;
    cin >> M;
    cin >> a;
    cin >> b;
    
    for (int c, k = 1; k < M - 1; ++k  ) {
        cin >> c;
        if (a + b == c) {if (k == M - 2) {cout << "true"; continue;}}
        if (a + b == c) { a = b; b = c; continue;}
        if (a + b != c) {cout << "false"; break; }
        }
    if (M == 2) {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: 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 main()
{
    int M;
    cin>>M;
    bool h;
    int a=0 ;int b=1; int temp=0;
    int k[M];
    for(int i=0;i<M;i++)
    {
        cin>>k[i];
    }

    

    for(int j =0;j<M;j++)
    {
        if(k[j]==temp){h=true;}
        else{
        while(k[j]>temp)
        {
            
            a=b;
            b=temp+a;
            temp=a;

            
        }
        if(k[j]==temp){continue;h=true;}
        else{cout<<"false";h=false;break;}
        }

    }
    if(h==true)
    {
        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,p,q,r,t,l,a;
    bool x=true;
    cin>>n;
    p=0;q=1;t=0;l=1,r=1;
    for(int i=0;i<n;i++){
          cin>>a;
          
         if(x==false) break;
          else if(a==t){x=true;t=-1;}
          else if(a==l){x=true;l=-1;}
          else if(a==r){x=true;p=r;
                r=r+q;
                q=p;}
          else if(a<r){x=false; break;}
          else if(a>r){while(true){
                p=r;
                r=r+q;
                q=p;
                if(a==r){x=true;break;}
                else if(a<r){x=false;break;}
          }}
          else if(a<r){x=false; break;}
          else if(x==false) break;

    }

if(x==true)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<iostream>
using namespace std;
int f(int n){
        if(n==0) return 0;
        else if(n==1) return 1;
        else return f(n-1)+f(n-2);}
int main(void){
         int m,k;
         cin>>m;
        for(int i=0;i<m;i++){ int x,n=0; cin>>x; while(x>f(n)){n++;}
                              if(x<k){ cout<<"false"; return 1;}
                              if (x!=f(n)){cout<<"false"; return 1;}
                              k=x;
                              }



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 Fib(int n) {
    if (n == 0) { return 0; }
    else if (n == 1) { return 1; }
    else { return Fib(n-1)+Fib(n-2); }
}

bool isFib(int n) {
    int i = 0;
    int x = -1; // -1 < Fib(0)
    for ( ; x < n; i++) {
        x = Fib(i);
    }
    return x == n;
}

int main () {
    int M;
    int t = 0;
    bool answer = true;
    cin >> M;
    int oldN = -2, newN; // creating a random value for oldN just for the first iteration below. Also, -2 < 0.
    for (int count = 0; count < M; count = count + 1) {
        cin >> newN;
        if (newN == 1) {t = t+1;}
        if (t > 2) { // can't have more than 2 '1's'
            answer = false;
            break;
        }
        if ((newN <= oldN && newN!= 1) || (newN < oldN) || !(isFib(newN))) { // only '1' can repeat multiple times
            answer = false;
            break;
        }
        oldN = newN;
    }
    if (answer) {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,x=1,y=1,z=0,count=0,value;cin>>m;
while(1){cin>>value;count+=1;
if(value<z){cout<<"false";break;}
while(value!=z&& value>z){x=y;y=z;z=x+y;}
if(value<z){cout<<"false";break;}
x=y;y=z;z=x+y;
if(count == m){cout<<"true";break;}}

}

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,t1=0,t2=1,x,temp,j=0,b=0;
    cin>>M;
    bool flag=true;
    for(int i=1;i<=M;i++){
        cin>>x;
        while(true){
            if(b<2){
                if(b=1)
                    j=1;
                b++;
            }
            
            else{
                j=t1+t2;
                t1=t2;
                t2=j;
            }
            if(x==j){
                break;
            }
            if(j>x){
                flag=false;
                break;
            }
        if(!flag)
            break;
            
        }

        
    }
    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>
void checker(int& n,int a,bool& result,int& ax,int& ay,int& az){ 
if(a==0){n=1;result=true;}
else if(a==1){n=2;result=true;}
else{
    int an=2,ap=1;result=false;
    for(int p=4;p<=20;p++){
if(a==an&&p>n){n=p;result=true;break;}
int tmp;tmp=an;an=an+ap;ap=tmp;
}
};
int tmp;tmp=ax;ax=a;int tmp2;tmp2=ay;ay=tmp;az=tmp2;
if(ax==ay&&ay==az){result=false;};
}

main_program{
    int M;
    cin>>M;
    int n=0;bool result=false;int ax=0,ay=8,az=9;
    for(int c=1;c<=M;c++){
        int a;
        cin>>a;
        checker(n,a,result,ax,ay,az);
        if(!result){break;};
    }
    if(result){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