Sorting in Python

Written by  on February 28, 2016

Simple implementation of five common sorting  algorithm in Python. Bubble Sort Python 12345678910111213

[Read more...]

Linux下压缩PDF的大小

Written by  on February 26, 2016

刚才在写简历保存为PDF的时候吓了一跳,只有一页半的PDF却有17MB大小!不知道是不是用Chrome调了边距的原因。 无论如何都得想办法压缩一下,Google了一下,先是尝试用了imagemagic,然而无论是转换成PNG图片还是直接压缩最后都会影响清晰图,最后在Ask Ubuntu上找到了解决方案 :

[Read more...]

316毕业年聚

Written by  on February 3, 2016

特别鸣谢吴老师和张老师为我们提供的活动场地。   今年应该是最后一次寒假大聚了,全班36人,最后来了27个人,相较于前几年来说人是算多了,尤其是甲鱼同学 ;-) 。

[Read more...]

POJ1006

Written by  on February 1, 2016

POJ1006 Biorhythms Time Limit: 1000MS Memory Limit: 10000K Total Submissions: 124772 Accepted: 39392 Description Some people believe that there are three cycles in a person’s life that start the day he or she is born. These three cycles are the physical, emotional, and intellectual cycles, and they have periods of lengths 23, 28, and 33 days, respectively. There is one peak in each period of a cycle. At the peak of a cycle, a person performs at his or her best in the corresponding field (physical, emotional or mental). For example, if it is the mental curve, thought processes will be sharper and concentration will be easier.

[Read more...]

POJ1458

Written by  on February 1, 2016

POJ1458 Common Subsequence Time Limit: 1000MS Memory Limit: 10000K Total Submissions: 44778 Accepted: 18346 Description A subsequence of a given sequence is the given sequence with some elements (possible none) left out. Given a sequence X = < x1, x2, …, xm > another sequence Z = < z1, z2, …, zk > is a subsequence of X if there exists a strictly increasing sequence < i1, i2, …, ik > of indices of X such that for all j = 1,2,…,k, xij = zj. For example, Z = < a, b, f, c > is a subsequence of X = < a, b, c, f, b, c > with index sequence < 1, 2, 4, 6 >. Given two sequences X and Y the problem is to find the length of the maximum-length common subsequence of X and Y.

[Read more...]