摘要: 发现那里搞ACM多一点,能讨论一下~传送门:http://blog.csdn.net/lele94218 阅读全文
posted @ 2013-02-19 16:30 上白泽慧音 阅读(110) 评论(0) 推荐(0) 编辑
摘要: 这题真的是一把辛酸泪啊,好复杂,做了两天。个人算法比较弱啊,看代码量就知道了。先提取关键字,然后储存题目下标。把关键字排序,储存题目下标的数组排序,最后输出来。脑子快做炸了,但是最后还是AC了。题目: Searching QuicklySearching QuicklyBackgroundSearching and sorting are part of the theory and practice of computer science. For example, binary search provides a good example of an easy-to-understand 阅读全文
posted @ 2013-02-19 16:19 上白泽慧音 阅读(337) 评论(0) 推荐(0) 编辑
摘要: 真坑爹的题,没啥说的,WA了十多次,最后因为有个调试输出没删,真郁闷。题目:Unix lsThe computer company you work for is introducing a brand new computer line and is developing a new Unix-like operating system to be introduced along with the new computer. Your assignment is to write the formatter for the ls function.Your program will eve 阅读全文
posted @ 2013-02-16 15:00 上白泽慧音 阅读(844) 评论(0) 推荐(0) 编辑
摘要: 下次直接用qsort把单词排序就行了,这次的代码有点麻烦,不过自我感觉效率应该比较高。题目:AnanagramsAnanagramsMost crossword puzzle fans are used to anagrams--groups of words with the same letters in different orders--for example OPTS, SPOT, STOP, POTS and POST. Some words however do not have this attribute, no matter how you rearrange their 阅读全文
posted @ 2013-02-11 19:37 上白泽慧音 阅读(762) 评论(0) 推荐(0) 编辑
摘要: 算法想了一阵,不过因为数据量本身不大,还是很容易A的。1.整体qsort一遍,放另外一个数组里面,如果数字所在位置和排序后相同,则称为已定位2.从未定位stack中找最大值3.把最大值翻到top-stack,如果在top-stack就跳过4.从未定位的位置开始整体翻过来5.最大值已定位,重复2题目: Stacks of FlapjacksStacks of FlapjacksBackgroundStacks and Queues are often considered the bread and butter of datastructures and find use in archite 阅读全文
posted @ 2013-02-10 23:25 上白泽慧音 阅读(1754) 评论(0) 推荐(0) 编辑
摘要: 简单的冒泡排序,这题是练英语阅读的。题目:Train SwappingTrain SwappingAt an old railway station, you may still encounter one of the last remaining ``train swappers''. A train swapper is an employee of the railroad, whose sole job it is to rearrange the carriages of trains.Once the carriages are arranged in the o 阅读全文
posted @ 2013-02-10 17:21 上白泽慧音 阅读(355) 评论(0) 推荐(0) 编辑
摘要: 题又没看懂,挺简单的事情说这么复杂,中间一大段没明白。题目:Tree's a CrowdTree's a CrowdDr William Larch, noted plant psychologist and inventor of the phrase ``Think like a tree--Think Fig'' has invented a new classification system for trees. This is a complicated system involving a series of measurements which a 阅读全文
posted @ 2013-02-09 17:18 上白泽慧音 阅读(235) 评论(0) 推荐(0) 编辑
摘要: 我认为是uva上最简单的题了。题目:Where is the Marble? Where is the Marble?Raju and Meena love to play with Marbles. They have got a lot of marbles with numbers written on them. At the beginning, Raju would place the marbles one after another in ascending order of the numbers written on them. Then Meena would ask R 阅读全文
posted @ 2013-02-09 14:24 上白泽慧音 阅读(2075) 评论(0) 推荐(0) 编辑
摘要: 今天除夕哈~祝acmer新年多多AC~~这次又因为英文没看懂题目,以为名字有多个。这个题目没有考虑重名的情况,应该是个小bug吧。虽然是简单的题,不过也学习了qsort套用结构体排序,可以参考七种qsort排序方法。题目: Problem B - List of Conquests Shahriar Manzoor SHAHRIAR MANZOOR 44 819 2002-10-30T12:20:00Z 2002-10-20T17:16:00Z 2003-01-10T17:27:00Z 2 260 1484 CSE, BUET 12 2 1822 9.2720 ... 阅读全文
posted @ 2013-02-09 12:06 上白泽慧音 阅读(822) 评论(0) 推荐(0) 编辑
摘要: 七种qsort排序方法 <本文中排序都是采用的从小到大排序> 一、对int类型数组排序 1 int num[100]; 2 3 //Sample: 4 5 int cmp ( const void *a , const void *b ) 6 { 7 return *(int *)a - *(int *)b; 8 } 9 10 qsort(num,100,sizeof(num[0]),cmp); 二、对char类型数组排序(同int类型) 1 char word[100]; 2 3 //Sample: 4 5 int cmp( const void *a , const void 阅读全文
posted @ 2013-02-09 11:17 上白泽慧音 阅读(800) 评论(0) 推荐(0) 编辑