题解列表

筛选

链表合并(C++)

摘要:解题思路:注意事项:参考代码:#include<iostream>using namespace std;struct student{ int id; int score; student *nex……

结构体之成绩记录(C++)

摘要:解题思路:注意事项:参考代码:#include<iostream>using namespace std;struct student{ char id[20]; char name[20]; int……

伪冒泡排序(依次比较)

摘要:解题思路:类似冒泡排序。依次比较相邻的两个数a,b,将更大的数赋给b,再比较b和c,直到末位注意事项:减少了if else语句的使用。与冒泡排序区别在于只求最大值,不管比较中更小的那个数。参考代码:#……

就几行代码

摘要:解题思路:每次输入新串和之前的最长串比较,如果比之前的串长则替换进a中,直到所有串输入完毕,然后将a中最长串输出就行。注意事项:参考代码:#include<iostream>using namespa……

c++ map入门笔记

摘要:解题思路:map其中一个是键的类型第二个是值得类型first或second用法,这是因为map中的每个元素都对应一组键值对中的第一个成员称为first,第二个成员称为second.注意事项:如果是in……

蓝桥杯算法提高VIP-勾股数

摘要:解题思路:注意事项:参考代码:#include<iostream> #include<algorithm> #include<cstdio> #include<cmath> using nam……

c++计算圆周率代码

摘要:解题思路:利用迭代法计算圆周率注意事项:注意精度参考代码:#include<iostream>#include<iomanip>using namespace std;int main() { dou……

剪刀石头布

摘要:解题思路:利用if进行枚举,其余情况输出0注意事项:参考代码:#include<bits/stdc++.h>using namespace std;int main(){     int a,b;  ……