首页 > 其他分享 >Programming abstractions in C阅读笔记:p176-p178

Programming abstractions in C阅读笔记:p176-p178

时间:2023-10-10 21:32:00浏览次数:38  
标签:p178 function given abstractions Programming sth wrapper https

《Programming Abstractions In C》学习第59天,p176-p178总结。

一、技术总结

1.addtive sequences

tn = tn-1 + tn-2

序列:3, 7, 10, 17, 27, 44, 71, 115, 186, 301, 487, 788, 1275, ...

p177, As a general class, the sequences that follow this pattern are called additive sequences。

2.wrapper functions

int Fib(int n) {
    return AdditiveSequence(n, 0, 1);
}

Functions of this sort, which simply return the result of another function, often after transforming the arguments in some way, are called wrapper functions

如上, Fib称为wrapper function。wrapper函数的作用是为subsidiary function提供参数。

二、英语总结

1.enormous是什么意思?

答:ex-("out of") + norm("rule, norm") + -ous(substituted for Latin -is**, "having, full of"),即超乎寻常的。adj. “extremely large(巨大的)”之意。

2.given that是什么意思?

答:given that 的意思是“taking that fact into account / in consideration of the fact that”,可以翻译为“已知”。that后面的内容一定是fact,不能是假设的。

示例:p176,Given that the Fibonacci function can be implemented efficiently using iteration,the enormous explosion of steps required by the recursive implementation is more that a little disturbing

3.subsidiary是什么意思?

答:

(1)subsidiary: adj.used to refere to sth that less important than sth else with which is connected(辅助的,次要的)。c. a company that is controlled by another(子公司)。

(2)subsidy: c.money given as part of the cost of sth, to help or encourage it to happen(补贴,补助金)。

(3)subside: sub("under") + sidere("to settle"),原本的意思是“sink to the bottom(下沉)”,引申义意义是“sink to a lower level(降低、减弱)”。vi.become less strong or extreme。

三、参考资料

1. 编程

(1)Eric S.Roberts,《Programming Abstractions in C》:https://book.douban.com/subject/2003414

2. 英语

(1)Etymology Dictionary:https://www.etymonline.com

(2) Cambridage Dictionary:https://dictionary.cambridge.org

Programming abstractions in C阅读笔记:p176-p178_c

欢迎搜索及关注:编程人(a_codists)


标签:p178,function,given,abstractions,Programming,sth,wrapper,https
From: https://blog.51cto.com/u_15137915/7799831

相关文章

  • Programming abstractions in C阅读笔记:p176-p178
    《ProgrammingAbstractionsInC》学习第59天,p176-p178总结。一、技术总结1.addtivesequencestn=tn-1+tn-2序列:3,7,10,17,27,44,71,115,186,301,487,788,1275,...p177,Asageneralclass,thesequencesthatfollowthispatternarecalledadditive......
  • 2021-2022 ACM-ICPC Nordic Collegiate Programming Contest (NCPC 2021) gym 104670
    原题容易想到最短路DAG求出来,起初我以为要求最小割,但这是错误的,因为可能有多条边联通了一个点的情况,这时候选择最小割不一定是最优的我们猜想一个思路:答案一定是包含\(1\)号节点的连通块全部填\(N\),剩下的填\(S\)。发现在最短路DAG中,\(1\rightarrown\)的所有路径......
  • UNIQUE VISION Programming Contest 2023 Autumn(AtCoder Beginner Contest 323)
    UNIQUEVISIONProgrammingContest2023Autumn(AtCoderBeginnerContest323)A.WeakBeats解题思路:按题意模拟即可。代码:#include<bits/stdc++.h>usingnamespacestd;usingll=longlong;voidsolve(){strings;cin>>s;intn=s.size();......
  • Programming abstractions in C阅读笔记:p166-p175
    《ProgrammingAbstractionsInC》学习第58天,p166-p175总结。一、技术总结1.斐波那契数列(FibonacciSequenc)(1)斐波那契数列来源斐波那契数列来自于《LiberAbaci》一书里兔子繁殖问题,相关资料很多,这里不赘述。(2)关于《LiberAbaci》一书《LiberAbaci》——Liber:abook......
  • 2022 China Collegiate Programming Contest (CCPC) Mianyang Onsite
    2022ChinaCollegiateProgrammingContest(CCPC)MianyangOnsiteC.CatchYouCatchMe解题思路:站在距离出口最近的点等深度深的蝴蝶飞上来即可。时间复杂度:\(O(n)\)代码:#include<bits/stdc++.h>usingnamespacestd;usingll=longlong;voidsolve(){ intn......
  • 2022 China Collegiate Programming Contest (CCPC) Weihai Site EAJGCI
    2022ChinaCollegiateProgrammingContest(CCPC)WeihaiSite目录2022ChinaCollegiateProgrammingContest(CCPC)WeihaiSiteVP概况E-PythonWillbeFasterthanC++A-DunaiJ-Eat,Sleep,RepeatG-Grade2C-GrassI-DragonBloodlineVP概况这场我一年......
  • 2017 China Collegiate Programming Contest Final (CCPC-Final 2017)
    Preface今天打学校统一要求的这场CCPC2017Final,直接被打爆了,各种数学题搞得人生活不能自理主要是H徐神开场就秒出了正确的思路,然后一心认准高斯消元然后一直想+写+调到结束都没卡过去比赛最后20min的时候祁神想到了更好写的基于施密特正交化的方法,可以碍于时间有限没调出来不......
  • C++模板元编程(C++ template metaprogramming)
    实验平台:Win7,VS2013Community,GCC4.8.3(在线版) 所谓元编程就是编写直接生成或操纵程序的程序,C++模板给C++语言提供了元编程的能力,模板使C++编程变得异常灵活,能实现很多高级动态语言才有的特性(语法上可能比较丑陋,一些历史原因见下文)。普通用户对C++模板的使用可能不是很......
  • 2022 China Collegiate Programming Contest (CCPC) Weihai Site
    PrefaceVP到自己学校出的题了可海星,不得不说学长们出的题比起昨天VP的CCPC2022广州做起来要舒服地多这场前面写题都很顺基本都是一发过,中期的medium也没怎么卡思路和卡机子,一道一道地慢慢出最后一个小时徐神RushF可惜没Rush出来,然后我和祁神坐在下面把B的做法给搞出来了,但不知......
  • 2022 China Collegiate Programming Contest (CCPC) Guangzhou Onsite
    Preface好难啊这场广州站,不愧是5题金4题铜的超恶劣站,中档题普遍难度较高但我感觉主要原因还是题目出的太偏向于DP了,AI是本质差不多的树上换根DP,M又是个数位DP,导致像我这种不擅长DP的人直接中期坐牢但好在祁神大力切出了medium~hard的K题,然后最后一小时我把一直在想的A题丢给徐......