摘要:
题目链接 "BZOJ3550" 题解 单纯形裸题 题意不清,每个位置最多选一次 cpp include include include include include include include include define Redge(u) for (int k = h[u],to; k; k 阅读全文
摘要:
题目链接 "BZOJ1061" 题解 今天终于用正宗的线性规划$A$了这道题 题目可以看做有$N$个限制和$M$个变量 变量$x_i$表示第$i$种志愿者的人数,对于第$i$种志愿者所能触及的那些天,$x_i$的系数都为$1$,其余为$0$ 也就是 $$ min \; z = \sum\limits 阅读全文
摘要:
"uoj179" 输入后转化为线性规划标准形式 $$max \; z = \sum\limits_{j = 1}^{n}c_jx_j$$ $$ \left\{ \begin{aligned} \sum\limits_{j = 1}^{n}a_{ij}x_j = b_j \quad i \in [1, 阅读全文
摘要:
题目链接 "BZOJ3834" 题解 容易想到对于$gcd(x,y) = D$,$d$的倍数一定存在于两个区间中 换言之 $$\lfloor \frac{a 1}{D} \rfloor include include include include include define Redge(u) f 阅读全文
摘要:
题目链接 "BZOJ3835" 题解 对于$k$,设$s[i]$为深度大于$i$的点数 $$ans = max\{i + \lceil \frac{s[i]}{k}\} \rceil$$ 最优决策一定是一开始每一层拿不满$k$个点,然后之后一直往下拿的同时通过中间层剩余的点拿满$k$个点 我们就有前 阅读全文