代码改变世界

第一次数据结构作业

2012-03-27 12:45 by 璋廊, 285 阅读, 1 推荐, 收藏, 编辑
摘要:*建立单链表;长度为n的量表;*/#include<stdio.h>#include<stdlib.h>typedef struct point //建立结构体{int data;struct point *next;}Linkpoint ,*LinkList;LinkList built(int n)//建立单链表{LinkList h,s,r;h=(LinkList)malloc(sizeof(Linkpoint));//头结点;r=h;int i;for(i=1;i<=n;i++){s=(LinkList)malloc(sizeof(Linkpoint)); 阅读全文

zoj 1002 Fire Net

2012-03-27 12:36 by 璋廊, 148 阅读, 0 推荐, 收藏, 编辑
摘要:http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemId=2Fire NetTime Limit: 2 Seconds Memory Limit: 65536 KBSuppose that we have a square city with straight streets. A map of a city is a square board with n rows and n columns, each representing a street or a piece of wall.A blockhouse is a small 阅读全文