——————快速排序———————&mda 摘要:### 快排 确定一组数据 ,即q数组 左端点为了,右端点为r (1)确定分界点 q[l] 或 q[ (l + r) / 2] 或 q[r] 或任…… 文章列表 2022年12月17日 0 点赞 0 评论 354 浏览 评分:9.9
求一个C语言种树问题,用贪心算法的种树问题,最好加上详解感谢!!! 摘要:种树问题,某条街被划为n条路段,这n条路段依次编号为1…n。每个路段最多可以种一棵树。现在居民们给出了h组建议,每组建议包含三个整数b,e,t表示居民希望在路段b到e之间至少要种t棵树。这些建议所给路…… 文章列表 2022年12月15日 0 点赞 0 评论 335 浏览 评分:6.0
精品文章 求PI的两种常用方法 摘要:#求PI的两种方法 ##1. 正多边形逼近 这种方法就是祖冲之用的,不用多说了吧。 若一个正多边形的边长为b,边数为i,则当边长翻倍后, ``` i=2i b=sqrt(2-2*sqrt(…… 文章列表 2022年12月15日 0 点赞 0 评论 297 浏览 评分:9.9
插入排序 摘要: #include int main() { int n; scanf_s("%d\n", &n); int arr [20] ; …… 文章列表 2022年12月10日 0 点赞 0 评论 319 浏览 评分:0.0
如何将字符串中的大写字母转换为小写 摘要:```c //题目1124 将字符串大写字母变小写,其余的不变 //方法一 利用ASCII中字符的数值关系 #include #include int main() { char s[…… 文章列表 2022年12月07日 0 点赞 0 评论 293 浏览 评分:0.0
2到36进制转换(整数) 摘要:10进制转n进制: ```cpp void system_10_n(int num, int n) {//短除法 stack s;//定义栈 while (num > 0) {//定义…… 文章列表 2022年12月07日 0 点赞 0 评论 261 浏览 评分:9.9
笔记:自定义函数之字符提取 题目1033 摘要:```c #include #include void trs(char c[]) { char a[100]; int len=strlen(c); int t=0; for…… 文章列表 2022年12月03日 0 点赞 0 评论 253 浏览 评分:9.9
笔记:题目1025 运用for循环实现在一个顺序数组中插入数字 摘要:1.思路是反这运用赋值语句实现 ```c #include int main() { int n[10]={0},number; for(int i=0;i…… 文章列表 2022年12月03日 0 点赞 0 评论 445 浏览 评分:0.0
笔记:通过自定义函数求最大公约数,最小公倍数(等值算法) 摘要:```c //等值算法 #include int gys(int a,int b); int gbs(int m,int n); int gys(int a,int b) { int …… 文章列表 2022年11月30日 0 点赞 0 评论 179 浏览 评分:0.0
笔记: 1026 ? 摘要:```c #include int main() { int number[10]; for(int i=0;i=0;j--) printf("%d ",number[j]); …… 文章列表 2022年11月30日 0 点赞 0 评论 150 浏览 评分:0.0