自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+

菜园

Artificial idiot

  • 博客(56)
  • 资源 (10)
  • 收藏
  • 关注

原创 Linux start

<br />这几天用mac os x 的终端g++来学c++ 编译单个文件还好,<br />编译多个文件就出错了。undefined symbols…… 开始我还以为自己的程序出错了,<br />花了一个下午终于知道:要Makefile 路还很长 keep moving

2010-08-18 20:56:00 502

原创 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 836

原创 SICP 第二章第一节 习题 2.1-2.16

sicp 2.1-2.16

2010-08-02 10:50:00 1026 2

原创 sicp 第一章 习题

SICP 1.1-1.45

2010-07-30 22:11:00 613

原创 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 930

原创 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 781

原创 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 916

原创 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 656

原创 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 1012

原创 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 676

原创 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 1129

原创 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 771

原创 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 1328

原创 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 1225 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 763 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 5643

原创 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 501

原创 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 466

原创 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 473

原创 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 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-11 20:37:00 375

原创 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 528

原创 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 419

原创 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 421

原创 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 471

原创 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 417

原创 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 424

原创 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 475

原创 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 455

原创 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 810

原创 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 607

原创 注意版本管理 啊

这次SB了!!!!今天把前几天写的程序改出bug来了,找不出来了哎   注意版本管理呀 啊啊啊啊啊啊啊啊啊啊

2010-04-29 22:26:00 393

原创 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 800

原创 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 767

原创 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 1312

原创 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 613

原创 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 1161

原创 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 538

原创 hdu 2066

第一遍总是做不出来!!!!!!!这次第一次提交tle,自己发现不了错误,网上搜别人的代码才发现问题:我是对每一对(起点,终点)均用一次dijkstra,其实只要对每个起点用一次就可以了,全部终点的信息都包含在里面了。一次dijkstra生成起点到剩余点的所有最值。我对dijkstra算法还不是很清楚呀。#include#define N 1100#define max 999999

2010-04-08 11:42:00 588

原创 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 381

church:a language for generative models

church:a language for generative models mit 人工智能 语言

2010-04-09

The Complexity of Theorem Proving Procedures

The Complexity of Theorem Proving Procedures 算法复杂度 开山之作

2010-02-20

Pattern Recognition and Machine Learning

Pattern Recognition and Machine Learning 人工智能 ai 模式识别

2010-02-12

matlab入门手册pdf下载

matlab入门手册pdf下载 MATLAB matlab入门手册pdf下载.pdf

2010-02-12

Sams teaches you emacs in 24 hours

Sams teaches you emacs in 24 hours.chm

2010-02-12

Opengl Books(Opengl Programming Guide, Opengl Reference Manual)

OpenGL 入门书 Opengl Books(Opengl Programming Guide, Opengl Reference Manual)

2010-02-12

thinking in java

classic for beginner suggest type all the code by hand

2009-08-29

python-mode.el

python-mode.el python必备 ``````````````````````````````````````````

2009-08-24

嵌入式语言精华文章集锦

嵌入式 linux C语言 面试考题 等等 有关嵌入式语言问题

2009-05-19

上海大学技术报告(飞思卡尔)

第三届飞思卡尔智能车大赛一等奖作品,摄像头组 上海大学

2009-05-07

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除