完全二叉树的权值 前缀和思想,详细注释 摘要:**利用前缀和思想 重点需要考虑到最后一层可能不满的情况orz** 代码如下: ```cpp #include #include using namespace std; int a[1…… 题解列表 2022年04月04日 0 点赞 0 评论 571 浏览 评分:9.9
1847: 字符串中间和后边*号删除 摘要:解题思路:直接看注释吧注意事项:参考代码:#include<string.h> #include<stdio.h> int fun(char *a) { int i=0;//代表…… 题解列表 2022年04月04日 0 点赞 0 评论 525 浏览 评分:9.9
蓝桥杯2018年第九届真题-耐摔指数 摘要:```cpp //打表发现后面可以利用前面——>动态规划 //由手机部数和层数两个变量决定测试次数结果——>动态规划 #include #include using namespac…… 题解列表 2022年04月05日 0 点赞 0 评论 831 浏览 评分:9.9
最大值最小值解连号区间 摘要:### 注意事项 - 这些数是1到N(没有用) - 区间[L, R] 里的所有元素(即此排列的第L个到第R个元素)递增排序后能得到一个长度为R-L+1的“连续”数列,则称这个区间连号区间。 …… 题解列表 2022年04月05日 0 点赞 0 评论 798 浏览 评分:9.9
阶乘幂数列 摘要:#include <stdio.h> #include <math.h> int main() { float x,n,k=1; double s=0; scanf("%f%f",&…… 题解列表 2022年04月05日 0 点赞 0 评论 757 浏览 评分:9.9
蓝桥杯2020年第十一届省赛真题-数字三角形 摘要:解题思路:注意事项:参考代码:#include <cstdio> #include <algorithm> int n,ans=0; int a[101][101]; int dp[101…… 题解列表 2022年04月05日 0 点赞 0 评论 670 浏览 评分:9.9
分段函数求值 摘要:解题思路:注意事项:参考代码:#include<stdio.h>int main(){ int x,y; scanf("%d",&x); if (x<10) if (x<1…… 题解列表 2022年04月05日 0 点赞 0 评论 1159 浏览 评分:9.9
简单贪心 发工资 摘要:解题思路:贪心钱要从大到小取才能取到最小的张数用两层循环,第一层为每次输入的员工,第二层为员工能选择的钱的面值注意事项:钱要从大到小排列参考代码:#include<bits/stdc++.h> us…… 题解列表 2022年04月05日 0 点赞 0 评论 808 浏览 评分:9.9
用三目运算符求最大的数 摘要:解题思路:使用三目运算符最简单,可以减少内存空间的利用,使用if判断也可以,但是步骤很繁琐注意事项:参考代码:import java.util.Scanner;public class Main { …… 题解列表 2022年04月05日 0 点赞 0 评论 969 浏览 评分:9.9