92962024-02-20 11:18:12KristófBájital (80 pont)cpp17Compilation error
#include <iostream>
#include <vector>
#include <bits/stdc++.h>



using namespace std;

int main()
{
    int n;
    cin>>n;
    int x;
    cin>>x;
    int m;
    vector <int> menny;
    for(int i=0;i<n;i++){
        cin>>m;
        menny.push_back(m);
    }
    int meg=0;
    int i=0;
    int ism=0;
    int max;
    for(int i=0;i<n;i++)
    {
        meg+=menny[i]/x;
        max+=menny[i];
    }
    cout<<min(meg,max/(x+1))



    return 0;
}
Compilation error
exit status 1
main.cpp: In function 'int main()':
main.cpp:30:29: error: expected ';' before 'return'
   30 |     cout<<min(meg,max/(x+1))
      |                             ^
      |                             ;
......
   34 |     return 0;
      |     ~~~~~~                   
Exited with error status 1