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 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: 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 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: 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==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: 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 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: 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>
bool termcheck(int &a){
        int f0=0, f1=1;
        int fp=f1, fpp=f0, fn;
        bool k;
        while(a<=fn){
                  fn = fp + fpp;
                  fpp = fp;
                  fp= fn;
                }
        if(a=fn) k=true;
        else k=false;
        return k;}

main_program{
        int M;
        if(M==1){
                int a1;
                cin>>a1;
                if (termcheck(a1)==true) cout << "true";}
                else cout << "false";
        if(M==2){
                int a1, a2;
                cin >> a1 >> a2;
                if(a1<a2) {
                    if(termcheck(a1)==true&&termcheck(a2)==true) cout << "true";
                }
                else cout << "false";}
        if(M==3){
                int a1, a2, a3;
                cin >> a1 >> a2 >> a3;
                if(a1<a2<a3) {
                    if(termcheck(a1)==true&&termcheck(a2)==true&&termcheck(a3)==true) cout << "true";
                }
                else cout << "false";}
        if(M==4){
                int a1, a2, a3, a4;
                cin >> a1 >> a2>>a3>>a4;
                if(a1<a2<a3<a4) {
                    if(termcheck(a1)==true&&termcheck(a2)==true&&termcheck(a3)==true&&termcheck(a4)==true) cout << "true";
                }
                else cout << "false";}
        if(M==5){
                int a1, a2, a3, a4, a5;
                cin >> a1 >> a2>>a3>>a4>>a5;
                if(a1<a2<a3<a4<a5) {
                    if(termcheck(a1)==true&&termcheck(a2)==true&&termcheck(a3)==true&&termcheck(a4)==true&&termcheck(a5)==true) cout << "true";
                }
                else cout << "false";}
        if(M==6){
                int a1, a2, a3, a4, a5, a6;
                cin >> a1 >> a2>>a3>>a4>>a5>>a6;
                if(a1<a2<a3<a4<a5<a6) {
                    if(termcheck(a1)==true&&termcheck(a2)==true&&termcheck(a3)==true&&termcheck(a4)==true&&termcheck(a5)==true&&termcheck(a6)==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: 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 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: 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 Fib(int n){
    int f1=0,f2=1,f3;
    for(int i=1;i<=n;i++){
        f3=f1+f2;
        f1=f2;
        f2=f3;
    }
    return f3;
}
int revFib(int a){
int k;
        for(int j=0;j<=18;j++){
        if(Fib(j)==a){
           k=j;
         break;
        }
        else k=-1;
    }  return k;
    }
main_program{
   int M,a,b=0,k=0;
   cin>>M;
   for(int i=1;i<=M;i++){
    cin>>a;
    if (revFib(a)==-1){
        cout<<"false"<<endl;
        b=1;
        break;
          
    }
    if(revFib(a)<k&&k!=1){
        cout<<"false"<<endl;
       b=1;
        break;
    }
    else k=revFib(a);
   }  
   if(b==0){
    cout<<"true"<<endl;
   }
   }
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
    /*int a,M,k=0;
    cin>>M;
    for(int i=1;i<=M;i++){
        cin>>a;
        for(int j=0;j<=18;j++){
            if(Fib(j)==a){
                k=1;
                break;}
            else k=0;
        }
        if(k==0){cout<<"false"<<endl;}
    }*/

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;
    cin >> n;
    int a1=0;
    int a2=1;
    int a3;
    int k;
    while (n<a3){
        a3 = a1 + a2;
        a1 = a2;
        a2 = a3;
    }
    if (n!=a3 ) cout << "false";
    if (n ==a3){
    for ( int i; i<(m-1); i++){
        
        a3 = a1 + a2;
        cin >> k;
        if (a3 != k ){
            cout << "false";
            break;
              }
        a1=a2;
        a2=a3;
        }
    }
  

    
}

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;
int Fibonacci(int n){
    if(n>2){
        int p=Fibonacci(n-1);
        int q=Fibonacci(n-2);
        return p+q;
    }
    else if(n==2) return 1;
    else if (n==1) return 0;
}
int main(){
    int m,i=0,a=0,c=0; cin>>m; bool result =true;
    while(i<m){
        
        int k; cin>>k; 
        for(int j=0;j<20;j++){
            if(Fibonacci(j+1)==k) {
                result=true; break;}
            else{ 
                result=false; 
            }
        }
        if(!result){
            break;
        }
        if(a>=k && k!=1) result=false;
        else if(a==k && k==1 ){
            c+=1; if(c>1) result = false;
        }
        a=k;
        i+=1;
    }
    if(result) cout<<"true";
    else cout<<"false";
    return 0;
}

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 ones = 0;
bool find(int &a, int &b, int c){

                        if(c == 1 && ones <=1&& b == 1)
                {
                        ones++;
                        return true;
                }
                else if(c == 1)
                        return false;

        if(c < a)
                return false;
        else{
               if (c > b){
                        int temp = a+b;
                        a = b;
                        b = temp;
                        if(c == temp)
                                return true;
                         else return find(a,b,c);
                }
                else
                        return false;
        }
}

main_program{
        int m;
        cin >> m;

                bool t=true;
                int a = 1, b = 1;
        for(int i = 0; i<m; i++){
                int x;
                cin >> x;
                if(i == 0){
                        if(x == 0)
                        continue;
                        else{
                                t= find(a,b,x);
                        }
                }
                else{
                        if(x == 0)
                                t = false;
                        else
                        t = find(a,b,x);
                }
                if(t == false)
                        break;
        }
        if(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 <iostream>
#include <string>
using namespace std;
void update(int& a, int& b) {
	b += a;
	a = b-a;
}
bool checkNext(int& a, int& b) {
	int n;
	cin >> n;
	do update(a,b); while (b<n);
	return (b==n);
}
int main() {
	int size, t0=0, t1=1;
	string outp = "true";
	cin >> size;
	for (int i=0; i<size; i++)
		if (!checkNext(t0, t1)) outp = "false";
	cout << outp << 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>

bool checkiffib(int m) {
        if(m<=1) {return true;}
        for(int f, f1=0,f2=1; f<=5000;) {
                f=f1+f2;
                f1<=f2? (f1=f):(f2=f);
                if(f==m) {return true;}
        }
        return false;
}

int main() {
    int M;
    cin>>M;
    if(M==0) {cout<<"true"; return 0;}
    if(M==1) {
        int x;
        cin>>x;
        cout<<(checkiffib(x)? "true":"false"); return 0;}
    int a1, a2, a3;
    for(int i=1;i<=2;i++) {
        int x;
        cin>>x;
        if(i==1) a1=x;
        else a2=x;
        if(checkiffib(x)==false) {
            cout<<"false";
            return 0;
        }
    }
    if(M<=2) {cout<<"true"; return 0;}
    for(int i=1; i<=M-2; i++) {
        cin>>a3;
        if(a3!=a1+a2) {cout<<"false"; return 0;}
        if(a1<=a2) a1=a3; else a2=a3;

    }
    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