- 博客(56)
- 资源 (10)
- 收藏
- 关注
原创 Linux start
<br />这几天用mac os x 的终端g++来学c++ 编译单个文件还好,<br />编译多个文件就出错了。undefined symbols…… 开始我还以为自己的程序出错了,<br />花了一个下午终于知道:要Makefile 路还很长 keep moving
2010-08-18 20:56:00 530
原创 sicp 2.3-2.5 习题
<br />2.53<br />(a b c)<br />((george))<br />((y1 y2))<br />(y1 y2)<br />#f<br />#f<br />(red shoes blue socks)<br />2.54<br />(define (equal? list1 list2)<br /> (cond ((or(null? list1)(null? list2)) (if (eq? list1 list2)<br />
2010-08-15 13:53:00 893
原创 hdu 1406
<br />#include<stdio.h>int perfect(int n){ int i,sum; sum=0; for(i=1;i<n/2+1;i++) if(n%i==0) sum+=i; if(sum==n) return 1; else return 0;}int main(){ int i,n,count,a,b,t; scanf("%d",&n); while(n--) { count=0; s
2010-07-18 18:03:00 957
原创 hdu 1161
<br />#include<stdio.h>int main(){ int i; char str[200]; while(gets(str)) { for(i=0;str[i]!='/0';i++) { if(str[i]>='A'&&str[i]<='Z') str[i]+=32; } for(i=0;str[i]!='/0';i++) { printf("%c",str[i]); } printf("/n")
2010-07-18 16:54:00 802
原创 hdu 1096
<br />#include<stdio.h>int main(){ int m,a,i,n,sum; scanf("%d",&m); while(m--) { scanf("%d",&n); sum=0; for(i=0;i<n;i++) { scanf("%d",&a); sum+=a; } printf("%d/n",sum); if(m!=0) printf("/n"); }}
2010-07-18 16:48:00 938
原创 hdu 1095
<br />#include<stdio.h><br />int main()<br />{<br /> int a,b,i,n,sum;<br /> while(scanf("%d%d",&a,&b)!=EOF)<br /> {<br /> sum=a+b;<br /> printf("%d/n/n",sum);<br /> }<br />}
2010-07-18 16:45:00 680
原创 hdu 1094
<br />#include<stdio.h>int main(){ int a,i,n,sum; while(scanf("%d",&n)!=EOF) { sum=0; for(i=0;i<n;i++) { scanf("%d",&a); sum+=a; } printf("%d/n",sum); }}
2010-07-18 16:43:00 1035
原创 hdu 1093
<br />#include<stdio.h>int main(){ int m, a,i,n,sum; scanf("%d",&m); while(m--) { scanf("%d",&n); sum=0; for(i=0;i<n;i++) { scanf("%d",&a); sum+=a; } printf("%d/n",sum); }}
2010-07-18 16:41:00 701
原创 hdu 1092
<br />#include<stdio.h>int main(){ int a,i,n,sum; while(scanf("%d",&n)&&n) { sum=0; for(i=0;i<n;i++) { scanf("%d",&a); sum+=a; } printf("%d/n",sum); }}
2010-07-18 16:39:00 1152
原创 hdu 1091
<br />#include<stdio.h>int main(){ int a,b; while(scanf("%d%d",&a,&b)&&(a!=0||b!=0)) { printf("%d/n",a+b); }}
2010-07-18 16:36:00 797
原创 hdu 1090
<br />#include<stdio.h>int main(){ int a,b,n; scanf("%d",&n); while(n--) { scanf("%d%d",&a,&b); printf("%d/n",a+b); }}
2010-07-18 16:35:00 1356
原创 hdu 1089
<br />#include<stdio.h>int main(){ int a,b; while(scanf("%d%d",&a,&b)!=EOF) { printf("%d/n",a+b); }}
2010-07-18 16:33:00 1250 1
原创 hdu 1001
<br />#include<stdio.h>int main(){ long long sum,i,m; while(scanf("%d",&m)!=EOF) { printf("%ld/n/n",m*(m+1)/2); }}<br />读懂题目是成功的一半
2010-07-18 16:31:00 785 2
原创 secure CRT的串口设置(ZZ)
<br />http://blog.sina.com.cn/s/blog_645508ba0100iypc.html<br />打开secureCRT,点击快速于连接。协议选择Serial,端口要跟你用到的端口匹配,我的是com4<br />波特率要看具体的开发板,TQ2440的是115200.数据位8,奇偶校验None,停止位1,控制流无<br /> <br />原来是波特率的问题,以为是乱码,搞了一下午
2010-07-17 16:00:00 5757
原创 simply scheme 第十五章 练习
<br />15.1<br />(define (t num)<br /> (if(= num 0)<br /> '()<br /> (accumulate word(se (t (/(- num (remainder num 2))2))<br /> (remainder num 2)))))<br />15.2<br />(define (palindrome sent)<br /> (if(or(empty? sent)(=(count sent)1))<br />
2010-07-14 21:48:00 526
原创 simply scheme 第十四章 练习
14.1Keep(define (remove-once wd sent) (cond((empty? sent)'()) ((equal? wd(first sent)) (se (bf sent))) (else (se (first sent)(remove-once wd(bf sent))))))14.2Every(define(up wd) (if(empty? wd) '() (se (u
2010-07-14 19:59:00 492
原创 simply scheme 第十三章 练习
<br /> <!-- @page { margin: 2cm } PRE.western { font-family: "DejaVu Sans Mono", monospace } PRE.cjk { font-family: "AR PL UKai CN", monospace } PRE.ctl { font-family: "DejaVu Sans Mono", monospace } P { margin-bottom: 0.21cm
2010-07-12 11:18:00 493
原创 simply scheme 第十二章 练习
<br /> <!-- @page { margin: 2cm } PRE.western { font-family: "DejaVu Sans Mono", monospace } PRE.cjk { font-family: "AR PL UKai CN", monospace } PRE.ctl { font-family: "DejaVu Sans Mono", monospace } P { margin-bottom: 0.21cm
2010-07-12 11:02:00 512
原创 simply scheme 第十一章 练习
<br /> <!-- @page { margin: 2cm } PRE.western { font-family: "DejaVu Sans Mono", monospace } PRE.cjk { font-family: "AR PL UKai CN", monospace } PRE.ctl { font-family: "DejaVu Sans Mono", monospace } P { margin-bottom: 0.21cm
2010-07-11 20:37:00 396
原创 simply scheme 第九章 练习
<br /> <!-- @page { margin: 2cm } PRE.western { font-family: "DejaVu Sans Mono", monospace } PRE.cjk { font-family: "AR PL UKai CN", monospace } PRE.ctl { font-family: "DejaVu Sans Mono", monospace } P { margin-bottom: 0.21cm
2010-07-11 12:12:00 551
原创 simply scheme 第八章 练习
<br />8.1<br />(a e i o u)<br />()<br />0<br />#f<br />(16 144 0)<br />(aioee)<br />25<br />(go d sunshi)<br />8.2<br /><br />(keep vowel? 'birthday)<br />(every first '(golden slumbers))<br />(first '(golden slumbers))<br />(every last '(little child))<br
2010-07-06 14:05:00 444
原创 simply scheme 第七章 练习
<br />7.2<br /><br />(let ((pi 3.14159) (pie '(lemon meringue)))<br /> (se '(pi is) pi '(but pie is) pie))<br />7.3<br /><br />(define (superlative adjective wd)<br /> (se (word adjective 'est) wd))<br />7.4<br />把+变为X、X变为+
2010-07-05 23:09:00 444
原创 simply scheme 第六章 练习
<br />6.1 nowhere man,3,goes<br />6.2 #t #f #f #t #t #t<br />6.3 (define (sign number)<br /> (cond ((< number 0) 'negative)<br /> ((= number 0) 'zero)<br /> (else 'positive)))<br />6.4 (define (utensil meal)<br /> (if (equal? meal 'chinese)
2010-07-05 19:04:00 501
原创 simply scheme 第五章 练习
5.1 (1)(I me mine) (2)(is empty) (3) 1234 (4) (23 45) (5) "" (6) () (7) 6 (8) ("" "") (9) 25.2 (define (f1 wd1 wd2) (sentence (bf wd1) (bf wd2)))(define (f2 wd1 wd2) (sentence (bf wd1) (bl wd2) (word (first wd1) (last wd2))))(define (f3 wd1 wd2) (se wd1
2010-07-04 13:38:00 442
原创 simply scheme 第四章 练习
4.1 (+ 8 (* 2 12))4.2 A->(B +)->(C *)4.4 (1) two return values (2) wrong expression (3) no argument (4) less argument (5) incorrect argument4.5 (define (ftoc f) (* (/ 5 9)(- f 32))) (define (ctof c) (+ 32 (* c (/ 9 5)
2010-07-04 10:55:00 454
原创 simply scheme 第三章 练习
3.1Translate the arithmetic expressions (3+4)×5 and 3+(4×5) into Scheme expressions, and into plumbing diagrams.(× (+ 3 4) 5) (+ 3 (× 4 5))3.2 How many little people does Alonzo hire in evaluating each of the following expressions:(+ 3 (* 4 5) (- 10 4)
2010-07-03 18:43:00 505
原创 simply scheme 第二章 练习
ExercisesUse the functions program for all these exercises.2.1 In each line of the following table we’ve left out one piece of information. Fill inthe missing details.function arg 1 arg 2 resultword now here nowheresentence now here (now here)first blackbi
2010-07-03 18:26:00 478
原创 simply scheme 第一章 练习+ 看书计划
话说进了大学从来没有完整地看完一本原版书,现在要努力了。simply scheme | SICP |算法导论、compilers、计算机网络、操作系统 | TAOCP先总结这些Exercises1.1 Do 20 push-ups. 做的累死我了,想当年可以做50个的,要锻炼身体了!!!1.2 Calculate 1000 factorial by hand and see if the computer got the right ans
2010-07-02 18:40:00 834
原创 the c programming language 习题 第二章
exercise2.4void squeeze(char s[],char t[]){ int i,j,k; int lens,lent; lens=strlen(s); lent=strlen(t); for(i=0,k=0;i<lens;i++) { for(j=0;j<lent;j++) if(s[i]==t[j]) break;
2010-05-07 23:39:00 632
原创 hdu1715
#include#include#define N 500int main(){ int i,j,n,p,f2[N],f1[N],f0[N]; scanf("%d",&n); while(n--) { scanf("%d",&p); memset(f0,0,sizeof(f0)); memset(f1,0,sizeof(f1)); mem
2010-04-13 15:15:00 825
原创 hdu1316
注意边界条件#include#include#define N 111int cmp(int s[],int t[]){ int i; for(i=N-1;i>=0;i--) { if(s[i]>t[i]) return 1; else if(s[i]<t[i]) return -1; } return 0;}int ma
2010-04-13 15:01:00 788
原创 hdu1063
注意边界条件,如000010之类的例外,没有. pku1001要比hdu1063弱大数真烦人,谁让我不会java呢 #include#include#define N 200int main(){ int i,j,k,flag,low,high,n,r[N],t[N],result[N]; char input[10]; while(scanf("%s%
2010-04-13 13:53:00 1336
原创 hdu 1753
注意边界条件 0#include#include#define N 440void print(int t[]){ int i,j,k,high,low; for(low=0;low<2*N;low++) if(t[low]) break; for(high=2*N-1;high>=0;high--) if(t[high]) break;
2010-04-13 13:16:00 638
原创 hdu 1047
恶心的题目1.读不懂的题目,首先我没搞清输入输出格式,不知道怎么做2.没注意边界条件 这是非常恶心的,搜索了别人的解题报告才做出这道题因为这道题丧失了A题的斗志,以至于两个星期都没有再碰onlineJudge要提高自己的抗挫折能力 #include#include#define N 110int main(){ int i,j,k,len,n,op[N]
2010-04-12 18:55:00 1191
原创 hdu 1875
prim算法,用double,我第一次用float wa,看了别人代码改成double就过了。#include#include#define N 110#define max 9999999double g[N][N];void prim(int n){ int i,j,u,flag,mark[N]; double dis[N],cost,min;
2010-04-08 11:43:00 562
原创 hdu 2066
第一遍总是做不出来!!!!!!!这次第一次提交tle,自己发现不了错误,网上搜别人的代码才发现问题:我是对每一对(起点,终点)均用一次dijkstra,其实只要对每个起点用一次就可以了,全部终点的信息都包含在里面了。一次dijkstra生成起点到剩余点的所有最值。我对dijkstra算法还不是很清楚呀。#include#define N 1100#define max 999999
2010-04-08 11:42:00 611
原创 hdu 2544
第一次一次提交成功!!hole in one 依旧是dijkstra#include#define N 110#define max 999999int g[N][N];int dijkstra(int s,int n){ int i,j,u,min,dis[N],mark[N]; for(i=0;i<n;i++) { mark[i]=0; di
2010-04-08 11:41:00 398
church:a language for generative models
2010-04-09
The Complexity of Theorem Proving Procedures
2010-02-20
Pattern Recognition and Machine Learning
2010-02-12
Opengl Books(Opengl Programming Guide, Opengl Reference Manual)
2010-02-12
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人