[编程入门]密码破译 摘要:#include<bits/stdc++.h> using namespace std; #define IOS ios::sync_with_stdio(false) int main() …… 题解列表 2024年02月05日 1 点赞 0 评论 1003 浏览 评分:9.9
编写题解 2792: 三角形判断 摘要:解题思路:注意事项:参考代码:#include <iostream>using namespace std;int main(){ int a,b,c; cin >>a>>b>>c; …… 题解列表 2024年02月05日 0 点赞 0 评论 563 浏览 评分:0.0
编写题解 2790: 分段函数 摘要:解题思路:注意事项:参考代码#include <iostream>using namespace std;int main(){ float x,y; cin>>x; if(x>=0…… 题解列表 2024年02月05日 0 点赞 0 评论 528 浏览 评分:0.0
模拟计算器 摘要:解题思路:注意事项:参考代码:#include <iostream>using namespace std;int main(){ int a,b; char c; cin>>a>>…… 题解列表 2024年02月05日 0 点赞 0 评论 644 浏览 评分:0.0
大整数乘法C++ 摘要://大整数乘法#include <bits/stdc++.h>using namespace std;int na[2005], nb[2005], nc[4010];string mul(strin…… 题解列表 2024年02月04日 0 点赞 0 评论 689 浏览 评分:0.0
[编程入门]三个数最大值 摘要:#include<bits/stdc++.h> using namespace std; #define IOS ios::sync_with_stdio(false) int main() …… 题解列表 2024年02月04日 0 点赞 0 评论 575 浏览 评分:9.9
用do,while,不循环每个数字 解题思路:已知42为最小符合的数,42*1,42*2,42*3同样符合。因此不用1-1000每个数都循环,就可得到符合条件的数注意事项:主要方法是计算符合条件的数,不是遍历循环参考代码:#includeusingnamespacestd;intmain(){inta=42 题解列表 2024年02月04日 0 点赞 0 评论 483 浏览 评分:0.0
1011: [编程入门]最大公约数与最小公倍数 ###思路辗转相除法求`gcd`,然后`lcm=a*b/gcd`。###注意事项a*b可能爆。###代码```cpp#includeusingnamespacestd;intgcd(inta,intb){if(b==0){returna;}returngcd(b, 题解列表 2024年02月04日 0 点赞 0 评论 452 浏览 评分:9.9
树型结构 + DFS + 一点DP思想 #3144:颜色平衡树**该题解法并未优化,几乎是压线AC,重在思路。**##解题思路因为该题是关于树的,所以可以先用多叉链表构建树型结构,以便于后续算法处理。*p.s.这里使用数组记录节点位置的话,可以更高效地创建树型结构*intmain(){intn, 题解列表 2024年02月04日 0 点赞 0 评论 1286 浏览 评分:8.9
题解 1008: [编程入门]成绩评定 ###思路简单的分支结构(if、else)###代码```cpp#includeusingnamespacestd;intmain(){inta,b;cin>>a;if(a>=90){cout 题解列表 2024年02月04日 2 点赞 0 评论 1244 浏览 评分:8.0