上一页 1 ··· 18 19 20 21 22 23 24 25 26 ··· 29 下一页
摘要: 1 # include 2 # include 3 using namespace std; 4 int inorder(int i,int j) 5 { 6 if(i<=j) 7 printf("%d ",i); 8 if(2*i<=j) 9 inorder(2*i,j);10 if(2*i+1<=j)11 inorder(2*i+1,j);12 return 1;13 }14 int main()15 {16 inorder(1,5);17 }View Code 阅读全文
posted @ 2013-12-10 17:38 天天AC 阅读(222) 评论(0) 推荐(0)
摘要: 非递归算法对完全二叉树的前序遍历代码 1 # include 2 # include 3 using namespace std; 4 const int m = 100; 5 struct b 6 { 7 char data; 8 int num; 9 }se[m];10 int main()11 {12 stacks;13 int n;14 cin>>n;15 for(int i = 0;i >se[i].data;18 }19 se[0].num = 0;20 int root = se[0].num;21 ... 阅读全文
posted @ 2013-12-10 17:28 天天AC 阅读(297) 评论(0) 推荐(0)
摘要: 1 interface Car 2 { 3 // 汽车名称 4 String getName(); 5 6 // 获得汽车售价 7 int getPrice(); 8 } 9 // 宝马10 class BMW implements Car11 {12 public String getName()13 {14 return "BMW";15 }16 17 public int getPrice()18 {19 return 300000;20 }21 }22 // 奇瑞QQ23... 阅读全文
posted @ 2013-12-09 22:35 天天AC 阅读(169) 评论(0) 推荐(0)
摘要: 滑雪Time Limit: 1000MSMemory Limit: 65536KTotal Submissions: 70090Accepted: 25852DescriptionMichael 喜欢滑雪百这并不奇怪, 因为滑雪的确很刺激。可是为了获得速度,滑的区域必须向下倾斜,而且当你滑到坡底,你不得不再次走上坡或者等待升降机来载你。Michael想知道载一个 区域中最长底滑坡。区域由一个二维数组给出。数组的每个数字代表点的高度。下面是一个例子 1 2 3 4 516 17 18 19 615 24 25 20 714 23 22 21 813 12 11 10 9一个人可以从某个点... 阅读全文
posted @ 2013-12-08 18:50 天天AC 阅读(174) 评论(0) 推荐(0)
摘要: (1)为了方便编写个链接页面(以一个编的课件为例)第一个文件(read.html) 1 2 Flash content by PowerCam 3 4 5 12 13 14 Created with PowerCam, FormosaSoft 15 http://www.powercam.com.tw 16 17 18 19 20 View Code 第二个文件(index.html) 1 2 3 4 5 PowerCam Player 6 7 8 9 10 View Code 第三个文件(flash.js)1 document.write("\2 ... 阅读全文
posted @ 2013-12-08 13:56 天天AC 阅读(227) 评论(0) 推荐(0)
摘要: 以安装一个flash插件为例(1)文件一(fsplayer.dll)4d5a 9000 0300 0000 0400 0000 ffff 0000b800 0000 0000 0000 4000 0000 0000 00000000 0000 0000 0000 0000 0000 0000 00000000 0000 0000 0000 0000 0000 1801 00000e1f ba0e 00b4 09cd 21b8 014c cd21 54686973 2070 726f 6772 616d 2063 616e 6e6f7420 6265 2072 756e 2069 6e20 44 阅读全文
posted @ 2013-12-08 13:38 天天AC 阅读(1543) 评论(0) 推荐(0)
摘要: (1)第一个 1 # include 2 using namespace std; 3 struct student 4 { 5 int num; 6 char name[12]; 7 char sex; 8 int age; 9 }//stu[3] = {{1,"miao",'M',19},{2,"chuang",'F',23},{3,"hello",'M',24}};10 *st;11 struct student stu[3] = {{1,"miao",' 阅读全文
posted @ 2013-12-08 10:31 天天AC 阅读(260) 评论(0) 推荐(0)
摘要: 有一颗二叉树,最大深度为D,且所有叶子的深度都相同。所有结点从左到右从上到下的编号为1,2,3,·····,2的D次方减1。在结点1处放一个小猴 子,它会往下跑。每个内结点上都有一个开关,初始全部关闭,当每次有小猴子跑到一个开关上时,它的状态都会改变,当到达一个内结点时,如果开关关闭,小猴 子往左走,否则往右走,直到走到叶子结点。一些小猴子从结点1处开始往下跑,最后一个小猴儿会跑到哪里呢?输入输入二叉树叶子的深度D,和小猴子数目I,假设I不超过整棵树的叶子个数,D 1,则双亲为i / 2。2.若2i n,则i无左孩子。3.若2i + 1 n,则 阅读全文
posted @ 2013-12-08 09:57 天天AC 阅读(2392) 评论(0) 推荐(0)
摘要: 1 import java.util.Scanner; 2 3 public class Test13 { 4 public static void main(String[] args) { 5 Scanner scan = new Scanner(System.in); 6 int num, temp; 7 int[] arr = new int[10]; 8 int i, len; 9 10 num = scan.nextInt();11 temp = num;12 i = 0;13 while(temp > 0){14 arr[i++] ... 阅读全文
posted @ 2013-12-08 07:28 天天AC 阅读(224) 评论(0) 推荐(0)
摘要: (1)这次的课程设计,基于CS架构首先解释一下CS和BS: CS架构的优点就是基于客户机和服务器模式,大部分的运算是在客户机上运行,从而提高一定的效率,但是也因为他在客户机上运行,所以要安装客户端,也导致了软件维护和升级时的不方便,需要程序员亲自进行升级配置。 BS架构的优点在于,软件维护和升级方便,只要能上网就能升级了且在很多地方都能够直接使用软件,而不需要安装,前提是你要能登陆到服务器。 阅读全文
posted @ 2013-12-07 09:00 天天AC 阅读(1291) 评论(0) 推荐(0)
上一页 1 ··· 18 19 20 21 22 23 24 25 26 ··· 29 下一页