关键在于l和r的求法公式 摘要:参考代码:#include<bits/stdc++.h> using namespace std; #define int long long signed main() { int n;…… 题解列表 2024年10月07日 2 点赞 0 评论 532 浏览 评分:10.0
前缀和算法 摘要:参考代码:#include<bits/stdc++.h> using namespace std; #define int long long signed main() { int n;…… 题解列表 2024年10月07日 2 点赞 0 评论 248 浏览 评分:0.0
[食物链] 并查集 - NOI2001 提高组 摘要:# 并查集 路劲压缩 ###### 根据题目将所有的动物分为 被捕食 天敌 竞争对手 三种类型 分别存放于 并查集的 三个位置 分别求各自所属的“连通块” 思路 : 如果 1)当前的话与前面…… 题解列表 2024年10月07日 0 点赞 0 评论 257 浏览 评分:9.9
to_string的大作用 摘要:参考代码:#include<bits/stdc++.h> using namespace std; #define int long long bool haoshu(int i) { s…… 题解列表 2024年10月07日 1 点赞 0 评论 198 浏览 评分:0.0
C++使用Swap函数倒置字符串 摘要:解题思路:注意事项:参考代码:#include <iostream>using namespace std;int main(){ int num = 0;// 读入字符串长度 cin >…… 题解列表 2024年10月07日 0 点赞 0 评论 298 浏览 评分:0.0
会战兵力 是80万对60万 优势在我 摘要:解题思路:注意事项:参考代码:#include <bits/stdc++.h>using namespace std;typedef long long ll;int prime(ll x){ …… 题解列表 2024年10月07日 0 点赞 0 评论 198 浏览 评分:9.9
2825: 计算多项式的值 摘要:解题思路:注意事项:参考代码:#include <bits/stdc++.h>using namespace std;typedef long long ll;int main(){ ll n;…… 题解列表 2024年10月06日 0 点赞 0 评论 266 浏览 评分:0.0
1014: [编程入门]阶乘求和 摘要:解题思路:注意事项:参考代码:#include <bits/stdc++.h>using namespace std;typedef long long ll;int main(){ ll n,…… 题解列表 2024年10月06日 0 点赞 0 评论 517 浏览 评分:0.0
沙子合并-区间动态规划(详细注释C++) 摘要:解题思路:1995年的经典题目,采用对区间进行动态规划的思想。每次合并的代价为两堆沙子数量之和,那么最后一次合并的代价就是所有沙子数量之和,当合成进行最后一次合并的两堆沙子所用的代价最小时,总代价最小…… 题解列表 2024年10月06日 0 点赞 0 评论 300 浏览 评分:9.9
1585:链表操作 摘要:```cpp #include using namespace std; typedef struct node { int shibu; int xubu; node* n…… 题解列表 2024年10月05日 0 点赞 0 评论 148 浏览 评分:0.0