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<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 Fibonacci_index(int n){
    int i=0;
    while(1){
        if(n==F(i)) return i;
        if(n<F(i)) break;
        i++;
    }
    return -1;
}
int main(){
    int M;cin>>M;
     int x,i,y=-2;int temp,d=-2;
     for(i=1; i<=M;i++){
        cin>>x;
        
        
        temp= Fibonacci_index(x);
        if(x==y && x==1) temp =2;
        
        if(temp==-1) {
            cout<<"false";break;
     }
     if(d>=temp){
            cout<<"false";break;
     }
        d=temp;
        y=x;
     
     }
     if(i==M+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: 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 test = true;
    int n = 0, pren = 0;
    for ( int count = 1; test && count <= M; count++){ 
        pren = n;
        cin >> n;
        if ( n < pren ) test = false;
        else { if ( n == 0 );
            else{
            int fa  = 0, fb = 1; int fc; 
            for(; true ;fa = fb, fb = fc){
                fc = fa + fb;
                if (n>fc) continue;
                if ( n == fc ) break;
                else {
                    test = false; break;

                }

            }
        }
        }
        
    }
    if (test == true){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>
main_program{
    int a,b,p=0,M,n,n1,count;bool ans;
    cin>>M;
    for(count=1,cin>>n;count<=M; count++){
       for(a=0,b=1;p<n;){
        p=a+b;a=b;b=p;
        }
        if(p==n){
            ans=true;
        }else if(p!=n){
            ans=false;
            cout<<"false";
            break;
        }
        cin>>n1;
        if(n1<n){
            cout<<"false"; break;
            }else {n=n1;}
       }
       if(ans==true){
        cout<<"true";
       }
    }

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

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

Student submission:
#include<simplecpp>
bool fibonacci(int a,int& b,int& c) {
        if(a==b) {int r=b+c;b=c;c=r;return true;}
        if(a==c) {int r=b+c,m=r+c;
                b=r;c=m;return true;}
        for(int r=b+c;r<=a;b=c,c=r,r=b+c) {
                if(r==a) {int d=r+c,e=r+d;
                b=d;c=e;return true; break;}
        }
        return false;
}
main_program {
        int M,count=0;bool q;int a,b=0,c=1;
        cin >> M;
        for(int i=0;i<M;++i) {
                cin >> a;
                if(a==1) ++count;
                q=fibonacci(a,b,c);
               if(q==0 || count>2) {
        cout << "false"; break;}
        } if(q==1 && count<=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: 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 a = 0, b = 1, tmp, n, i = 0;

    for (; M >= 1 && M <= 19, i <= M, a <= 5000, b <= 5000;) {
        cin >> n;
        if(n == a) {
            i++;
        }
        tmp = b;
        b = a + b;
        a = tmp;
        if (i == M) break;
    }
    
    if (i == 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>
bool check(int x){
    int a=0,b=1,p=a,q=b;
    while (b<x){
        b=a+b; a=q; p=a; q=b;
    }
    if (b==x) return true;
    else return false;
}
main_program{
    int n; cin>>n; int e=1; int x, prevx=-1, prev2x=-2;
    for (int i=0; i<n; i++){
        cin>>x;
        if (!(check(x) && (prevx<x || (prevx==x && x==1 && prev2x!=x)))) e=0;
        prevx=x;
        prev2x=prevx;
    }
    if (e) 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 a=0;
	int b=1;
	int m;
	int x=0;
	cin>>m;
	for (int i=0;i<m;++i){
		int j;
		cin>>j;
		if (i==0 && j==0){
			x+=1;
		    continue;
		}
		while (true){
			int tmp=b;
			b=b+a;
            a=tmp;
			if (b==j){ x=x+1; break;}
			
			if (b>j) break;
		}
	}
	if (x==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>

bool isFibonacci(int a){
	int n1 = 0;
	int n2 = 1;
	int n3;
	while(true){
		n3 = n1+n2;
		if(a==n1 || a==n2 || a==n3) return true;
		n1=n2;
		n2=n3;
		if(a<n3) return false;
	}
}

main_program{
	int M;
	cin >> M;
	int a, b=-1, n;
	bool c = true;
	for(int i = 1;i<=M;i++){
		
		cin >> a;
		if(i==1) n=a;
		if(n==0){
			if(a<b || (i>3 && a==1)){
				c = false;
				break;
			}
		}else{
		       	if(a<b || (i>2 && a==1)){
				c = false;
				break;
			}
		}
		b = a;
		if(!isFibonacci(a)){
			c = false;
			break;
		}
	}
	if(c) 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 n, num, count=0, seq, prev_seq, next_seq, check=true;
	cin >> n;
	seq=1;
	prev_seq=0;
	for(int i=0; i<n; i++){
		cin >> num;
		while(prev_seq<=num){
			if (prev_seq==num){check=true;
			}
			else {check=false;}
			next_seq=seq+prev_seq;
			prev_seq=seq;
			seq=next_seq;
		}

		if(!check){break;}
	}
	if(check){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 fibonacci(int term){
	int a=0;
	int b=1;
	int q=0;
	int final;
	if(term>1){

		while(q<term){
			final=a+b;
			a=b;
			b=final;
			q++;
		}
	}
	if(term==1){
		final=1;}

	if(term==0){
		final=0;}

	return final;}


main_program{
	int M;
	cin>> M;
	int i;
	i=0;
	bool r;
	r=true;
	for(;i<M;i++){
		int y=0;
		int number;
		cin>>number;
		while(r){
			if(number==fibonacci(y)){
				break;
			}
			if(number!=fibonacci(y)){
				y++;
			}
			if(fibonacci(y)>5000){
				r=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>
void fib(int z){
    int x=0;
    int y=1;
    while (x<=z){
        y=x+y;
        x=y-x;
    }
    if(x==z){
        cout<<"true"<<endl;
    }
    else{
        cout<<"false"<<endl;
    }
}
main_program{
    int n;
    cin>>n;
    for (int i=1; i<=n; i++){
        int a;
        cin>>a;
        fib(a);
    }
}

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 inF(int n){
	if(n==0||n==1){return true;}
	int a=0;
	int b=1;
	int c;
	c=a+b;
	while(true){
	a=b;
	b=c;
	c=a+b;
	if (n==c){return true;}
	if (c>n){return false;}}}
int main(){
	int M;
	cin>>M;
	int n;
	int a;
	int b=1;
	bool d=true;
	bool e=true;
		cin>>n;
		if(!inF(n)){d=false;}
		a=n;
		repeat(M-1){
			cin>>n;
			if(!inF(n)){
				d=false;
			}
			if(!d){break;}
			if(inF(n)) {
				if(a>n){e=false;}
				if(b==a&&a==n){e=false;}
			}
			if(!e){break;}
			b=a;
			a=n;
		}
		(d&&e)?cout<<"true"<<endl: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: 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;
                  bool done=false;
                  bool fibo=false;
                  int x=0;
                 for(int i=1 ;i<=n;i++,fibo=false){     int n1;cin>>n1;
                                                    int a=1;int b=1;
                                                     if(!fibo){
                                                           int c;
                                                         if(n1==1 && n1>=x){continue;}
                                                         c=a+b;
                                                   for(;c<=n1 && n1>=x;){if(c==n1){ fibo==true;
                                                                                     x=c;
                                                                                          break;}
                                                              a=b;
                                                              b=c;
                                                              
                                                              c=a+b; }
                                                         done=fibo;
                                                              if( n1>=x){fibo=true;}
                                                     }
                                                                      
                                                           }



                 
               
     if(done){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 {
    char c;
    int n , i ;
    bool done = false ;
    cin>>c>>n;
    n = c-48 ;
    cin >>c;
   for (i = 0;i<(n+1);cin >> c) {
        int f0 = 0;
        int f1 = 1;
        while(!done) {
            int s = f0;
            f0 = f1;
            f1 = f0 + s;
             if (c-48 ==f1 || c-48 == f0 || c-48 == s){ 
             done = true ;
             i++;}
             if ( i > n )
             break;
        }
    } 
    if (i = n )
    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