| 记录编号 | 253505 | 评测结果 | AAAAAAAAAA | 
    
        | 题目名称 | 1180.机器分配 | 最终得分 | 100 | 
    
        | 用户昵称 |  AntiLeaf | 是否通过 | 通过 | 
    
        | 代码语言 | C++ | 运行时间 | 0.015 s | 
    
        | 提交时间 | 2016-04-22 10:55:13 | 内存使用 | 0.34 MiB | 
    
    
    
    		显示代码纯文本
		
		#include<cstdio>
#include<cstring>
#include<algorithm>
using namespace std;
const int maxn=110;
int n,w[maxn][maxn],v,f[maxn]={0};
int main(){
#define COGS
#ifdef COGS
	freopen("machinea.in","r",stdin);
	freopen("machinea.out","w",stdout);
#endif
	scanf("%d%d",&v,&n);
	for(int k=1;k<=n;k++)for(int i=1;i<=v;i++)scanf("%d",&w[k][i]);
	for(int k=1;k<=n;k++)for(int j=v;~j;j--)for(int i=1;i<=v;i++){
		if(j<i)break;
		if(f[j]<=f[j-i]+w[k][i]){
			f[j]=f[j-i]+w[k][i];
		}
	}
	printf("%d\n",f[v]);
	return 0;
}