63102023-11-15 16:52:58almaaaFormula-1cpp11Compilation error
#include <iostream>
#include <vector>

using namespace std;

int sum(vector <int> v, int n){
    int s = 0;
    for(int i=0;i<n;i++){
        s = s+v[i];
    }
    return s;
}

int minn(vector <int> v, int n){
    int m = INT_MAX;
    for(int i=0;i<n;i++){
        if(v[i]<m) m=v[i];
    }
    return m;
}

int main(){
    int n,h,v;
    vector <int> hh,vv;
    cin>>n;

    for(int i=0;i<n;i++){
        cin>>h;
        hh.push_back(h);
    }

    for(int i=0;i<n;i++){
        cin>>v;
        vv.push_back(v);
    }

    if(sum(hh,n)<sum(vv,n)) cout<<"Hamilton\n";
    else cout<<"Verstappen\n";

    if(minn(hh,n)<minn(vv,n)) cout<<"Hamilton\n";
    else cout<<"Verstappen\n";


}
Compilation error
exit status 1
main.cpp: In function 'int minn(std::vector<int>, int)':
main.cpp:15:13: error: 'INT_MAX' was not declared in this scope
   15 |     int m = INT_MAX;
      |             ^~~~~~~
main.cpp:3:1: note: 'INT_MAX' is defined in header '<climits>'; did you forget to '#include <climits>'?
    2 | #include <vector>
  +++ |+#include <climits>
    3 | 
Exited with error status 1