#include "stdafx.h"
#include <iostream>
#include <fstream>
using namespace std;
const int max_n = 100;//程序支持的最多金矿数
const int max_people = 10000;//程序支持的最多人数
int n;//金矿数
int peopleTotal;//可以用于挖金子的人数
int peopleNeed[max_n];//每座金矿需要的人数
int gold[max_n];//每座金矿能够挖出来的金子数
int maxGold[max_people][max_n];//maxGold[j]保存了i个人挖前j个金矿能够得到的最大金子数,等于-1时表示未知