#include
#include
using namespace std;
int main()
{
vector< vector > dp(50000, vector(4, -1));
c
Running a program with the debugger attached is always slower than without.
This must be caused by VS hooking into the new/delete calls and doing more checking when attached - or the runtime library uses IsDebuggerPresent API and does things different in that case.
You can easily try this from inside Visual Studio, start the program with Debug->Start Debugging or Debug->Start Without Debugging. Without debugging is like from command line, with exactly the same build configuration and executable.