摘要: Ultra-QuickSort题型:求逆序数解法一:正统做法,归并排序,375MS。[代码]解法二:树状数组,需要先离散化,因为用到qsort(),比归并排序稍慢,516MS。[代码] 阅读全文
posted @ 2010-07-31 17:09 superbin 阅读(317) 评论(0) 推荐(0) 编辑
摘要: [代码]拷贝的结果是:s1 = "",s1[1] = 0;分析:strcpy()函数的功能是字符串拷贝,而字符串是以/0为结束标志。所以简单的把strcpy()当成数组的拷贝是错误的想法。参考:strcpyfunction<cstring>Copy stringCopies the C string pointed by source into the array pointed by... 阅读全文
posted @ 2010-07-31 08:57 superbin 阅读(844) 评论(0) 推荐(0) 编辑