Use C++ numeric_limits instead of INT_MAX.