#include #include using namespace std; int min(int x, int y){ if (x> N >> M; vector X(N), Y(M); for (int i=0; i> X[i]; for (int j=0; j> Y[j]; int infty=1001001001; int z=0; for (auto x:X){ z=infty; for (auto y:Y){ if (x