摘要:
"题目链接" problem 给出一个$n,n include include include include include include include include using namespace std; typedef long long ll; const int N = 50001 阅读全文
摘要:
"题目链接" problem 给出一棵树,每个点有点权,每条边有边权。0号点为根,每个点的代价是这个点的点权$\times$该点到根路径上的边权和。 现在可以选择最多K个点。使得每个点的代价变为:这个点的点权$\times$改点到最近的被选中的一个祖先的边权和。 问所有点的代价和最小为多少。 sol 阅读全文
摘要:
"题目链接" problem 机器上有N个需要处理的任务,它们构成了一个序列。这些任务被标号为1到N,因此序列的排列为1,2,3...N。这N个任务被分成若干批,每批包含相邻的若干任务。从时刻0开始,这些任务被分批加工,第i个任务单独完成所需的时间是Ti。在每批任务开始前,机器需要启动时间S,而完成 阅读全文
摘要:
"题目链接——SPOJ" "题目链接——洛谷" problem 给出n,m和一个长度为n的数列c。求有多少个数列a满足以下条件: + $1\le a_i include include include include include include include using namespace s 阅读全文