3032: 扩号匹配问题 摘要:解题思路:先看一下题目,要求将不能匹配的括号在下面标出来,不能匹配的左括号用"$"标注,不能匹配的右括号用"?"标注。、例如:((ABCD(x),前面两个左括号不能匹配,所以打印出来是这样的:((AB…… 题解列表 2023年01月19日 0 点赞 0 评论 603 浏览 评分:9.9
1649: 蓝桥杯算法训练VIP-特殊的数字四十 摘要:解题思路:创建一个for循环,里面套一个for循环和一个if判断。注意事项:参考代码:for i in range(1000,10000): cnt = 0 for j in str(i)…… 题解列表 2023年01月19日 0 点赞 0 评论 372 浏览 评分:0.0
1444: 蓝桥杯2014年第五届真题-斐波那契 摘要:```cpp #include #include using namespace std; typedef long long LL; LL llmul(LL a,LL b,LL mod) …… 题解列表 2023年01月19日 1 点赞 0 评论 562 浏览 评分:9.9
3025: 踩方格(dfs) 摘要:解题思路:n不超过20,先写一个dfs爆搜。因为是二维数组,所以把只能向上、左、右走改成了向下、左、右走,起始位置在(0,50),这样向下左右走不会超过边界。先将起始位置标记为-1,表示不能返回。以走…… 题解列表 2023年01月19日 0 点赞 0 评论 557 浏览 评分:9.9
分情况讨论,画矩形啥都行 摘要:解题思路:注意事项:参考代码:#include<stdio.h>int main(){ int x,y,n,i,j; char z; scanf("%d %d %c %d",&x,&y,&z,&n);…… 题解列表 2023年01月19日 0 点赞 1 评论 486 浏览 评分:9.9
不用数组,用for直接循环 摘要:解题思路:因为第一个数字开始往后数,在for循环语句中用两个变量啊a,b,a不变,从前往后小于b即可注意事项:一定要初始i,不然不得行参考代码:#include <stdio.h>#include <…… 题解列表 2023年01月19日 0 点赞 0 评论 425 浏览 评分:0.0
while循环又来咯,这个还是除余思想 摘要:解题思路:注意事项:参考代码:#include<stdio.h>int main(){ int n,k=0; //k,1的个数 scanf("%d",&n); for(int …… 题解列表 2023年01月19日 0 点赞 0 评论 395 浏览 评分:0.0
whilewhilewhile,这个代码短,但是效率低一点,while还不熟练哈哈 摘要:解题思路:swap转换注意事项:参考代码:#include<stdio.h> int main() { int m, n, x; scanf("%d %d %d", &m, &n…… 题解列表 2023年01月19日 0 点赞 0 评论 296 浏览 评分:0.0
挺有趣的哈哈这题目,这个代码有详细解读代码长 摘要:解题思路:注意事项:参考代码:#include<stdio.h>int main(){ int m,M,n,x,i; scanf("%d %d %d",&M,&n,&x); //M为最大体力值,n为…… 题解列表 2023年01月19日 0 点赞 0 评论 386 浏览 评分:0.0
想了半天正确的while,纪念一下 摘要:解题思路:注意事项:参考代码:#include <stdio.h>int main(){ int n,i; float a,sum; while(scanf("%d",&n)!=EO…… 题解列表 2023年01月19日 0 点赞 0 评论 302 浏览 评分:0.0