CodeMap

慎言笃行

导航

2006年11月23日 #

[网游计划第九、十天]能力有限,做些小品

摘要: 夜深了,前些天的疲惫一下缓不过来,也只能做些容易题跑个量了,越做越觉得算法是我所不足了,确实应该加强。 1188是道容易的题,主要是计数加排序: 阅读全文

posted @ 2006-11-23 23:36 wqlblogger 阅读(179) 评论(2) 推荐(0) 编辑

[备忘]一个二维数组的冒泡排序

摘要: 对二维数组Map的第二列进行排序 int Map[100][2]; void BubbleSort(int low,int high){ int i,j,ii; int exchange; int Temp ; for(i = low;i =i;j--) { if(map[j+1][1] < map[j][1]) ... 阅读全文

posted @ 2006-11-23 23:03 wqlblogger 阅读(886) 评论(2) 推荐(0) 编辑

编程之道 The Tao Of Programming

摘要: Price Wang's programmer was coding software. His fingers danced upon the keyboard. The program compiled without an error message, and the program ran like a gentle wind. 编程大师编写软件时,手指在键盘上快速飞舞。程序编译时没有一条错误信息,程序运行起来就象一阵微风吹过。 Excellent!" the Price exclaimed, "Your technique is faultless!" “太精彩了!你的技巧已经无可挑剔了。” "Technique?" said the programmer, turning from his terminal, "What I follow is the Tao -- beyond all technique. When I first began to program I would see before me the w 阅读全文

posted @ 2006-11-23 20:10 wqlblogger 阅读(400) 评论(0) 推荐(0) 编辑

递归的实质

摘要: 递归是利用系统的堆栈保存函数当中的局部变量来解决问题的 要转换成为非递归,两步工作 第一步 可以自己建立一个堆栈保存这些局部变量,替换系统栈;第二步把对递归的调用转变为循环处理就可以了。 阅读全文

posted @ 2006-11-23 10:50 wqlblogger 阅读(378) 评论(4) 推荐(0) 编辑