码迷,mamicode.com
首页 >  
搜索关键字:car 限速    ( 3708个结果
【SICP练习】71 练习2.42
?? 练习2.42 这道题曾经在C#中写过,但是写出来的代码却没有Lisp中的朴素。用了一大堆的数组和for循环。但是在这里,用car、cdr来构造就行了。 我们按书中给出的步骤来一步一步求解这个问题。首先是棋局,就按书上的示意图,从上往下的来排皇后的位置。诸如此时书中皇后的位置为:’(6 3 1 7 5 8 2 4)。 然后就是过程adjoin-position。rest...
分类:其他好文   时间:2015-02-23 09:46:38    阅读次数:172
【SICP练习】59 练习2.29
?? 练习2.29 这种题,还有之前的那个rectangle的题目,对于变量、函数等的命名简直要让人疯掉。先来写出题目中的left-branch和right-branch吧。 (define (left-branch mobile)    (car mobile)) (define (right-branch mobile)    (cadr mobile)) ...
分类:其他好文   时间:2015-02-22 14:37:40    阅读次数:141
【SICP练习】75 练习2.46
?? 练习2.46 这道题就是彻头彻尾的”构造”了。直接上代码吧。 (define (make-vect xcor ycor) (listxcor ycor)) (define (xcor-vect v) (car v)) (define (ycor-vect v) (cdr v)) (define (add-vect first-vectsecond-vect...
分类:其他好文   时间:2015-02-22 14:37:05    阅读次数:133
【SICP练习45】 练习2.4
?? 练习2.4 直接运用对比的技巧就可以猜测出相应的cdr表示如下: (define (cdr z)    (z (lambda (p q) q))) 但我们还是要按照题中要求用代换模型来检验。先来检验car的。 (car (cons 0 1)) (car (lambda (m) (0 1))) ((lambda (z) (z (lambda (p...
分类:其他好文   时间:2015-02-17 21:06:55    阅读次数:144
PAT1033.To Fill or Not to Fill
With highways available, driving a car from Hangzhou to any other city is easy. But since the tank capacity of a car is limited, we have to find gas s...
分类:其他好文   时间:2015-02-15 16:27:05    阅读次数:168
hdu5174---Ferries Wheel
Problem Description The Ferries Wheel is a circle,rounded by many cable cars,and the cars are numbered 1,2,3…K?1,K in order.Every cable car has a unique value and A[i?1]/******************************...
分类:其他好文   时间:2015-02-14 22:39:10    阅读次数:188
UVa 12661 (单源最短路) Funny Car Racing
题意:有一个赛车跑道,可以看做一个加权有向图。每个跑道(有向边)还有一个特点就是,会周期性地打开a秒,然后关闭b秒。只有在赛车进入一直到出来,该跑道一直处于打开状态,赛车才能通过。开始时所有跑道处于刚打开的状态,求从起点到终点的最短时间。分析:设d[i]为起点到节点i的最短时间。和普通的单源最短路问...
分类:其他好文   时间:2015-02-14 21:20:04    阅读次数:926
九度oj 1437 To Fill or Not to Fill 2012年浙江大学计算机及软件工程研究生机试真题
题目1437:To Fill or Not to Fill时间限制:1 秒内存限制:128 兆特殊判题:否提交:1488解决:345题目描述:With highways available, driving a car from Hangzhou to any other city is easy....
分类:其他好文   时间:2015-02-13 19:50:13    阅读次数:183
2011 Audi A3 CEL On, temp gauge goes to max
A 2011 A3 was taken into my garage last month. The car owner said it came up with an engine check light the other day. One day after the light was on,...
分类:其他好文   时间:2015-02-13 13:08:18    阅读次数:155
python.beatifulsoup入门
最先想试试python的爬虫功能,于是用easy_install安装了beautifulsoup,下面是我写的demo代码,可以简单看看 #coding=utf-8 import urllib2 from BeautifulSoup import BeautifulSoup as bs url_addr = 'http://car.autohome.com.cn/baoyang/detail...
分类:编程语言   时间:2015-02-12 18:28:39    阅读次数:208
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!