| 记录编号 | 253471 | 评测结果 | AAAAAAAAAA | 
    
        | 题目名称 | 1180.机器分配 | 最终得分 | 100 | 
    
        | 用户昵称 |  NewBee | 是否通过 | 通过 | 
    
        | 代码语言 | C++ | 运行时间 | 0.014 s | 
    
        | 提交时间 | 2016-04-22 10:44:24 | 内存使用 | 0.37 MiB | 
    
    
    
    		显示代码纯文本
		
		#include<cstdio>
#define Cu fclose(stdin);fclose(stdout);return 0;
#define Begin freopen("machinea.in","r",stdin);freopen("machinea.out","w",stdout);chul();Cu;
using namespace std;
//designed by New_Beeؼ 
const int maxn=102;
int f[maxn][maxn];
int much[maxn][maxn];
void mem();
void chul();
int main(){
	Begin; 
}
void chul(){
	mem();
	int n,m;scanf("%d%d",&m,&n);
	for(int i=1;i<=n;i++){
		for(int j=1;j<=m;j++)scanf("%d",&much[i][j]);
	}
	for(int i=1;i<=n;i++){
		for(int j=0;j<=m;j++){
			int t=0;
			for(int k=0;k<=j;k++){
				if(f[i][j]<f[i-1][k]+much[i][j-k]){
					f[i][j]=f[i-1][k]+much[i][j-k];
				}
			}
		}
	}
	printf("%d",f[n][m]);
}
void mem(){
	for(int i=0;i<maxn;i++){
		for(int j=0;j<maxn;j++){
			f[i][j]=much[i][j]=0;
		}
	}
}