1175: 金明的预算方案 摘要:解题思路:注意事项:参考代码:#include<iostream>using namespace std;int main(){ int n,m; cin>>n>>m; int sum=1…… 题解列表 2024年03月14日 0 点赞 0 评论 276 浏览 评分:9.9
LETTERS(经典DFS) 摘要:解题思路:注意事项:参考代码:#include<iostream> #include<cstdio> using namespace std; int r, s,t1=0,t2;//r,s表示迷…… 题解列表 2024年03月14日 0 点赞 0 评论 447 浏览 评分:10.0
简单的递归 摘要:解题思路:注意事项:注意递归的出口 和递推公式的条件参考代码:#include<cstdio>#include<iostream>#include<cstring>#include<cmath>usi…… 题解列表 2024年03月14日 0 点赞 0 评论 375 浏览 评分:0.0
c++ 找规律分奇数偶数 摘要:解题思路:注意事项:参考代码:#include<bits/stdc++.h> using namespace std; int main() { int a[10000],n; ci…… 题解列表 2024年03月14日 0 点赞 0 评论 236 浏览 评分:0.0
易理解的计算与求和 摘要:解题思路:注意事项:累计高度加到n-1;为了便于计算全部2*之后-初始高度*1;注意幂次表达用cmath的pow表示参考代码:#include<cstdio>#include<iostream>#in…… 题解列表 2024年03月14日 0 点赞 0 评论 186 浏览 评分:0.0
汉诺塔-递归问题 摘要: #include #include using namespace std; stack s[3]; void move(int x,int y){ …… 题解列表 2024年03月13日 0 点赞 0 评论 274 浏览 评分:0.0
编写题解 3034: 自然数的拆分(DFS) 摘要:解题思路:1,首先,定义了一个名为dfs的函数,该函数接受一个参数u,表示当前节点的值。2,在dfs函数内部,首先判断u是否等于0且路径长度大于1。如果满足条件,说明已经找到了一条满足条件的路径,将路…… 题解列表 2024年03月13日 0 点赞 0 评论 567 浏览 评分:8.0
1170: 能量项链(绝对的好东西) 摘要:解题思路:循环复制2倍,然后先以1为头,取n个数量的为一块,然后以2为头,取n个数量为一块.....不断循环直至一个周期,最后求出最大的。注意事项:参考代码:#include<iostream>usi…… 题解列表 2024年03月13日 1 点赞 0 评论 272 浏览 评分:9.0
C++速度功成 摘要:解题思路:将输入的数字串当作数组,利用库函数string,直接获得数组长度,然后for循环遍历数组每一个位置上的数字,输出;法二:构建一空数组,利用for循环将输入的数字串逐个拆解,从个位数依次填入数…… 题解列表 2024年03月13日 0 点赞 0 评论 259 浏览 评分:0.0
蓝桥杯算法提高VIP-质因数2(c++) 摘要:解题思路:注意事项:注意本题重复质因数不能只算一次,如输入:81,输出:3 3 3 3 ,质因数个数为4参考代码:#include<iostream>using namespace std;void …… 题解列表 2024年03月13日 0 点赞 0 评论 240 浏览 评分:0.0