用筛法求之N内的素数。 -题解(C++代码) 摘要:解题思路: 筛法遍历,从2到n走一遍,是素数就输出,不是就跳过注意事项: 布尔变量的判断函数参考代码:#include <bits/stdc++.h> using namespace std; …… 题解列表 2020年08月07日 0 点赞 0 评论 926 浏览 评分:9.9
[编程入门]最大公约数与最小公倍数-简单解法(C语言代码) 摘要:解题思路:注意事项:参考代码:#include <stdio.h>int main() { int i,a,b,t; scanf("%d%d",&a,&b); if(a<b) …… 题解列表 2020年08月07日 0 点赞 0 评论 997 浏览 评分:9.9
[编程入门]字符串分类统计-题解(C语言代码) 摘要:解题思路:注意事项:注意将四个变量赋初值参考代码:#include <stdio.h>int main() { int a=0,b=0,c=0,d=0; char ch; while((ch=getc…… 题解列表 2020年08月07日 0 点赞 1 评论 1277 浏览 评分:9.9
蓝桥杯2015年第六届真题-切开字符串-题解(C语言代码) 摘要:1.正回文子串:奇数,且回文数;2.非正回文子串:偶数的回文子串,或 不是回文子串;3.整体把握:在for循环的状态下,首先将字符串s利用substr()分割两个子字符串a,b;a作为前串需求解其正回…… 题解列表 2020年08月07日 0 点赞 0 评论 2052 浏览 评分:9.9
蓝桥杯2015年第六届真题-奇怪的数列-题解(C++代码) 摘要:参考代码:#include<bits/stdc++.h> using namespace std; int main() { char s[101],k[101],*q,b; //s当前串 …… 题解列表 2020年08月07日 0 点赞 0 评论 925 浏览 评分:9.9
蓝桥杯2015年第六届真题-密文搜索-题解(C++代码)--next_permutation+暴力搜索实现 摘要:参考代码:#include<bits/stdc++.h> using namespace std; char s[20000]; bool fx(char* s1, char* s2) //暴力…… 题解列表 2020年08月07日 0 点赞 0 评论 1213 浏览 评分:9.9
蓝桥杯2015年第六届真题-切开字符串-题解(C++代码) 摘要:注意事项:看了个题解兄弟恍然大悟,我也理解错了,后串不是要偶数串,随便什么串都行,仅仅是非奇数回文,然后思路就是string的substr切割,set除从,输出最大长度就行。参考代码:#include…… 题解列表 2020年08月07日 0 点赞 0 评论 1308 浏览 评分:9.9
[编程入门]结构体之时间设计-题解(C语言代码) 摘要:参考代码:#include<stdio.h> #include<stdlib.h> struct date { int day; int month; int year; } tim…… 题解列表 2020年08月07日 0 点赞 3 评论 2329 浏览 评分:9.9
蓝桥杯历届试题-九宫重排-题解(Python代码)(双向bfs) 摘要:解题思路:根据大佬改编的注意事项:参考代码:def check(x,y): return x<3 and x>=0 and y<3 and y>=0 def toMatrix(st…… 题解列表 2020年08月08日 0 点赞 0 评论 1426 浏览 评分:9.9
蓝桥杯算法训练VIP-字符串的展开-题解(Java代码) 摘要:解题思路:规则简述 数字和字母规则相同。 1, d-e => de; e-d =>e-d 如果右大于左一个,则去掉-号,否则不变。 2, p1=1,填充小写 p1=2,填充大写 p1=…… 题解列表 2020年08月08日 0 点赞 0 评论 1264 浏览 评分:9.9