1 #include 2 #include 3 using namespace std; 4 5 void COUNTING_SORT(int *const A, const int &length,int &k){ 6 7 vector B(length, 0); 8 v...
分类:
编程语言 时间:
2015-02-28 20:10:56
阅读次数:
219
题意:给出n,将前n个整数顺次写在一起,统计各个数字出现的次数。用的最笨的办法--直接统计-- 后来发现网上的题解有先打表来做的 1 #include 2 #include 3 #include 4 #include 5 using namespace std; 6 7 char ...
分类:
其他好文 时间:
2015-02-26 16:09:21
阅读次数:
90
本文旨在通过简明扼要的方式总结出iOS开发中ARC(Automatic Reference Counting,自动引用计数)内存管理技术的要点,所以不会涉及全部细节。这篇文章不是一篇标准的ARC使用教程,并假定读者已经对ARC有了一定了解和使用经验。详细的关于ARC的信息请参见苹果的官方文档与网上的...
分类:
移动开发 时间:
2015-02-26 12:59:58
阅读次数:
245
A family hierarchy is usually presented by a pedigree tree. Your job is to count those family members who have no child.InputEach input file contains ...
分类:
其他好文 时间:
2015-02-26 11:24:03
阅读次数:
103
如果你在进行release,retain相关操作的时候发现提示了这样一条错误。这是由于在新建工程的时候使用了ARC功能,即点选了“Use Automatic Reference Counting”选项。解决这个问题很简单:在老板的xcode中,打开“Build Setting”,找到“Objecti...
分类:
其他好文 时间:
2015-02-23 22:26:50
阅读次数:
190
Counting Sort1. Counting Sort doesn't work for negative number.2. Counting Sort assumes that each element is SMALL INTEGER.3. Time Complexity is O(Max...
分类:
其他好文 时间:
2015-02-23 16:40:52
阅读次数:
118
Prime CutsTime Limit:1000MSMemory Limit:10000KTotal Submissions:10610Accepted:4046DescriptionA prime number is a counting number (1, 2, 3, ...) that i...
分类:
其他好文 时间:
2015-02-23 08:33:33
阅读次数:
175
The task is simple: given any positive integer N, you are supposed to count the total number of 1's in the decimal form of the integers from 1 to N. F...
分类:
其他好文 时间:
2015-02-20 11:53:35
阅读次数:
249
iOS开发ARC内存管理技术要点 本文来源于我个人的ARC学习笔记,旨在通过简明扼要的方式总结出iOS开发中ARC(Automatic Reference Counting,自动引用计数)内存管理技术的要点,所以不会涉及全部细节。这篇文章不是一...
分类:
移动开发 时间:
2015-02-16 18:28:32
阅读次数:
151
Xcode高级版本中引入的ARC机制帮助我们摆脱了枯燥的内存管理,其本质是编译器在编译代码时自动帮我们把内存管理的代码加在了代码中,当然ARC可以在Xcode中关闭,在项目中的Build Settings中Objective-C Automatic Refrence Counting设置为NO即可。...
分类:
其他好文 时间:
2015-02-15 23:08:49
阅读次数:
158