导航

随笔分类 -  罗马不是一天debug完的

摘要:题目: 输入一串文件名字,排序后格式化输出思路: 排序后格式化输出方案: 排序后格式化输出代码: 1 #include 2 #include 3 #include 4 5 #define MAX 100 6 #define NAME_LEN 60 7 8 void SortFile(char **file_name,int n); 9 int comp(const void *a,const void *b);10 11 int main()12 {13 int n,i,len;14 char **file_name=(char **)malloc(sizeof... 阅读全文

posted @ 2014-03-10 20:36 生存在夹缝中 阅读(362) 评论(0) 推荐(0)

摘要:题目: 给一张无向图,求其所有spf节点Sample Input1 25 43 13 23 43 501 22 33 44 55 101 22 33 44 66 32 55 100Sample OutputNetwork #1 SPF node 3 leaves 2 subnetsNetwork #2 No SPF nodesNetwork #3 SPF node 2 leaves 2 subnets SPF node 3 leaves 2 subnets思路: (明知道这道题是用图算法的一些东西做的,明知道你丫还没看图算法呢,还特么碰。果然,卡了吧,该。) 遍历去掉每个节点,计... 阅读全文

posted @ 2014-02-04 21:27 生存在夹缝中 阅读(279) 评论(0) 推荐(0)