#include using namespace std; int main() { int h, w; cin >> h >> w; vector in(h*w); for(int i=0;i> in[i]; sort(in.begin(), in.end()); for(int i=0;i