CodeGraderBench/CodeGraderBench huggingface dataset:
Problem: Write a C++ program that performs the following operations:
1. Input:
   Accept an integer 'n' representing the size of an array.
   Accept 'n' integer elements and store them in the array.
   Accept another integer 'x'.

2. Reverse Printing:
   Print the array elements in reverse order separated by spaces

3. Sum Calculation:
   Calculate and display the sum of all elements greater than 'x'

### Input Format
n
A1 A2 A3 ... An
x

### Output Format
First line: elements of the array in reverse order
Second line: sum of all elements greater than 'x'

### Constraints
'1 ≤ n ≤ 1000'
'-10^6 ≤ A[i], x ≤ 10^6'

Student submission:
#include<iostream>
#include<vector>
using namespace std;
int main(){
    int n;cin>>n;
    vector<int> A;
    for(int i=0;i<n;i++){
        int v;cin>>v;
        A.push_back(v);
    }
    for(int i=n-1;i>=0;--i){
        cout<<A[i]<<" ";
    }
    cout<<endl;
    int sum=0;int x;cin>>x;
    for(int i=0;i<n;i++){
        if(A[i]>x){sum+=A[i];}
    }
    cout<<sum<<endl;
}

Grading criterion: Traversing of the loop
Rating A: correctly traverses the loop n times

Rating B: Some issue
Rating C: Major issue
Rating D: 0
Assigned grade: A
Problem: Write a C++ program that performs the following operations:
1. Input:
   Accept an integer 'n' representing the size of an array.
   Accept 'n' integer elements and store them in the array.
   Accept another integer 'x'.

2. Reverse Printing:
   Print the array elements in reverse order separated by spaces

3. Sum Calculation:
   Calculate and display the sum of all elements greater than 'x'

### Input Format
n
A1 A2 A3 ... An
x

### Output Format
First line: elements of the array in reverse order
Second line: sum of all elements greater than 'x'

### Constraints
'1 ≤ n ≤ 1000'
'-10^6 ≤ A[i], x ≤ 10^6'

Student submission:
#include<iostream>
using namespace std;
int main(){
    int N,X,sum=0;
    cin>>N;
    int A[N];
    for(int i=0;i<N;i++){
        cin>>A[i];
    }
    cin>>X;
    for(int j=0;j<N;j++){
        cout<<A[N-1-j]<<" ";
    }
    for(int k=0;k<N;k++){
        if(A[k]>X){
            sum=sum+A[k];
        }
    }
    cout<<endl;
    cout<<sum;
}

Grading criterion: Traversing of the loop
Rating A: correctly traverses the loop n times

Rating B: Some issue
Rating C: Major issue
Rating D: 0
Assigned grade: A
Problem: Write a C++ program that performs the following operations:
1. Input:
   Accept an integer 'n' representing the size of an array.
   Accept 'n' integer elements and store them in the array.
   Accept another integer 'x'.

2. Reverse Printing:
   Print the array elements in reverse order separated by spaces

3. Sum Calculation:
   Calculate and display the sum of all elements greater than 'x'

### Input Format
n
A1 A2 A3 ... An
x

### Output Format
First line: elements of the array in reverse order
Second line: sum of all elements greater than 'x'

### Constraints
'1 ≤ n ≤ 1000'
'-10^6 ≤ A[i], x ≤ 10^6'

Student submission:
#include<iostream>
#include<vector>

using namespace::std;
int main(){
    int n;
    cin>>n;
    vector<int>v(n);
    for (int i=0;i<n;i++){
        cin>>v[i];
    }
    int x;
    cin>>x;
    for(int i=n-1;i>=0;i--){
        cout<<v[i]<<" ";
    }
    cout<<endl;
    int sum = 0;
    for (int i=0;i<n;i++){
        if(v[i]>x)
        sum+=v[i];
         }
         cout<<sum;
}

Grading criterion: Traversing of the loop
Rating A: correctly traverses the loop n times

Rating B: Some issue
Rating C: Major issue
Rating D: 0
Assigned grade: A
Problem: Write a C++ program that performs the following operations:
1. Input:
   Accept an integer 'n' representing the size of an array.
   Accept 'n' integer elements and store them in the array.
   Accept another integer 'x'.

2. Reverse Printing:
   Print the array elements in reverse order separated by spaces

3. Sum Calculation:
   Calculate and display the sum of all elements greater than 'x'

### Input Format
n
A1 A2 A3 ... An
x

### Output Format
First line: elements of the array in reverse order
Second line: sum of all elements greater than 'x'

### Constraints
'1 ≤ n ≤ 1000'
'-10^6 ≤ A[i], x ≤ 10^6'

Student submission:
#include<iostream>
using namespace std;
int main(){
    int n;
    cin>>n;
    int arr[n];
    for(int i=0;i<n;i++){
        cin>>arr[i];
    }
    int x;
    int sum=0;
    cin>>x;
    for(int j=n-1;j>=0;j--){
        cout<<arr[j]<<" ";
        if(arr[j]>x)
        sum+=arr[j];
    }    
    cout<<"\n"<<sum;
}

Grading criterion: Traversing of the loop
Rating A: correctly traverses the loop n times

Rating B: Some issue
Rating C: Major issue
Rating D: 0
Assigned grade: A
Problem: Write a C++ program that performs the following operations:
1. Input:
   Accept an integer 'n' representing the size of an array.
   Accept 'n' integer elements and store them in the array.
   Accept another integer 'x'.

2. Reverse Printing:
   Print the array elements in reverse order separated by spaces

3. Sum Calculation:
   Calculate and display the sum of all elements greater than 'x'

### Input Format
n
A1 A2 A3 ... An
x

### Output Format
First line: elements of the array in reverse order
Second line: sum of all elements greater than 'x'

### Constraints
'1 ≤ n ≤ 1000'
'-10^6 ≤ A[i], x ≤ 10^6'

Student submission:
#include<iostream>
using namespace std;
int main(){
    int n,m,sum=0;
    cin>>n;
    int arr[n]={0};
    for(int i=0;i<n;i++){
        cin>>arr[i];
    }
    cin>>m;
    for(int j=n;j>0;j--){
        cout<<arr[j-1]<<" ";
    }
    for(int k=0;k<n;k++){
        if(arr[k]>m){
            sum+=arr[k];
        }
    }
    cout<<endl;
    cout<<sum;
    return 0;
}

Grading criterion: Traversing of the loop
Rating A: correctly traverses the loop n times

Rating B: Some issue
Rating C: Major issue
Rating D: 0
Assigned grade: A
Problem: Write a C++ program that performs the following operations:
1. Input:
   Accept an integer 'n' representing the size of an array.
   Accept 'n' integer elements and store them in the array.
   Accept another integer 'x'.

2. Reverse Printing:
   Print the array elements in reverse order separated by spaces

3. Sum Calculation:
   Calculate and display the sum of all elements greater than 'x'

### Input Format
n
A1 A2 A3 ... An
x

### Output Format
First line: elements of the array in reverse order
Second line: sum of all elements greater than 'x'

### Constraints
'1 ≤ n ≤ 1000'
'-10^6 ≤ A[i], x ≤ 10^6'

Student submission:
#include<iostream>
#include<vector>
using namespace std;

int main() {
    int n;
    cin>>n;
    vector<int> v;
    for(int i=0; i<n; i++){
        int m;
        cin>>m;
        v.push_back(m);
    }
    int f;
    cin>> f;
    int sum=0;
    for (int i=0; i<n; i++){
        if(v[i]>f) {
            sum= sum + v[i];
        }
    }
    for(int i=(n-1); i>-1; i--){
        cout<<v[i]<<" ";
    }

    cout<<endl<<sum;
}

Grading criterion: Traversing of the loop
Rating A: correctly traverses the loop n times

Rating B: Some issue
Rating C: Major issue
Rating D: 0
Assigned grade: A
Problem: Write a C++ program that performs the following operations:
1. Input:
   Accept an integer 'n' representing the size of an array.
   Accept 'n' integer elements and store them in the array.
   Accept another integer 'x'.

2. Reverse Printing:
   Print the array elements in reverse order separated by spaces

3. Sum Calculation:
   Calculate and display the sum of all elements greater than 'x'

### Input Format
n
A1 A2 A3 ... An
x

### Output Format
First line: elements of the array in reverse order
Second line: sum of all elements greater than 'x'

### Constraints
'1 ≤ n ≤ 1000'
'-10^6 ≤ A[i], x ≤ 10^6'

Student submission:
#include<iostream>
using namespace std;
int main(){
    int N;
    int X;
    int sum=0;
    cin>>N;

    int arr[N];
    for(int i=0;i<N;i++){
        int inp;
        cin>>inp;
        arr[i]=inp;
    }
    cin>>X;
    for(int i=0;i<N;i++){
        cout<<arr[N-1-i];
        cout<<" ";
        if(arr[i]>X){
            sum=sum+arr[i];
        }
    }
    cout<<endl;
    cout<<sum;
}

Grading criterion: Traversing of the loop
Rating A: correctly traverses the loop n times

Rating B: Some issue
Rating C: Major issue
Rating D: 0
Assigned grade: A
Problem: Write a C++ program that performs the following operations:
1. Input:
   Accept an integer 'n' representing the size of an array.
   Accept 'n' integer elements and store them in the array.
   Accept another integer 'x'.

2. Reverse Printing:
   Print the array elements in reverse order separated by spaces

3. Sum Calculation:
   Calculate and display the sum of all elements greater than 'x'

### Input Format
n
A1 A2 A3 ... An
x

### Output Format
First line: elements of the array in reverse order
Second line: sum of all elements greater than 'x'

### Constraints
'1 ≤ n ≤ 1000'
'-10^6 ≤ A[i], x ≤ 10^6'

Student submission:
#include<iostream>
using namespace std;


int main(){
    int n;
    int x;
    int a[n];

    cin>>n;
    for(int i=0; i<=n; i++)
    {
        cin>>a[i];

    }
    int i;
    for(i=n;a[i]<n;--i)
    {
        cout<<a[n];

    }
    cin>>x;

    int sum;
    for(int j=0;j<n; j++)
    {
        if(x>a[j])
        sum=sum+a[j];
    }
    cout<<sum;

    return 0;
}

Grading criterion: Calculating sum
Rating A: correctly keeps accumulating the sum if greater than x

Rating B: Some issue
Rating C: Major issue
Rating D: 0
Assigned grade: B
Problem: Write a C++ program that performs the following operations:
1. Input:
   Accept an integer 'n' representing the size of an array.
   Accept 'n' integer elements and store them in the array.
   Accept another integer 'x'.

2. Reverse Printing:
   Print the array elements in reverse order separated by spaces

3. Sum Calculation:
   Calculate and display the sum of all elements greater than 'x'

### Input Format
n
A1 A2 A3 ... An
x

### Output Format
First line: elements of the array in reverse order
Second line: sum of all elements greater than 'x'

### Constraints
'1 ≤ n ≤ 1000'
'-10^6 ≤ A[i], x ≤ 10^6'

Student submission:
#include<iostream>
using namespace std;

int main(){
    int n;
    cin>>n;
    int arr[n];
    for(int i=0;i<n;i++){
        cin>>arr[i];
    }
    int X;
    int sum;
    cin>>X;
    for(int i=n-1;i>=0;i--){
        cout<<arr[i]<<" ";
    }
    for(int i=0;i<n;i++){
        if(arr[i]>X){
            sum=sum+arr[i];
        }
    }
    cout<<'\n';
    cout<<sum<<endl;
}

Grading criterion: Calculating sum
Rating A: correctly keeps accumulating the sum if greater than x

Rating B: Some issue
Rating C: Major issue
Rating D: 0
Assigned grade: A
Problem: Write a C++ program that performs the following operations:
1. Input:
   Accept an integer 'n' representing the size of an array.
   Accept 'n' integer elements and store them in the array.
   Accept another integer 'x'.

2. Reverse Printing:
   Print the array elements in reverse order separated by spaces

3. Sum Calculation:
   Calculate and display the sum of all elements greater than 'x'

### Input Format
n
A1 A2 A3 ... An
x

### Output Format
First line: elements of the array in reverse order
Second line: sum of all elements greater than 'x'

### Constraints
'1 ≤ n ≤ 1000'
'-10^6 ≤ A[i], x ≤ 10^6'

Student submission:
#include<iostream>
 using namespace std;
 int main() {
    int n; 
    cin>>n;
    int arr[n];
    for(int i=0;i<n;i++) {
        cin>>arr[i];
    } 
    for(int i=0;i<n/2;i++) {
       
       swap(arr[i],arr[n-i-1]);
    }
    for(int i=0;i<n;i++) {
        cout<<arr[i]<<" ";
    } 
    cout<<endl;
    int X;
    cin>>X;
    int sum=0;
    for(int i=0;i<n;i++) {
        cin>>arr[i];
        if (arr[i]>X) {
        sum+=arr[i];
        }
    } 
    cout<<sum;

}

Grading criterion: Calculating sum
Rating A: correctly keeps accumulating the sum if greater than x

Rating B: Some issue
Rating C: Major issue
Rating D: 0
Assigned grade: A
Problem: Write a C++ program that performs the following operations:
1. Input:
   Accept an integer 'n' representing the size of an array.
   Accept 'n' integer elements and store them in the array.
   Accept another integer 'x'.

2. Reverse Printing:
   Print the array elements in reverse order separated by spaces

3. Sum Calculation:
   Calculate and display the sum of all elements greater than 'x'

### Input Format
n
A1 A2 A3 ... An
x

### Output Format
First line: elements of the array in reverse order
Second line: sum of all elements greater than 'x'

### Constraints
'1 ≤ n ≤ 1000'
'-10^6 ≤ A[i], x ≤ 10^6'

Student submission:
#include<iostream>
#include<cmath>
using namespace std;

int main(){
    int N;
    cin>>N;
    int arr[N];
    for(int i=0;i<N;i++){
        cin>>arr[i];
    }
    int X;
    cin>>X;
    int sum=0;
      for(int j=0;j<N;j++){
        if(arr[j]>X){
            sum=sum+arr[j];
        }
      }
      for(int i=0;i<N;i++){
        cout<<arr[(N-1)-i]<<" ";
      }
    cout<<endl;

            
            
        
        cout<<sum;
    

    }

Grading criterion: Calculating sum
Rating A: correctly keeps accumulating the sum if greater than x

Rating B: Some issue
Rating C: Major issue
Rating D: 0
Assigned grade: A
Problem: Write a C++ program that performs the following operations:
1. Input:
   Accept an integer 'n' representing the size of an array.
   Accept 'n' integer elements and store them in the array.
   Accept another integer 'x'.

2. Reverse Printing:
   Print the array elements in reverse order separated by spaces

3. Sum Calculation:
   Calculate and display the sum of all elements greater than 'x'

### Input Format
n
A1 A2 A3 ... An
x

### Output Format
First line: elements of the array in reverse order
Second line: sum of all elements greater than 'x'

### Constraints
'1 ≤ n ≤ 1000'
'-10^6 ≤ A[i], x ≤ 10^6'

Student submission:
#include<iostream>
#include<vector>


using namespace std;

int main(){
    int n;
    cin>>n;
    int array[n];
    for(int i =0; i<n;i++){
        cin>>array[i];
    }
    
    int x;
    int sum;
    cin>>x;
    for(int i =0; i<n;i++){
        if(array[i]>x){
            sum+=array[i];
            }
    }
    for(int i=n-1;i>=0;i--){
        cout<<array[i]<<" ";
    }
   cout<<endl;
   cout<<sum;



    
}

Grading criterion: Calculating sum
Rating A: correctly keeps accumulating the sum if greater than x

Rating B: Some issue
Rating C: Major issue
Rating D: 0
Assigned grade: A
Problem: Write a C++ program that performs the following operations:
1. Input:
   Accept an integer 'n' representing the size of an array.
   Accept 'n' integer elements and store them in the array.
   Accept another integer 'x'.

2. Reverse Printing:
   Print the array elements in reverse order separated by spaces

3. Sum Calculation:
   Calculate and display the sum of all elements greater than 'x'

### Input Format
n
A1 A2 A3 ... An
x

### Output Format
First line: elements of the array in reverse order
Second line: sum of all elements greater than 'x'

### Constraints
'1 ≤ n ≤ 1000'
'-10^6 ≤ A[i], x ≤ 10^6'

Student submission:
#include<iostream>
using namespace std;
int main() {
    int n,x;
    cin >> n;
    int a[n];
    for(int i=0;i<n;i++){
     cin >> a[i];
    }
       cin >> x;
          for(int j=n-1;j>=0;j--){
          cout<<a[j]<<" ";
          }
          cout << endl;
        int sum=0;
        for(int k=0;k<n;k++)
            if(a[k]>x)
            sum = sum+a[k];
                cout << sum << endl;
}

Grading criterion: Calculating sum
Rating A: correctly keeps accumulating the sum if greater than x

Rating B: Some issue
Rating C: Major issue
Rating D: 0
Assigned grade: A
Problem: Write a C++ program that performs the following operations:
1. Input:
   Accept an integer 'n' representing the size of an array.
   Accept 'n' integer elements and store them in the array.
   Accept another integer 'x'.

2. Reverse Printing:
   Print the array elements in reverse order separated by spaces

3. Sum Calculation:
   Calculate and display the sum of all elements greater than 'x'

### Input Format
n
A1 A2 A3 ... An
x

### Output Format
First line: elements of the array in reverse order
Second line: sum of all elements greater than 'x'

### Constraints
'1 ≤ n ≤ 1000'
'-10^6 ≤ A[i], x ≤ 10^6'

Student submission:
#include<iostream>
using namespace std ;
int main(){
    int n;
    cin >> n;
    int arr[n];
    for(int i=0;i<n;i++){
        cin >> arr[i];
    }
    int x;
    cin >> x;
    for(int i=n-1;i>=0;i--){
        cout << arr[i] << " " ;
    }
    cout << endl;
    int sum=0;
    for(int i=0;i<n;i++){
        if(arr[i] > x){
            sum = sum + arr[i] ;
        }
    }
    cout << sum << endl;

}

Grading criterion: Calculating sum
Rating A: correctly keeps accumulating the sum if greater than x

Rating B: Some issue
Rating C: Major issue
Rating D: 0
Assigned grade: A
Problem: Write a C++ program that performs the following operations:
1. Input:
   Accept an integer 'n' representing the size of an array.
   Accept 'n' integer elements and store them in the array.
   Accept another integer 'x'.

2. Reverse Printing:
   Print the array elements in reverse order separated by spaces

3. Sum Calculation:
   Calculate and display the sum of all elements greater than 'x'

### Input Format
n
A1 A2 A3 ... An
x

### Output Format
First line: elements of the array in reverse order
Second line: sum of all elements greater than 'x'

### Constraints
'1 ≤ n ≤ 1000'
'-10^6 ≤ A[i], x ≤ 10^6'

Student submission:
#include<iostream>
using namespace std;

int main(){
    int n; cin >> n;
    int arr[n];
    for(int i=0; i<n; ++i) cin >> arr[i];
    int X, sum=0; cin >> X;
    for(int i=n-1; i>=0; --i){
        cout << arr[i] << " ";
        if(arr[i]>X) sum+=arr[i];
    }
    cout << endl << sum;
    return 0;
}

Grading criterion: Calculating sum
Rating A: correctly keeps accumulating the sum if greater than x

Rating B: Some issue
Rating C: Major issue
Rating D: 0
Assigned grade: A
Problem: Write a C++ program that performs the following operations:
1. Input:
   Accept an integer 'n' representing the size of an array.
   Accept 'n' integer elements and store them in the array.
   Accept another integer 'x'.

2. Reverse Printing:
   Print the array elements in reverse order separated by spaces

3. Sum Calculation:
   Calculate and display the sum of all elements greater than 'x'

### Input Format
n
A1 A2 A3 ... An
x

### Output Format
First line: elements of the array in reverse order
Second line: sum of all elements greater than 'x'

### Constraints
'1 ≤ n ≤ 1000'
'-10^6 ≤ A[i], x ≤ 10^6'

Student submission:
#include<iostream>;
using namespace std;
int main(){
    int n,x,s=0;
    cin >> n;
    int A[n];
    for(int i=0;i<n;i++){
        cin >> A[i];
    }
    cin >> x;
    for(int i=0;i<n;i++){
        cout << A[n-1-i] << " ";
        if(A[i]>x){
            s=s+A[i];
        }
    }
     cout << endl << s;
}

Grading criterion: Calculating sum
Rating A: correctly keeps accumulating the sum if greater than x

Rating B: Some issue
Rating C: Major issue
Rating D: 0
Assigned grade: A
Problem: Write a C++ program that performs the following operations:
1. Input:
   Accept an integer 'n' representing the size of an array.
   Accept 'n' integer elements and store them in the array.
   Accept another integer 'x'.

2. Reverse Printing:
   Print the array elements in reverse order separated by spaces

3. Sum Calculation:
   Calculate and display the sum of all elements greater than 'x'

### Input Format
n
A1 A2 A3 ... An
x

### Output Format
First line: elements of the array in reverse order
Second line: sum of all elements greater than 'x'

### Constraints
'1 ≤ n ≤ 1000'
'-10^6 ≤ A[i], x ≤ 10^6'

Student submission:
#include<iostream>
using namespace std;
int main(){

int N,X,B=0;
cin>>N;
int arr[N];
for(int j=0;j<N;j++)
{
cin>>arr[j];

}
cin>>X;

for(int h=N-1;h>=0;h--)
{
    cout<<arr[h]<<" ";

}
for(int y=0;y<N;y++)
{
    if(arr[y]>X)
    {
        B=B+arr[y];
    }
    

}
cout<<endl<<B<<endl;
return 0;
}

Grading criterion: Calculating sum
Rating A: correctly keeps accumulating the sum if greater than x

Rating B: Some issue
Rating C: Major issue
Rating D: 0
Assigned grade: A
Problem: Write a C++ program that performs the following operations:
1. Input:
   Accept an integer 'n' representing the size of an array.
   Accept 'n' integer elements and store them in the array.
   Accept another integer 'x'.

2. Reverse Printing:
   Print the array elements in reverse order separated by spaces

3. Sum Calculation:
   Calculate and display the sum of all elements greater than 'x'

### Input Format
n
A1 A2 A3 ... An
x

### Output Format
First line: elements of the array in reverse order
Second line: sum of all elements greater than 'x'

### Constraints
'1 ≤ n ≤ 1000'
'-10^6 ≤ A[i], x ≤ 10^6'

Student submission:
#include<iostream>
using namespace std ;

 int main() {
 int i,j,N,X,k;

 cin >> N ;
 int arr[N];
for(i=0;i<=N;i++){
    cin >> arr[i];
}
cin >> X;

     for(j=N;j>0;j--) {
        cout << arr[j] << " ";
     }
     int sum=0;
   for(k=0;k<=N;k++) {
    if(arr[k]>X) {
        sum= sum+arr[k];
    }
   }
   cout << sum << endl;
 }

Grading criterion: Calculating sum
Rating A: correctly keeps accumulating the sum if greater than x

Rating B: Some issue
Rating C: Major issue
Rating D: 0
Assigned grade: A
Problem: Write a C++ program that performs the following operations:
1. Input:
   Accept an integer 'n' representing the size of an array.
   Accept 'n' integer elements and store them in the array.
   Accept another integer 'x'.

2. Reverse Printing:
   Print the array elements in reverse order separated by spaces

3. Sum Calculation:
   Calculate and display the sum of all elements greater than 'x'

### Input Format
n
A1 A2 A3 ... An
x

### Output Format
First line: elements of the array in reverse order
Second line: sum of all elements greater than 'x'

### Constraints
'1 ≤ n ≤ 1000'
'-10^6 ≤ A[i], x ≤ 10^6'

Student submission:
#include<iostream>
using namespace std;
int main()
{
    int n;
    cin>>n;
    int inputs[n]={};
    for(int i=0;i<n;i++)
    {
        cin>>inputs[i];
    }
    
    int X;
    cin>>X;
    int sum=0;
    for(int k=0;k<n;k++)
    {
        if(inputs[k]>X)
        {
            sum+=inputs[k];
        }
    }
    for(int j=(n-1);j>=0;j--)
    {
        cout<<inputs[j]<<" ";
    }
    cout<<endl;
    cout<<sum<<endl;
}

Grading criterion: Calculating sum
Rating A: correctly keeps accumulating the sum if greater than x

Rating B: Some issue
Rating C: Major issue
Rating D: 0
Assigned grade: A
Problem: Write a C++ program that performs the following operations:
1. Input:
   Accept an integer 'n' representing the size of an array.
   Accept 'n' integer elements and store them in the array.
   Accept another integer 'x'.

2. Reverse Printing:
   Print the array elements in reverse order separated by spaces

3. Sum Calculation:
   Calculate and display the sum of all elements greater than 'x'

### Input Format
n
A1 A2 A3 ... An
x

### Output Format
First line: elements of the array in reverse order
Second line: sum of all elements greater than 'x'

### Constraints
'1 ≤ n ≤ 1000'
'-10^6 ≤ A[i], x ≤ 10^6'

Student submission:
#include<bits/stdc++.h>
using namespace std;

int main()
{
int n; // the vector size;
cin>> n;
vector<int> v;
for(int i=0;i<n;i++){
int x;
cin>> x;
v.push_back(x);
}

int t;
cin>> t; //the greater
for(int i=n-1;i>=0;i--){
    cout<< v[i]<< " ";
}
cout<< endl;
int sum=0;
for(int i=0;i<n;i++){
   if(v[i]>t){
           sum=sum+v[i];
   }
}
cout<< sum;
}

Grading criterion: Calculating sum
Rating A: correctly keeps accumulating the sum if greater than x

Rating B: Some issue
Rating C: Major issue
Rating D: 0
Assigned grade: A