网页解谜游戏存盘点
摘要:1.http://riddle.arthurluk.net/2.http://www.csie.ntu.edu.tw/~b94102/game/game.htm 12关http://www.csie.ntu.edu.tw/~b94102/game/twofeet.htm16关http://www.csie.ntu.edu.tw/~b94102/game/iroha.htm
阅读全文
ch11
摘要:1-4 initialize when using it
阅读全文
拿到最大宝石的概率
摘要:题目大意说:有10个房间,每个房间内各有一个大小不同的宝石,如果前4个房间只看不拿,在后面的6个房间,发现一个比前面4个房间内的宝石都大的宝石就拿,否则拿最后一个,问拿到最大的宝石的概率?设最大宝石在第i个位置(i=1...10),应该是等概率的1/101.设 i = 5, p =12.i=6...10,需要考虑前i-1个位置上的宝石大小,假设前i-1个宝石中最大的(max(i-1))不在前四位中,则因为这个宝石(max(i-1))在最大的宝石(max(10))前面,且(max(i-1))大于前四个中的任一个,所以取不到最大(max(10)),相反max(i-1)在前四个位置则可以取到最大宝石
阅读全文
ch10
摘要:2-6 元素可以重复?2-8 head需要记下的信息有head的location,prev[head] and next[head] ---> next[x] = np[x] XOR prev{location}, head的location知道,所以可以递归的求出所有元素的location. reverse只需要交换prev[head] and next[head]的值3-4 需要存下“array中最靠后”的node的location,设为last,allocate is easy. free(x)---->swap(x,last), last--3-5 ?
阅读全文