题解列表
蓝桥杯算法提高VIP-质因数2(和质因数1一样)
摘要:```c
#include
int main()
{
int n;
scanf("%d", &n);
int i = 0, j = 0, max = n, cnt=0;//和质因数1……
进制转换(我的怨种写法)
摘要:```c
#include
#include
int convert(char*);
int oct(int);
int main()
{
char hex[4] = { 0 ……
递归倒置字符数组(c语言)
摘要:```c
#include
#include
void reverse(char*, int, int);
int main()
{
int n = 0;
char str[100]……
最长回文串马拉车算法(Manacher)
摘要:解题思路: 假设输入字符串为 S ① 题目关键点在于 s′ = s ⊕ rev(s) 可以字符串 s 进行一次该公式反转,然后再前后拼接 01 ,生成目标字符串 S ……
蓝桥杯算法训练VIP-学生成绩(c语言)
摘要:```c
#include
#include
typedef struct student
{
char name[20];
char sex[7];
int age;
int……
2862: 字符串移位包含问题
摘要:解题思路: 核心思路时解决唯一问题,在这里采用了把比较长的字符串增加一倍的方法来解决位移问题,如:样例s1=AABCD s2=CDAA两个s1即 AABCDAABCD,如果s2在这个字符串中,即输出t……
编写题解 2808: 买房子
摘要:解题思路:程序通过输入流Scanner读取年薪N和房价增长率K,并采用了一个循环结构,每年将年薪积攒到手头的积蓄中,然后判断积蓄是否足够买房子,如果足够则输出年份并退出程序。如果到了第20年仍然买不起……