526互联
首页
Ai
Java
Python
Android
Mysql
JavaScript
Html
CSS
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
更新时间 2024-01-05
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
更新时间 2024-01-05
共2篇 :1/1页
首页
上一页
1
下一页
尾页