题解列表
蓝桥杯算法训练-二进制数数
摘要:解题思路:利用二进制取反和与操作找到最右边1的位置,然后减掉,后面在以此类推注意事项:参考代码:#include<iostream>using namespace std;int lowbit(int……
1720: 数据结构-基数排序
摘要:解题思路:注意事项:参考代码:#include <bits/stdc++.h>using namespace std;long long tong[100000];int main(){ int……
c语言结构体练习题输入n个学生成绩输出成绩
摘要:解题思路:注意事项:在看题解的时候我发现许多写的都比较复杂,也有的使用到了指针;我这个代码比较简洁;思路如下:先定义结构体,学号和名字有字母就不能使用int;成绩一般是数字所以使用int;然后在主函数……
素数和素数和素数和素数和素数和素数和素数和素数和
摘要:#include<stdio.h>int funtion(int x);int main(){ int n,m,sum=0,i; scanf("%d %d",&n,&m); for(i=n;i<=m;……
1128: C语言训练-排序问题<1>
摘要:解题思路:注意事项:参考代码://计数排序:以空间换时间#include <bits/stdc++.h>using namespace std;long long tong[100000];int m……
自定义函数求一元二次方程(switch语句)
摘要:解题思路:根据一元二次方程求根公式的三种情况,用switch语句来判断注意事项:当求根公式<0时,i^2=-1,若为根号下的负数,可写为根号下该数的整数*i参考代码:#include<stdio.h>……
2117: 信息学奥赛一本通T1310-车厢重组
摘要:解题思路:注意事项:参考代码:#include <bits/stdc++.h>using namespace std;long long a[100000];int main(){ int n;……
1128: C语言训练-排序问题<1>
摘要:解题思路:注意事项:参考代码:#include <bits/stdc++.h>using namespace std;long long a[10];int main(){ for(int i=……