啦啦啦啦啦啦-我来啃砖啦。-今天阅读得是TAOCP英文精简版。
没错,我就要挑战它
六年级 VS 《The Art of Computer Programming》
购买链接:https://wqs.jd.com/order/n_detail_v2.shtml?ufc=&deal_id=98480892758&isoldpin=0
上一篇:没有了
skip 前言
read the book by the program given next
用下面的代码来阅读此书
#include "TAOBC.h"
#include <string>
public Section::iterator section;
public void read_TAOBC(TAOBC TAOBC_book){
bool first_read=true;//is true if you are read this book first time
READ("习题说明");
start:
for(int n=1;n<=12;n++){//遍历章
Chapter c=TAOBC_book.get_chapter(n);
section=c.begin();//这是每一章(第一章)的所有节(1.1,1.2...)
if(!c.subject.interesting && n>2)continue;
//如果n<=2,不喜欢也要硬着头皮看(就是让你把卷1看完)
while(++section!=c.end){//遍历节
//begin中获取的section是1.0(所以说。++后就会变成1.1)
Section s=*section;
if(s.mark_with_*&&first_read)
continue; //首次阅读带*的章节时,跳过
READ(s.content);//读书读书
if(you_hate_math)goto execrise;//不喜欢数学就去做题
@检查数学验算
//做习题
execrise:
Execrise::iterator exe=s.execrises.begin();//题集迭代器
for(;exe!=s.execrises.end();++exe){//遍历题集
Execrise e=*exe;//当前题目
str::string ans=do_exe(e);//做题
e.answer(ans);//回答(可以和上面并成一行)
if(e.right_answer){//有些题没答案
if(e.right_answer==ans);//核对
}//核对
}//遍历题集
while(tired){//等到你不累
sleep(60*60*1000)//睡上一小时
}
}//遍历节
}//遍历章
first_read=true;
goto start;//继续读
}
我去,写太多了,下次继续
下一篇:https://blog.youkuaiyun.com/qq_43057060/article/details/94981069