编写题解 1017: [编程入门]完数的判断 摘要:解题思路:注意事项:参考代码:#include<iostream>using namespace std;int main() { int n,sum,a; cin>>n; int list[100]…… 题解列表 2023年01月06日 0 点赞 0 评论 327 浏览 评分:0.0
角谷猜想(C++简单版本) 摘要:解题思路:注意事项:参考代码:#include<iostream>#include<algorithm>using namespace std;int main(){ int n,n1,n2; cin…… 题解列表 2023年01月06日 0 点赞 0 评论 384 浏览 评分:0.0
2152整数区间 简单贪心算法(注释很详细) 摘要: 先说改进版:在第二个for循环做了一点剪枝提升性能//贪心规则:每次都在最早出现的右端点处取一点加入集合中 /*取点之后向左扫描左端点,扫到的就判断该区间的右端点是否在该点右边 如果在的话…… 题解列表 2023年01月06日 0 点赞 0 评论 509 浏览 评分:9.9
2151活动选择 简单贪心算法(注释很详细) 摘要:注意:根据样例可知,前一个活动的结束时间可以与后一个活动的开始时间重合//贪心规则:在完成当前的活动后,礼堂选取结束时间早的活动作为下一个活动 //结束时间早,意味着等待时间与活动时间加起来短 …… 题解列表 2023年01月06日 1 点赞 0 评论 557 浏览 评分:9.9
舍罕王的失算 摘要:解题思路:注意事项:参考代码:#include<iostream>#include<math.h>using namespace std;int main(){ unsigned long long …… 题解列表 2023年01月06日 0 点赞 0 评论 387 浏览 评分:0.0
自由落体问题 摘要:参考代码:#include<iostream>#include<iomanip>using namespace std;int main(){ int i,n; float s=100,m=100; …… 题解列表 2023年01月06日 0 点赞 0 评论 312 浏览 评分:0.0
编写题解 1016: [编程入门]水仙花数判断 摘要:解题思路:注意事项:参考代码:#include<iostream>using namespace std;int main() { int x,y,z; for(int a=100; a<1000; …… 题解列表 2023年01月06日 0 点赞 0 评论 306 浏览 评分:0.0
编写题解 1015: [编程入门]求和训练 摘要:解题思路:注意事项:cout<<std::fixed<<setprecision(2)<<xxx=====cout<<setiosflags(ios::fixed)<<setprecision(2)<…… 题解列表 2023年01月06日 0 点赞 0 评论 343 浏览 评分:0.0
编写题解 1014: [编程入门]阶乘求和 摘要:解题思路:注意事项:参考代码:#include<iostream>using namespace std;int main() { int a,m; long long sum=0; cin>>a; …… 题解列表 2023年01月06日 0 点赞 0 评论 334 浏览 评分:0.0
2150拦截导弹问题 简单贪心算法(注释很详细) 摘要://贪心规则:炮弹打过来,让当前高度最低的系统去应对 //如果应对不了,就加一个系统,最后统计系统数 #include<bits/stdc++.h> int s[1005];//系统sy…… 题解列表 2023年01月06日 0 点赞 0 评论 653 浏览 评分:10.0