字符串排序 (C++代码) 摘要:解题思路:题目要求是按字符串长度排序,所以定义一个结构体存放字符串的长度,然后调用STL的sort函数实现排序即可。注意要定义一个排序规则函数。注意输入字符串前面要先吧回车吸收掉。用getchar()…… 题解列表 2019年01月25日 0 点赞 0 评论 1431 浏览 评分:3.7
C语言程序设计教程(第三版)课后习题5.7 (C语言代码)不限制位数(为通俗易懂而生——飞扬) 摘要:解题思路: 看代码注意事项: 看代码参考代码:#include<stdio.h>#include <math.h>int main(){ int n, m, count = 0; scan…… 题解列表 2019年01月25日 0 点赞 0 评论 1006 浏览 评分:0.0
优质题解 蓝桥杯算法训练VIP-黑白无常 (C++代码) 摘要:解题思路:(1) 首先判断是否可能所有人都是黑纸条。在这种情况下不可能出现x!=0&&y!=n-1 (2) 其次,所有白纸条的人说的话应该都是相同的,因为他们说的都是真…… 题解列表 2019年01月25日 0 点赞 0 评论 1433 浏览 评分:8.7
蓝桥杯算法训练VIP-暗恋 (C语言代码) 摘要:解题思路:注意事项:参考代码:#include<iostream>using namespace std;int main(){ int r,c; cin>>r>>c; string s[r]; in…… 题解列表 2019年01月25日 0 点赞 0 评论 763 浏览 评分:0.0
蓝桥杯2013年第四届真题-核桃的数量 (C++代码) 摘要:解题思路:求3个数的最小公倍数注意事项:参考代码:#include<iostream>using namespace std;int main(){ int a,b,c,i; cin>>a…… 题解列表 2019年01月25日 0 点赞 0 评论 849 浏览 评分:0.0
C语言训练-求s=a+aa+aaa+aaaa+aa...a的值 (C语言代码) 摘要:解题思路: 注意事项:输入整数及其个数的范围条件参考代码:#include <stdio.h>#include <math.h>int main(int argc, char *argv[]) { i…… 题解列表 2019年01月25日 0 点赞 0 评论 833 浏览 评分:0.0
优质题解 蓝桥杯历届试题-九宫重排 (C++代码)---------C语言-菜鸟级 摘要:解题思路: 把此类问题看成 寻最短路径问题,相当于空白格相当于起点,然后找到空白格从开始图的位置到最后目标图的位置且图中数字相同的最小步数。 寻找最小步数 ,可以用BFS来实现,涉及到状态压缩 和 查…… 题解列表 2019年01月25日 13 点赞 3 评论 2819 浏览 评分:9.1
蓝桥杯算法提高VIP-排队打水问题 (C++代码)贪心 摘要:解题思路:注意事项:参考代码:#include<iostream>#include<algorithm>using namespace std;int n, m;const int maxn = 50…… 题解列表 2019年01月25日 1 点赞 0 评论 1343 浏览 评分:8.0
蓝桥杯2013年第四届真题-核桃的数量 (C语言代码) 摘要:解题思路: 找到一个值是3的倍数且同余,那么该值就是结果QWQ注意事项: 参考代码:#include <stdio.h> int main(){ int i = 3; int a,b,c; …… 题解列表 2019年01月25日 0 点赞 0 评论 573 浏览 评分:0.0
【出圈】 (C语言代码)C语言函数模块化 摘要:解题思路:参考代码:#include<stdio.h> #include<stdlib.h> int n,m; int *a; void init(); void count_off…… 题解列表 2019年01月25日 1 点赞 0 评论 1061 浏览 评分:0.0