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 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: Computation of the fibonacci sequence
Rating A: correctly Computes the fibonacci sequence
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: Computation of the fibonacci sequence
Rating A: correctly Computes the fibonacci sequence
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;
    bool fibo=true;
    int num,n1=0,n2=1,count=0;
    for(int i=1; i<=M; i++){
        cin>>num;
        if(num==0 && count==0){
            cin>>num;
            i++;
            count++;
        }
        else if(num==0 && count>0){
            fibo = false;
            break;
        }
        else if(num<n2){
            fibo=false;
            break;
        }
        else{
            fibo=false;
            while(num>n1){
                if(num==n2) {
                    fibo=true;
                }
                n2+=n1;
                n1=n2-n1;
            }
            if(fibo==false){
                break;
            }
        }
    }
    if(fibo){
        cout<<"true";
    }
    else{
        cout<<"false";
    }
}

Grading criterion: Computation of the fibonacci sequence
Rating A: correctly Computes the fibonacci sequence
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 Finder(int n){
    if(n==0 || n==1) return 1;
    else {
        int a0=0,a1=1,an=1;
        for(int i=0;i<=19;i++){
            an=a1+a0;
            a0=a1;
            a1=an;
            if(n==an){
                 return 1;
                 break;
            }
        }
        return 0;
    }
        
  }
  int main(){
    int num,seq;
    int Seq[19];
    cin>>num;
    bool con1,conf=true;
    for(int i=0;i<num;i++){
        cin>>seq;
        Seq[i]=seq;
        con1=Finder(seq);
        if(!con1) break;
    }
    for(int i=1;i<num;i++){
        if(Seq[i]<Seq[i-1]||(Seq[i]==Seq[i-1]&&Seq[i]==Seq[i+1])){
            conf=false;
            break;
        }
    }
    if(!con1|| !conf) cout<<"false";
    else cout<<"true";
  }

Grading criterion: Computation of the fibonacci sequence
Rating A: correctly Computes the fibonacci sequence
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>

/*  This functions returns index of fibonacci number
    It returns -1 if number not found 
    It returns 1 when (n = 1) sent for first time
    It returns 2 when (n = 1) sent after first time
*/

bool firstpass  = true;                        
int isFibonacci(int n){
    int f_minus_one = 1 , f_minus_two = 0;                  
    int index  = 1;  
    if (n == 0) return 0; 
    else if (n == 1 ){
        if (firstpass) { firstpass = false; return 1; }
        else return 2; 
    }
    else {
        while (n>f_minus_one){
            int temp = f_minus_one; 
            f_minus_one = f_minus_one+f_minus_two; 
            f_minus_two = temp; 
            index++; 
        }
        if (n==(f_minus_one)) return (index); 
        else return (-1); 
    }
}


main_program{
    int num_testcases;  cin>>num_testcases;   

    int index_of_previous_fibonacci = -1, n; 

    bool br = true; 
    repeat(num_testcases){
        cin>>n; 

        int current_index = isFibonacci(n); 
        
        if (current_index>index_of_previous_fibonacci){
            index_of_previous_fibonacci  = current_index; 
            continue; 
        }
        else{
            br = false; 
            break ; 
        }
        
    }
    if(br) cout<<"true"; 
    else cout<<"false"; 

}

Grading criterion: Computation of the fibonacci sequence
Rating A: correctly Computes the fibonacci sequence
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(void)
{
    int a = 1;
    int b = 0;
    int m;
    cin >> m;
    bool yes = true;
    for (int i=0; i<m; i++)
    {
        int x;
        cin >> x;
        if (yes)
        {
            while (x>b)
            {
                int temp = b;
                b=a+b;
                a=temp;
            }
            if (x!=b)
            {
                yes=false;
            }
            int temp = b;
            b=a+b;
            a=temp;
        }
    }
    if (yes)
    {
        cout << "true";
    }
    else
    {
        cout << "false";
    }
}

Grading criterion: Computation of the fibonacci sequence
Rating A: correctly Computes the fibonacci sequence
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){
    int a1=0;int a2=1;int temp;
    for(int i=0;i<n;++i){
    temp=a1;
    a1=a2;a2+=temp;
    }
    return temp;
}
int main(){
    int M,a;
    cin >> M;
    bool valid=true;
    bool fib=true;
    for(int i=0;i<M;++i){
        cin >> a;
        if(valid){  
            for(int k=1;k<200;++k){
                if(f(k)==a){
                    valid=true;
                    break;
                    }
                else{
                    valid=false;
                }
            }
        }
        else{fib=false;break;}
    }
    if(fib){ cout << "true";}
    else{ cout << "false";}
}

Grading criterion: Computation of the fibonacci sequence
Rating A: correctly Computes the fibonacci sequence
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 F(int a) {int k=0;
            int l=1;
            repeat (100) {int m = k+l;
            k=l;
            l=m;
            if (a==k) {F=true;} else {F=false;}}}
int main() {
    int n;
    int a, b, c;
    cin >> n;
    cin >> a >> b;
    bool F = false;
    for (int i=0; i<n-2; i++) {
        cin >> c;   
        if (a < b < c) {
            F = true;
        } else {
            F = false;
        }
        if (!F(a) && !F(b) && !F(c)) {F=false;}
        a = b;
        b = c;
    }
}
if (F) {
    cout << "true";
} else {
    cout << "false";
}

Grading criterion: Computation of the fibonacci sequence
Rating A: correctly Computes the fibonacci sequence
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 k){
    int a=1,b=1,c;
    if( (k==0) || (k==1) ) { c=1;} // c is kth term,
    else{
    for( int x=1,a=1,b=1 ; x<=(k-1) ; x++){
        c = a+b;
        a=b;
        b=c;
        }
    }
}

int pos(int i){
    int n=0;
    while(1){
        if (i==F(n)) { return n;}
        else n+=1;
    }
}

bool inFibo(int i, int k){
    for( int t=F(k) ; ; k++){
        if( i==F(k) ){ return true;}
    }
    
}


main_program{
    int m,i,k=0;
    cin >> m;
    
    while(m>0){
        cin>>i;

        if(inFibo(i,k)==false){ cout<<"false"; break;}
        else (inFibo(i,k)==true){ k = pos(i)+1 ;}

        m -= 1;
    }
    cout<<"true";
}

Grading criterion: Computation of the fibonacci sequence
Rating A: correctly Computes the fibonacci sequence
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 not_fib_check(int n, int prevt){
    int a = 0, b = 1, turns = prevt+1; 
    prevt++;
    while(prevt--){
        b += a; a = b-a;
    }
    while(a<n){
        b += a;
        a = b - a;
        turns++;
    }
    if(a==n) return turns;
    return -1;
}

main_program{
    int m; cin>>m;
    bool pass = true;
    int x, prev_turns = -1;
    for(int i=0;i<m;i++){
        cin>>x;
        if(not_fib_check(x, prev_turns) == -1){
            pass = false;
            break;
        } 
        else{
            prev_turns = not_fib_check(x, prev_turns);
        }
    }
    cout<<(pass ? "true" : "false");
}

Grading criterion: Computation of the fibonacci sequence
Rating A: correctly Computes the fibonacci sequence
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 n;
    cin >> n;
    int a = 1, b = 0; // after one fibonacci move it becomes (0, 1) as im using do-while loop
    bool is_subseq = true;
    while (n-- != 0) {
        int x;
        cin >> x;
        do {
            int tmp = b;
            b = a + b;
            a = tmp;
        } while (a < x);
        if (a != x) is_subseq = false;
    }
    cout << (is_subseq ? "true\n" : "false\n");
}

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

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

Student submission:
#include <simplecpp>

int Fibo(int n){
    int a0 = 0;
    int a1 = 1;
    int a2 = 1;
    int a3;
    for(int i=3 ; i <=n ; i++){
        a3 = a1 + a2;
        a1 = a2;
        a2 = a3;
    }
    return a3;
}

bool checkFibo (int n){
    for(int i = 0; i <= 5000 ; i++){
            if(n == Fibo(i)) return true;
        }
    if( n == 0 || n == 1) return true;
    else return false;
}
bool subSeq3(int a1, int a2, int a3){
    if(a1 > a2 || a2 > a3 || a1 > a3) return false;
    if(checkFibo(a1) == 0 || checkFibo(a2) == 0 || checkFibo(a3) == 0) return false;
    if (a1 == a2 && a2 == a3 )return false;
    if(a1!=1 && (a1==a2 || a2==a3)) return false;
    else return true;
}
bool subSeq2(int a1, int a2){
    if(a1 > a2 ) return false;
    if(checkFibo(a1) == 0 || checkFibo(a2) == 0 ) return false;
    if(a1!=1 && a1==a2) return false;
    else return true;
}
bool subSeq4(int a1, int a2, int a3, int a4){
    if(a1 > a2 || a2 > a3 || a3 > a4 || a1 >a3 || a1>a4 || a2>a4 ) return false;
    if(checkFibo(a1) == 0 || checkFibo(a2) == 0 || checkFibo(a3) == 0 || checkFibo(a4) == 0) return false;
    if ((a1 == a2 && a2 == a3) || (a1 == a2 && a2 == a4) || (a1 == a3 && a4 == a3) || (a4 == a2 && a2 == a3))return false;
    if((a1 !=1 )&&(a2!=1)&&(a3!=1)&&(a4!=1)&& (a1==a2 || a2==a3 || a3 == a4 || a1 == a3 || a1 == a4 || a2 == a4)) return false;
    else return true;
}

main_program{
    int M;
    cin >> M;
    if(M == 2){
        int a1, a2;
        cin >> a1 >> a2;
        bool ans = subSeq2(a1,a2);
        if (ans == 0) cout << "false";
        else cout << "true";
    }
    if(M == 3){
        int a1, a2, a3;
        cin >> a1 >> a2 >> a3;
        bool ans = subSeq3(a1,a2, a3);
        if (ans == 0) cout << "false";
        else cout << "true";
    }
    if(M == 4){
        int a1, a2, a3, a4;
        cin >> a1 >> a2 >> a3>> a4;
        bool ans = subSeq4(a1,a2, a3, a4);
        if (ans == 0) cout << "false";
        else cout << "true";
    }
}

Grading criterion: Computation of the fibonacci sequence
Rating A: correctly Computes the fibonacci sequence
Rating B: Some issue
Rating C: Major issue
Rating D: 0
Assigned grade: A