Batch Scheduling Time Limit: 1000MS Memory Limit: 10000K Total Submissions: 4347 Accepted: 1992 Description There is a sequence of N jobs to be processed on one machine. The jobs are numbered from 1 to N, so that the sequence is 1,2,..., N. The s…
这个题目数据量很小,但是满足斜率优化的条件,可以用斜率优化dp来做. 要注意的地方,0也是一个决策点. #include <iostream> #include <cstdio> #include <cstring> using namespace std; const int maxn=1e2+9; int dp[maxn]; int a[maxn],p[maxn],sum[maxn]; int que[maxn]; bool chk1(int i,int j,int…