摘要: 解决办法 不能用变量来开数组,如将下面代码中int size[n+1]改为int size[40000]; #include<bits/stdc++.h> using namespace std; void solve(){ int n; cin>>n; int size[n+1]; vector< 阅读全文
posted @ 2025-03-20 20:11 C微 阅读(71) 评论(0) 推荐(0)
摘要: Problem - E - Codeforces 解题思路 可以用公式将关系表示出来,然后再进行计算,很显然任意两点对答案的 贡献是两点距离除2然后向上取整,于是有公式 \[{\lceil \frac{两点距离}{2} \rceil}=\frac{两点距离+两点距离 \%2}{2} \]故将所有点对 阅读全文
posted @ 2025-03-20 13:23 C微 阅读(43) 评论(0) 推荐(0)