题解列表
查找最接近的元素-折半/二分查找
摘要:解题思路:折半/二分查找,必须采用顺序存储。在有序的数组中,取中间值作为比较对象,若给定值与中间记录的关键字相等,则查找成功;若给定值小于中间值记录的关键字,则在中间记录的左半区继续查找;若给定值大于……
蓝桥杯算法提高VIP-盾神与砝码称重
摘要:解题思路:注意事项:参考代码:#include <iostream>using namespace std;#define maxlen 28int n, m;int fm[maxlen]; int……
C++ string 蓝桥杯算法训练VIP-字符删除
摘要:解题思路:注意事项:参考代码:#include<iostream>
using namespace std;
int main()
{
string s;
char ……
[竞赛入门]简单的a+b
摘要:解题思路:注意事项:参考代码:#include<stdio.h>int main(){ int a=0,b=0; while(~scanf("%d%d", &a, &b)) //下面有……
[编程入门]第一个HelloWorld程序
摘要:解题思路:注意事项:参考代码:#include<stdio.h>int main(){ printf("**************************\n"); printf("He……
2848-基因相关性
摘要:解题思路:注意事项:如果本题采用gets()的输入方法,那么会一直报错,不清楚为什么。scanf()就不会报错。参考代码:#include<stdio.h>
#include<string.h>
……
2868-最长最短单词
摘要:解题思路:注意事项:请各位朋友帮忙指正,测试的时候只有91分。参考代码:struct Test{
char s[105];
int n;
};
int main(){
struct T……