3005: 糖果游戏题解 摘要:解题思路:可以把这个问题看作是一个循环分配的过程,由于是圆桌,1号和5号小朋友也是相邻的。可以利用数组来模拟每个小朋友手中的糖果数量,通过计算每个小朋友分配后的糖果情况,更新数组中的值。通过模运算对索…… 题解列表 2024年11月01日 0 点赞 0 评论 262 浏览 评分:0.0
2757: 浮点数向零舍入题解 摘要:解题思路:注意事项:参考代码:#include <iostream> #include <cmath> using namespace std; double round(double r) …… 题解列表 2024年11月01日 0 点赞 0 评论 266 浏览 评分:0.0
包会,不会你来锤我 摘要:#### 贪心策略:优先选择先结束的活动,保证每个选择子结构的最佳结果 ```cpp #include #include using namespace std; //创建结构体,结构体…… 题解列表 2024年10月31日 2 点赞 3 评论 530 浏览 评分:10.0
与7无关的数 摘要:解题思路:注意事项:参考代码:#include <iostream>#include <cmath>using namespace std;int main(){ int n; cin >…… 题解列表 2024年10月31日 0 点赞 0 评论 212 浏览 评分:7.3
最易懂的代码 摘要:解题思路:注意事项:参考代码:#include<bits/stdc++.h>using namespace std;int n,r;int arr[30];void func(int x,int st…… 题解列表 2024年10月31日 0 点赞 0 评论 399 浏览 评分:6.0
杀到这九天十地无人敢称尊,直到身边再无一人能陪我征战,叶天帝不过如此 摘要:# 不用抽象标题没人看俺题解 此题模板题就不多说了 直接看看代码 ###### AC Code: ```cpp #include #include #include #includ…… 题解列表 2024年10月30日 1 点赞 1 评论 279 浏览 评分:10.0
1762: printf基础练习题解 摘要:解题思路:注意事项:参考代码:#include <iostream> using namespace std; int main() { int a = 123456789; …… 题解列表 2024年10月30日 0 点赞 0 评论 719 浏览 评分:0.0
[信息学奥赛一本通T1547-区间和]-分块写法 摘要:# 基于**分块思想**的区间查询与单点修改问题 ## 一、题目分析 题目要求实现两个操作: 1. 单点修改:将数组中某个元素增加一个值。 2. 区间查询:查询数组中某个区间的元素和。…… 题解列表 2024年10月29日 0 点赞 0 评论 282 浏览 评分:9.9
使用sort函数排序 摘要:解题思路:使用sort函数直接排序然后相减把结果相加注意事项:参考代码:#include<bits/stdc++.h>using namespace std;bool compare(int a,in…… 题解列表 2024年10月29日 0 点赞 0 评论 376 浏览 评分:7.3
青蛙过河--大致思路 摘要:解题思路:二分 + 前缀和y: 跳跃青蛙跳到对岸,应该满足的基本条件是任意相邻的两点距离<=跳跃能力如果存在相邻的两点距离>跳跃能力,则这两点中间一定存在y区间为空区间如果任意相邻的两点距离<=跳跃能…… 题解列表 2024年10月29日 0 点赞 0 评论 397 浏览 评分:0.0