Create maxsubpal.cpp