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 e ;
    cin>> e; 
    int a,b,c,d ;
    int prevn , p,pprevn ;  
        cin >> pprevn >> prevn >> p ; 
        if( p== prevn+ pprevn) {cout<<"true"<<endl;  }  
         else cout<< " false" ;
     if ( e==4 ) {
      cin >> a>>b>>c>>d ;
      if ( (a+b== c) && (b+c==d) ) {
        cout<< " true" << endl ; 
      }  else cout<<" false" ; 
    }  
    if ( e ==2 ) {
         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 M,a=0,b=1,c=0,n,i,k=0,t=0;
    cin>>M;
    t=M;
    while(M>0)
    {
        cin>>n;
            for(i=0;i<10;i++)
            {
                c=a+b;
                if(n==0||n==1||n==c)
                k++;
            a=b;
            b=c;
            }
            M--;
    }
    if(t==k)
    cout<<"true";
    else
    cout<<"false";
}

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

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

Student submission:
#include<simplecpp>
main_program {
	int M;
	cin>>M;
	repeat(M){
		int n;
		cin>>n;
		if (!(n==1 or n==2 or n==3 or n==5 or n==8 or n==13 or n==21 or n==34 or n== 55 or n==89 or n== 144 or n==233 or n== 377 or n==610 or n==987 or n==1597 or n==2584 or n==4181))
			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: 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,x;
    cin>>a;
    int i=0,j=1,k,t=0,m=0,n=0,o=1;
repeat(a){
    cin>>x; i=n;j=o;
    while(k<5000){
        k=j+i;
        j=k; i=j; 
        if(x==k){t++;n=j;o=k;} 
       }
    }
    if (t==a){cout<<"true";}
    else if(t<a) {cout<<"false";}
}

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

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

Student submission:
#include<simplecpp>
bool fibonacci(int n){
    int n0=0,n1=1,k=1;
    for (;k<=n;k=n1+n0){
        n1=k;n0=n1;
    }
    if (k!=n) return false ;
}
main_program{
    int M,i;
    cin>>M;
    int n1,n2,n;
    cin>>n1>>n2;
    if (fibonacci(n1)!=false&&fibonacci(n2)!=false){
        for(i=0,cin>>n;i<M-2,n=n1+n2;i++,cin>>n){
            n=n2;n2=n1;
        }
        if (i==M-3)cout<<"true";
        else cout<<"false";
    }
    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{
        cout<<no of terms<<"";
    }
    int main {
        if(
    subsequence(int t1=0 ,t2=1 ,t1++, t2++, t=t2+t1;)
    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>
  main_program {
    int M;
    cin >> M;
    int a, b;
    cin >> a >> b;
    int temp1 = a, temp2 = b; 
    int sum=0;
    if(a == 0 && b == 1) {sum = 1;} 
    else if(a == 0 && b != 1) {sum = 1;} 
    else {for(;sum<=(b-a);) {
        sum = a + b; 
        a = b; b = sum;
    }
    }
    if(sum>(b-a)) cout << "false";
    if(sum == (b-a))  {
     a = temp1; b = temp2;
    for(;(M-2)>0;M--) {
        int x; cin >> x;
        if(x!= (a + b)) cout << "false";
        else {a = b; b = x;}
    }
    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 <iostream>
using namespace std;

int fib(int n) {
        if (n>1) return (fib(n-1)+fib(n-2)) ;
        else if (n==1) return 1;
        else return 0;
}

int main() {
    bool x =false;
    int M;
    cin >> M;
    int term;
    int prevcount=0;
    int count=0;
    int checker=0;
    for (int i = 0; i<M ; i++ ) {
        if (count==prevcount) {
            if (count==1) {
                checker = 9;}
        }
        prevcount = count;
        cin >> term;
        while(true) {
            if (term==fib(count)) {
                x = true;
                break;
            }
            if (term<fib(count)) {
                cout << "false" ;
                return -1;
            }
            count = count+1;
        }
        if (count<prevcount) {
            cout << "false" ;
            return -1;
        }
        if (checker==9&&count==1) {
            cout << "false";
            return -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 f(int n) {
if( n==1)    return 0;
if( n==2) return 1;
 int k = f(n-1) + f(n-2);
 return k; }
main_program{
    int n,k=1,p=0;
    cin>>n;
    int x=1; 
 for( ;k<=n;k++,x++) {int a;
 cin>>a; 
 for( ;f(x)!=a; x++) {
if(x>a+3){ cout<<"false"; p=1;
break; 
} 
}
if(x>a+3)
break;

} if(p==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)
{   if (n==1)return 0;
    if (n==2) return 1;
     int t1 = 0; int t2 =1;
     for(int i=3; i<=n;i++){
        int temp = t2;
        t2 = t1+t2;
        t1 = temp;
     }
     return t2;
}

int main(){
    int n;
    cin >> n;
    int index=1;
    bool x = false;
    for (int i=0; i<n; i++){
        int a;
        cin>>a;
        if (a==1){
            int b;
            cin >> b;
            if (b== 1){
                n-=1;
                index = 4;
                continue;
            }
            else {n-=1;index = 3;
            
            a = b;}
        }
        if (fib(index)>a) {x = false;break;}
        for (;fib(index)<a;index++){}
        if (fib(index) != a) break;

        x = true;

    }
    if (x) 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 fib(int i,n){int k=0;
     while(k<=i) {cin>>n;int a=0;
     int b=1;
     while(true){b=a1;b1=a+b;
     a1=a;b1=b;if (n==b) break;
     }++k;} }
        
     main_program  {

     }

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 f(int n){
    if(n==1) return 0;
    if(n==2) return 1;
    if(n>=2) return (f(n-1)+f(n-2));
}
bool order(int array[],int n){
    for(int i=0;i<n-1;i++){
        if(array[i]>array[i+1]) return false;
    }
    return true;

}
main_program{
    int n;
    cin>>n;
    int array[n];
    bool array2[n]={};
    for(int i=0;i<n;i++){cin>>array[i];}
    while(true){
        if(!order(array,n)){cout<<"flase";break;}
        int t=2;
        for(int i=0;i<n;i++){
            if(array[i]==0) continue;
            for(;;t++){
                if(array[i]==f(t)){array2[i]=true;break;}
                if(!(array[i]>f(t-1) && array[i]<=f(t))) break;
                continue;
            }
        
        }
        break;
    }
    int sum=0;
    for(bool element :array2){
        sum+=(int)element;
    }
    if(sum==n-1) 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 ntermFibonacci(int n){
    if(n==0)
        return 0;
    else if(n==1)
        return 1;
        
    int n1 = 0;
    int n2 = 1;

    for(int i = 1; i<=n-1 ; i++){
        int temp = n1;
        n1 = n2;
        n2 = temp+n1;
    }
    return n2;
}

main_program{
    int M, index = 0;
    int c=0;      //to count the number of terms of sub sequence match the terms in fibonacci sequence
    cin >> M;
    
    for(int i=1;i<=M ; i++){
        int n;
        cin >> n;
        for( ; index <=19 ; index++){
            //index is not initialized back to zero since the subsequence entered will only
            //be a fibonacci subsequence if it is in the increasing order and this ensures that

            //index goes till 19 only since the 19th term is less than 5000
            //and the 20th term is greater than 5000
            //also it is given that the input numbers will be less than or equal to 5000
            if(n==ntermFibonacci(index)){
                index++;
                c++;
                break;
            }
        }
    }

    if(c==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<iostream>
using namespace std;

int fibonacci(int a){
 if(a==0)return 0;
 if(a==1)return 1;
 else {
    return (fibonacci(a-1)+fibonacci(a-2));
}
}

int main(){
    int M;
    cin>>M;
    while(M>0){
        int numbers;
        cin>>numbers;
        M--;
    }
   
   
}

Grading criterion: Output
Rating A: correctly prints the output
Rating B: Some issue
Rating C: Major issue
Rating D: 0
Assigned grade: C