02 2016 档案

摘要:I 0-1字符串 对于长度为N位(N<32)的一格字符串,每一位都可能是0或1,请从小到大输出者2^N种01字符串 #include <stdio.h> #include <stdlib.h> #include <string.h> int main() { int n; scanf("%d",&n 阅读全文
posted @ 2016-02-27 21:37 我在这儿 阅读(187) 评论(0) 推荐(0) 编辑
摘要:2016-03-19 18:09:18 1.直接插入排序(straight insertion sort)思想:第一趟比较前两个数,然后把第二个数按大小插入到有序表中;第二趟对前两个数从后向前扫描,把第三个数按大小插入到有序表中;依次进行下去,进行(n-1)趟扫描以后就完成了整个排序过程属于稳定的排 阅读全文
posted @ 2016-02-15 11:45 我在这儿 阅读(361) 评论(0) 推荐(1) 编辑
摘要:已知输入整数14时,运行结果如下,试根据规律编写程序 #include <stdio.h> int t;//标记i的重复次数 //void divide(int i,int number) //{ //int k,n=number; //while(n>i) //{ // n=n-i; // if( 阅读全文
posted @ 2016-02-13 21:33 我在这儿 阅读(309) 评论(0) 推荐(0) 编辑
摘要:POJ 1067 Description 有两堆石子,数量任意,可以不同。游戏开始由两个人轮流取石子。游戏规定,每次有两种不同的取法,一是可以在任意的一堆中取走任意多的石子;二是可以在两堆中同时取走相同数量的石子。最后把石子全部取完者为胜者。现在给出初始的两堆石子的数目,如果轮到你先取,假设双方都采 阅读全文
posted @ 2016-02-11 23:24 我在这儿 阅读(313) 评论(0) 推荐(0) 编辑
摘要:eye(n)创建n阶单位矩阵 zeros(n)创建n阶0方阵 rand(m,n)创建m*n阶元素为从0到1的均匀分布的随机数矩阵 round(A)对矩阵A中所有元素进行四舍五入运算 A^-1用幂运算求解矩阵A的逆 \左除,/右除, .(点号)群运算 已知:PA=B,AQ=B P=B/A(右除), Q 阅读全文
posted @ 2016-02-08 22:17 我在这儿 阅读(303) 评论(0) 推荐(0) 编辑
摘要:以一元多项式加法运算为例: A,B可用线性链表可以表示为: “和多项式”链表如下(图中的长方框表示已经被释放的结点): #include <stdio.h> #include <stdlib.h> typedef struct Polyn{ int data; int index; struct P 阅读全文
posted @ 2016-02-03 21:24 我在这儿 阅读(4935) 评论(0) 推荐(2) 编辑
摘要:参照:http://www.cnblogs.com/bluestorm/p/3167424.html getche()接收换行时会解析成‘\r’ #include <stdio.h> #include <stdlib.h> struct list{ char data; struct list *n 阅读全文
posted @ 2016-02-03 20:36 我在这儿 阅读(326) 评论(0) 推荐(0) 编辑

喜欢请打赏

扫描二维码打赏

了解更多

点击右上角即可分享
微信分享提示