1270G

CF1270G Subset with Zero Sum

G. Subset with Zero Sum 很妙。 一开始冲着背包去想的,显然不行。 考虑他条件给的这个 \(i − n \le a_i \le i − 1\) 化简一下得到 \[1 \le i - a_i \le n \]题目要去求 \[\sum \limits_{i \in S} a_i = ......
Subset 1270G 1270 with Zero

CF1270G Subset with Zero Sum

题目链接:洛谷 或者 CF 比较朴素的题,首先观察题目条件: \[ i-n \le a_i \le i-1 \Rightarrow 1 \le i-a_i \le n \text{,所以易知 } i-a_i \text{ 必定是某一点} \]考虑构造题目所说 \[\sum_{i=x_1}^{x_{t ......
Subset 1270G 1270 with Zero
共2篇  :1/1页 首页上一页1下一页尾页