随笔分类 - 贪心
摘要:Another not-so-easy-for-me problem.
阅读全文
摘要:Thinking about different ways of thinking. LzyRapx "题目" 思路比较容易想到。 Observations: 每次操作过后和不变。 枚举和的因子 $x$,求至少需要多少次操作能使得每个数都能被 $x$ 整除。 关键在于「要使每个数都能被 $x$ 整除
阅读全文
摘要:$\DeclareMathOperator {\argmax}{arg\,max}$ "题目链接" 题目大意 一排 $N$ 个座位,从左到右编号 $1$ 到 $N$ 。 有 $Q$ 个预定座位的请求,第 $i$ 个请求想要预定编号从 $L_i$ 到 $R_i$ 的所有座位。 可以按任意顺序处理这 $
阅读全文
摘要:题目大意 有 $n$($1\le n\le 200000$)个变量 $x_1, x_2, \dots, x_n$,满足 \begin{equation} 0\le x_i \le a_i \label{C:0} \end{equation} 其中 $1\le a_i \le 10^6$,$a_i\i
阅读全文
摘要:"传送门" 分析 首先把 包 (package)的克数 $Q_{ij}$ 转化成区间 $[\lceil Q_{ij}/(1.1 r_i )\rceil, \lfloor Q_{ij}/(0.9 r_i)\rfloor]$。可以通过将分子、分母同乘10来避免精度问题。注意某个包对应的区间可能为空,比如
阅读全文
摘要:Classrooms "传送门" The new semester is about to begin, and finding classrooms for orientation activities is always a headache. There are $k$ classrooms
阅读全文
摘要:传送门 Windows 10 Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 694 Accepted Submission(s): 200 Pr
阅读全文
摘要:传送门 A set of n 1-dimensional items have to be packed in identical bins. All bins have exactly the same length l and each item i has length li ≤ l. We
阅读全文

浙公网安备 33010602011771号