上一页 1 ··· 7 8 9 10 11 12 13 14 15 16 下一页
摘要: 1 //example_1.c2 3 #include 4 5 int main(void){6 printf("Hello World!! .\n");7 return 0;8 } 1 //example_2.c 2 #include 3 #include 4 #include 5 #include 6 #include 7 #include 8 #include 9 10 int tprintf(const char *fmt, ...){11 va_list args;12 struct tm *tstruct;13 time_t t... 阅读全文
posted @ 2013-09-17 10:04 Levi.duan 阅读(238) 评论(0) 推荐(0) 编辑
摘要: Judge InfoMemory Limit: 32768KBCase Time Limit: 10000MSTime Limit: 10000MSJudger: NormalDescriptionPlease calculate the answer of A*B, both A and B are integer.InputThe first line of input contains, the number of test cases. There is only line for each test case. It contains two integers.OutputFor e 阅读全文
posted @ 2013-09-14 11:08 Levi.duan 阅读(225) 评论(0) 推荐(0) 编辑
摘要: 题记 : 不要因为走的太远而忘记自己为什么而出发。1. 白书(算法竞赛入门经典)看完(每一句话都要读懂)2. 每次听完课把当天内容复习完(自习室10点以后复习)3. 微机实验要提前预习(把实验报告给看懂>=80%)4. 《汇编语言》 王爽 整本书要读完5. 每一次布置的作业在第一时间做完(争取课堂搞定)6. 要保证自己的作业是原创(即使惨不忍睹)7. 再有了自己的原创版本后去寻求更好的版本8. 每次写代码之前不要马上就写代码,要先整理好自己的思路(包括没一个细节)9. 记笔记(列出提纲)10. 尽量在上课时把老师讲的每一个细节都弄懂.下学期任务:课堂:数据结构、算法分析与设计、微型计算机 阅读全文
posted @ 2013-09-04 23:56 Levi.duan 阅读(185) 评论(0) 推荐(0) 编辑
摘要: 这一章习题做着很舒服,毕竟很简单。所以很有感觉。练习 2-1Write a program to determine the ranges of char , short , int , and long variables, both signed and unsigned , by printing appropriate values from standard headers and by direct computation. Harder if you compute them: determine the ranges of the various floating-point 阅读全文
posted @ 2013-09-01 00:06 Levi.duan 阅读(977) 评论(0) 推荐(0) 编辑
摘要: 第一章虽然感觉不像是个习题。但是我还是认真去做,去想,仅此而已!练习 1-1Run the "hello, world" program on your system. Experiment with leaving out parts of the program, to see what error messages you get.1 #include 2 int main(int argc, char const *argv[])3 {4 printf("Hello, world\n");5 return 0;6 }收获 : 学习一门新程序设计语 阅读全文
posted @ 2013-09-01 00:05 Levi.duan 阅读(976) 评论(0) 推荐(0) 编辑
摘要: Linux配置VNC服务安装VNC服务端#yum install vnc-server配置VNC服务参数文件编辑vncservers文件追加如下#vi /etc/sysconfig/vncsevers VNCSERVERS="1:root 2:ivvr 3:abcd " VNCSERVERARGS[1]="-name root -geometry 1280x720" VNCSERVERARGS[2]="-name ivvr -geometry 800x600" VNCSERVERARGS[3]="-name abcd -ge 阅读全文
posted @ 2013-08-29 15:57 Levi.duan 阅读(746) 评论(0) 推荐(0) 编辑
摘要: 先放下代码 回来在解释头文件:clientinfo.h1 struct CLIENTINFO{2 char myfifo[500];3 int leftarg;4 int rightarg;5 char op;6 }; 7 typedef struct CLIENTINFO CLIENTINFO, *CLINTINFOPTR;client.c 1 #include 2 #include 3 #include 4 #include 5 #include 6 #include 7 #include 8 #include "clientinfo.h" 9... 阅读全文
posted @ 2013-08-28 16:43 Levi.duan 阅读(563) 评论(0) 推荐(0) 编辑
摘要: 对于Dup2 的理解:源代码: 1 #include 2 #include 3 #include 4 #include 5 #include 6 7 #define MSGSIZE 20 8 #define READ 0 9 #define WRITE 110 11 int main(int argc, char const *argv[])12 {13 int p[2], bytes, res, c;14 char inbuf[10240];15 int pid;16 printf("%c", 11);17 if(pipe(p) == -... 阅读全文
posted @ 2013-08-28 02:43 Levi.duan 阅读(1686) 评论(1) 推荐(0) 编辑
摘要: 背景湖南师大附中成为百年名校之后,每年要接待大批的游客前来参观。学校认为大力发展旅游业,可以带来一笔可观的收入。描述学校里面有N个景点。两个景点之间可能直接有道路相连,用Dist[I,J]表示它的长度;否则它们之间没有直接的道路相连。这里所说的道路是没有规定方向的,也就是说,如果从I到J有直接的道路,那么从J到I也有,并且长度与之相等。学校规定:每个游客的旅游线路只能是一个回路(好霸道的规定)。也就是说,游客可以任取一个景点出发,依次经过若干个景点,最终回到起点。一天,Xiaomengxian决定到湖南师大附中旅游。由于他实在已经很累了,于是他决定尽量少走一些路。于是他想请你——一个优秀的程序 阅读全文
posted @ 2013-08-16 16:26 Levi.duan 阅读(393) 评论(0) 推荐(0) 编辑
摘要: 首先 先介绍一下 FLOYD算法的基本思想设d[i,j,k]是在只允许经过结点1…k的情况下i到j的最短路长度则它有两种情况(想一想,为什么):最短路经过点k,d[i,j,k]=d[i,k,k-1]+d[k,j,k-1]最短路不经过点k,d[i,j,k]=d[i,j,k-1]综合起来: d[i,j,k]=min{d[i,k,k-1]+d[k,j,k-1],d[i,j,k-1]}边界条件: d[i,j,0]=w(i,j)(不存在的边权为∞)floyd算法的流程:把k放外层循环,可以节省内存对于每个k,计算每两点的目前最短路代码(需记忆)for k:=1 to n dofor i:=1 to n 阅读全文
posted @ 2013-08-16 16:21 Levi.duan 阅读(651) 评论(0) 推荐(0) 编辑
上一页 1 ··· 7 8 9 10 11 12 13 14 15 16 下一页