int v[1000]; int w[1000]; int m[1000][1000]; int i,j,n,C,MAXV; int x[1000];这些定义用到的是栈空间,栈没那么大啊,老兄
在int main()上面加一句using namespace std;