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



int main(){
    cout<<"Enter number of students in class: ";
    int n;
    cin>>n;
    vector <int> stud;
    for (int i=0; i<n; i++){
        cout<<"Enter the marks of the students: ";
        int r;
        cin>>r;
        stud.push_back(r);
    }
    int max= stud[0], min= stud[0];
    for (int i=1; i<n; i++){
        if (max< stud[i]){
            max= stud[i];
            
        }
        if (min> stud[i]){
            min= stud[i];
        }
        
    }
    cout<<"the max marks scored are: "<<max<<endl<<"the min marks scored are: "<<min;
    
    
    // priority_queue<int> maxHeap;
    // priority_queue<int, vector <int>, greater<int>> minHeap;
    // for(int i=0; i<n; i++){
    //     maxHeap.push(stud[i]);
    //     minHeap.push(stud[i]);
    // }
    
    // cout<<"the max marks scored are: "<<maxHeap.top()<<endl<<"the min marks scored are: "<<minHeap.top();
    
    
    return 0;
}