modified the stack_with_min.cpp