09 2013 档案
UVA10878 - 详解Decode the tape
摘要:Decode the tapeTime Limit: 1 second "Machines take me by surprise with great frequency." Alan TuringYour boss has just unearthed a roll of old computer tapes. The tapes have holes in them and might contain some sort of useful information. It falls to you to figure out what is written on th
阅读全文
UVA537 - 详解Artificial Intelligence?
摘要:Artificial Intelligence?Physics teachers in high school often think that problems given as text are more demanding than pure computations. After all,...
阅读全文
UVA10815 - 详解Andy's First Dictionary
摘要:Andy's First DictionaryAndy, 8, has a dream - he wants to produce his very own dictionary. This is not an easy task for him, as the number of words that he knows is, well, not quite enough. Instead of thinking up all the words himself, he has a briliant idea. From his bookshelf he would pick one
阅读全文
c语言中的qsort函数(转)
摘要:做题时自己也不是很清楚,转来别人的学习一下。一、对int类型数组排序 int num[100]; int cmp ( const void *a , const void *b ) { return *(int *)a - *(int *)b; } 可见:参数列表是两个空指针,现在他要去指向你的数组元素。所以转型为你当前的类型,然后取值。升序排列。 因为是按照acsll码的值进行的,所以在前面的字符的值一定小于后面的字符。 那么,对于a b,如果a的值>b的值,就说明在字母表中a在b的后面,返回值为1表示ture,执行交换。 qsort(num,100,sizeof(nu...
阅读全文