题解 1085: A+B for Input-Output Practice (I) 摘要:`while(cin>>)`即可。 ````cpp #include using namespace std; int main(){ long long a,b; while(cin…… 题解列表 2024年02月25日 0 点赞 0 评论 489 浏览 评分:9.9
编写题解 3016: 第几项 摘要:解题思路:注意事项:参考代码:#include <bits/stdc++.h>using namespace std;int main(){ int i=0,sum=0,m; cin>>m…… 题解列表 2024年02月25日 0 点赞 0 评论 231 浏览 评分:0.0
用递归方法求阶乘 摘要:解题思路:写factorial( )函数利用递归求阶乘易知,x!=x*(x-1)!=x*(x-1)*(x-2)!=...=x*(x-1)*(x-2)*...*1因此,可以利用递归求得x!,即在fact…… 题解列表 2024年02月24日 0 点赞 0 评论 450 浏览 评分:9.9
蓝桥杯2022年第十三届决赛真题-最大数字-暴力解 摘要:解题思路:最大数字,尽量从第一位开始每一位都接近 9;如果果该位是9就不用管 1)该位 + 可增加的次数 a 是否会超过 9, 超过就可以让该位达到9,增加次数-让该位到9的次数2)该位 < 减少次数…… 题解列表 2024年02月24日 1 点赞 6 评论 1239 浏览 评分:9.9
蓝桥杯2023年第十四届省赛真题-飞机降落(暴力枚举) 基于全排列函数next_permutation 摘要:解题思路:注意事项:有题目数据范围飞机数量 n<=10,可知本问题可对所有飞机的下落顺序进行全排(最大循环次数10!*10约为3e7,可过所有样例),得到得所以方案中有一种满足即为YES。即当得到一种…… 题解列表 2024年02月23日 0 点赞 2 评论 1592 浏览 评分:9.3
冶炼金属--超快解法 摘要:解题思路:注意事项:参考代码:#include<iostream>#include<cstring>#include<algorithm>using namespace std;const int i…… 题解列表 2024年02月23日 0 点赞 0 评论 543 浏览 评分:9.9
家人们,这个题解超简单! 摘要:解题思路:将金银铜分别输入三次即可,并先输入比了多少天即可。注意事项:不能把a,b,c的输入写在外面。参考代码:#include <bits/stdc++.h>using namespace std;…… 题解列表 2024年02月23日 0 点赞 1 评论 249 浏览 评分:9.9
编写题解 2799: 奥运奖牌计数 摘要:解题思路:注意事项:参考代码:#include <bits/stdc++.h>using namespace std;int main(){ int n,jp=0,yp=0,tp=0,j,y,t…… 题解列表 2024年02月23日 0 点赞 0 评论 227 浏览 评分:0.0
编写题解 2777: 计算2的幂 摘要:解题思路:注意事项:参考代码:#include <bits/stdc++.h>using namespace std;int main(){ long long a=1,n; cin>>n…… 题解列表 2024年02月23日 0 点赞 0 评论 245 浏览 评分:0.0
蓝桥杯2023年第十四届省赛真题-三国游戏(C++) 摘要:解题思路:注意事项:参考代码:#include <iostream>#include <algorithm>using namespace std;const int N = 1e5 + 5;stru…… 题解列表 2024年02月22日 0 点赞 0 评论 999 浏览 评分:9.0