#include using namespace std; using ll=long long; int main(){ cin.tie(nullptr); ios::sync_with_stdio(false); ll N,M; cin>>N>>M; vector A(N); for(int i=0;i>A[i]; sort(A.begin(),A.end()); ll an=1e18; for(int i=0;i