显卡已经正确识别了? Quadro FX 3700。 可是看起来还是卡卡的,网页如果有图片拖动就会很慢?
k*t
3 楼
Write a function increasing: int list -> bool that returns true if its input is a list of integers in increasing order. Define function addOneToAll(x, L) that takes a value x and add it to all the elements in L, which is a list of lists. For example, addOneToAll(1, [nil, [2], [3], [2,3]]) = [[1], [1,2], [1,3], [1 ,2,3]]. 才开始学编程,这两个怎么写啊? 第二个题,我写了这样的可是不工作: -fun addOneToAll(a,nil)=nil |fun addOneToAll(a,[x]::[y]::nil)=(a::[x])::addOneToAll(a,[y]::nil)::nil; 希望大家帮我。
a*e
4 楼
1,好像没有 2,机场免税店,有国际航线的一般都有 3,是,国际航班都有 4,古巴雪茄
r*w
5 楼
装显卡驱动了吗?
k*t
6 楼
:(no one knows?
q*2
7 楼
You can buy it at PVG or PEK after arrival before reaching the custom.
n*h
8 楼
No. I guess this might be the problem. I assume the video card is OK once recognized by the system.
【在 r*********w 的大作中提到】 : 装显卡驱动了吗?
G*l
9 楼
不懂ML,用同样ML family的F#解答一下,你应该可以看明白 第一个问题,思路:list为空的时候怎么办?list只有一个的时候怎么办?list有多个 的时候怎么办? let rec IsMonoIncreasing = function | [] -> true | first::second::remain -> match second > first with | false -> false | true -> IsMonoIncreasing (second::remain) | singleElement::[] -> true 注意为什么要把至少2个的情况放在只有一个的情况前面。 第二个就不写code了,不过x::y::nil应该match的是只有两个元素的list吧?你应该 match用 x::remain
[1
【在 k***t 的大作中提到】 : Write a function increasing: int list -> bool that returns true if its : input is a list of integers in increasing order. : Define function addOneToAll(x, L) that takes a value : x and add it to all the elements in L, which is a list of lists. : For example, addOneToAll(1, [nil, [2], [3], [2,3]]) = [[1], [1,2], [1,3], [1 : ,2,3]]. : 才开始学编程,这两个怎么写啊? : 第二个题,我写了这样的可是不工作: : -fun addOneToAll(a,nil)=nil : |fun addOneToAll(a,[x]::[y]::nil)=(a::[x])::addOneToAll(a,[y]::nil)::nil;
y*e
10 楼
这个没法子了,我从成都入关
【在 q*******2 的大作中提到】 : You can buy it at PVG or PEK after arrival before reaching the custom.
n*h
11 楼
就是驱动问题,谢谢
【在 n******h 的大作中提到】 : No. I guess this might be the problem. : I assume the video card is OK once recognized by the system.
k*t
12 楼
太谢谢了。我会顺着你的思路再看看。
【在 G***l 的大作中提到】 : 不懂ML,用同样ML family的F#解答一下,你应该可以看明白 : 第一个问题,思路:list为空的时候怎么办?list只有一个的时候怎么办?list有多个 : 的时候怎么办? : let rec IsMonoIncreasing = function : | [] -> true : | first::second::remain -> : match second > first with : | false -> false : | true -> IsMonoIncreasing (second::remain) : | singleElement::[] -> true
【在 k***t 的大作中提到】 : Write a function increasing: int list -> bool that returns true if its : input is a list of integers in increasing order. : Define function addOneToAll(x, L) that takes a value : x and add it to all the elements in L, which is a list of lists. : For example, addOneToAll(1, [nil, [2], [3], [2,3]]) = [[1], [1,2], [1,3], [1 : ,2,3]]. : 才开始学编程,这两个怎么写啊? : 第二个题,我写了这样的可是不工作: : -fun addOneToAll(a,nil)=nil : |fun addOneToAll(a,[x]::[y]::nil)=(a::[x])::addOneToAll(a,[y]::nil)::nil;
p*2
15 楼
第一题 (defn f [list & args] (let [f (first list) r (rest list) [prev] args] (cond (empty? list) true (nil? prev) (dfs f r) (< prev f) (dfs f r) :default false)))
我是说如果我不会lisp。。。 ml也可以写的很简洁,但是初学者可能看不懂 let rec IsMonoInc = function | [] -> true | [f] -> true | f::((s::_)as remain) -> if f >= s then false else IsMonoInc(remain)
1. fun (xs) = case xs of [] => true | x::[] => true | x::y::xs' => if (x <= y) fun (y::xs') else false 2. fun addOneToAll(x, L) = case L of [] => [] | y::ys => (x::y) :: (addOneToAll (x, ys)) Most amazing thing about ML is although everything is static typed, you don' t need to specify which class/type the input argument is and return value is -- type inference will all handle that for you :-) BTW Dan Grossman recently opened a course "Programming Language" in coursera . If you are interested in learning ML, I would suggest going there.
[1
【在 k***t 的大作中提到】 : Write a function increasing: int list -> bool that returns true if its : input is a list of integers in increasing order. : Define function addOneToAll(x, L) that takes a value : x and add it to all the elements in L, which is a list of lists. : For example, addOneToAll(1, [nil, [2], [3], [2,3]]) = [[1], [1,2], [1,3], [1 : ,2,3]]. : 才开始学编程,这两个怎么写啊? : 第二个题,我写了这样的可是不工作: : -fun addOneToAll(a,nil)=nil : |fun addOneToAll(a,[x]::[y]::nil)=(a::[x])::addOneToAll(a,[y]::nil)::nil;
c*C
30 楼
第一题 fun increasing(lst: int list) = case lst of [] => true | i::[] => true | i::(j::lst') => i < j andalso increasing(lst') 第二题 fun addOneToAll思路跟第一题相似
[1
【在 k***t 的大作中提到】 : Write a function increasing: int list -> bool that returns true if its : input is a list of integers in increasing order. : Define function addOneToAll(x, L) that takes a value : x and add it to all the elements in L, which is a list of lists. : For example, addOneToAll(1, [nil, [2], [3], [2,3]]) = [[1], [1,2], [1,3], [1 : ,2,3]]. : 才开始学编程,这两个怎么写啊? : 第二个题,我写了这样的可是不工作: : -fun addOneToAll(a,nil)=nil : |fun addOneToAll(a,[x]::[y]::nil)=(a::[x])::addOneToAll(a,[y]::nil)::nil;