c++,整数比较的三种办法 摘要:方法1 (最简单)if-else语句#include <iostream>using namespace std;int main() { int a, b; cin >…… 题解列表 2025年10月26日 1 点赞 0 评论 224 浏览 评分:0.0
综合求和练习简单解法 摘要:解题思路:注意事项:注意小数运算的精度问题参考代码:#include<stdio.h>int main(){ int a,b,c,i,t,r,q,w; double p,e; scanf(…… 题解列表 2025年10月25日 1 点赞 0 评论 269 浏览 评分:0.0
1046:使用万能头文件+指针,简单易懂 摘要:```cpp#include //使用万能头文件,竞赛用着快,写平常的程序不要用using namesapce std;void RemoveArray(int a[],int* b,in…… 题解列表 2025年10月25日 1 点赞 0 评论 273 浏览 评分:0.0
题解 3031: 分解因数 摘要:解#include<stdio.h>int count=1;int fun(int n,int fenjieyinzi){ for(int i=fenjieyin…… 题解列表 2025年10月25日 0 点赞 0 评论 186 浏览 评分:0.0
c++利用函数封装来判断的两种方法 摘要:方法1函数带参数#include <iostream>using namespace std;string reply(int n) { if (n > 0) { return&n…… 题解列表 2025年10月25日 0 点赞 0 评论 168 浏览 评分:0.0
蓝桥杯2023年第十四届省赛真题-砍树 LCA+树上差分 摘要:解题思路:我们先把ai和bi之间的路进行差分处理,然后遍历还原,最后对几条边进行遍历,如果它被m条路径覆盖了,则统计,没有任何满…… 题解列表 2025年10月24日 0 点赞 0 评论 268 浏览 评分:0.0
蓝桥杯2023年第十四届省赛真题-景区导游 LCA+前缀和 摘要:解题思路:定义 tp[i]代表点i距离根节点的边权之和题目要求输出的是跳过点i后乘车的时间,所以可以提前求出乘车的总时间,在便利…… 题解列表 2025年10月24日 0 点赞 0 评论 156 浏览 评分:0.0
编写题解 2002: 计算数字个数(python) 摘要:解题思路:非数字转换成整型会报错,就用except跳过参考代码:str1 = input()j = 0for i in range(len(str1)): try: …… 题解列表 2025年10月24日 0 点赞 0 评论 238 浏览 评分:0.0
简单c++,计算多项式的值 摘要:#include <iostream>#include <cmath>#include <iomanip>using namespace std;int main(…… 题解列表 2025年10月24日 1 点赞 0 评论 271 浏览 评分:10.0
鸡兔同笼c++ 摘要:方法1#include <iostream>using namespace std;int main() { int a, b, x, y; cin >> x >>…… 题解列表 2025年10月24日 1 点赞 0 评论 276 浏览 评分:10.0