2816: 统计满足条件的4位数个数 摘要:解题思路:注意事项:参考代码:#include<bits/stdc++.h> using namespace std; int main() { int n,a,ans=0; cin …… 题解列表 2024年01月13日 0 点赞 0 评论 171 浏览 评分:6.0
2806: 人口增长问题 摘要:解题思路:注意事项:参考代码:#include <bits/stdc++.h>using namespace std;int main(){ double x,n; cin>>x>>n; …… 题解列表 2024年01月13日 0 点赞 0 评论 213 浏览 评分:0.0
2805: 乘方计算 摘要:解题思路:注意事项:参考代码:#include <bits/stdc++.h>using namespace std;int main(){ int a,n,sum; sum=1; …… 题解列表 2024年01月13日 0 点赞 0 评论 143 浏览 评分:0.0
2803: 整数的个数 摘要:解题思路:注意事项:参考代码:#include <iostream>using namespace std;int main(){ int k,sum1=0,sum2=0,sum3=0; …… 题解列表 2024年01月13日 0 点赞 0 评论 191 浏览 评分:0.0
2801: 奇数求和 摘要:解题思路:注意事项:参考代码:#include<bits/stdc++.h>using namespace std;int main(){ int n,m; cin>>n>>m; l…… 题解列表 2024年01月13日 1 点赞 0 评论 492 浏览 评分:10.0
2799: 奥运奖牌计数 摘要:解题思路:注意事项:参考代码:#include <iostream> using namespace std; int main(){ int n,sum1=0,sum2=0,sum3=0; …… 题解列表 2024年01月13日 0 点赞 0 评论 201 浏览 评分:0.0
2798: 整数序列的元素最大跨度值 摘要:解题思路:注意事项:最小值初值最大,最大值初值最小#include<bits/stdc++.h>using namespace std;int main(){ int n,b,c=INT_MAX…… 题解列表 2024年01月13日 0 点赞 0 评论 162 浏览 评分:0.0
dfs搜索+剪枝 摘要:对于每一个瓜有三种选择: 1)买整个瓜 2)买半个瓜,需要增加劈瓜次数 3)不买 则可以使用深度优先搜索解决, 对每个瓜的三种选择进行搜索, 解空间树是一颗完全三叉树, 时间复杂度为O(3…… 题解列表 2024年01月13日 2 点赞 9 评论 1847 浏览 评分:9.9
1318: 选课(解析:C++实现) 摘要:# 选课 ## 思路解析 这道题是很明显的有依赖背包问题,或者说是树形DP。但是,事实上这道题作完了,我还是感觉是处理了森林这样的数据结构。一开始,读完题目就反应到不是正常的树形DP,而是森林DP…… 题解列表 2024年01月13日 0 点赞 0 评论 250 浏览 评分:9.9
2823: 计算分数加减表达式的值 摘要:解题思路:注意事项: if(i%2==0)不要写错,sum-=1.0/i;和sum+=1.0/i;不要写反,printf("%.4lf",sum);格式不要写错,不要忘记写cin参考代码:#incl…… 题解列表 2024年01月13日 0 点赞 0 评论 145 浏览 评分:0.0