Swift与Objective-C交互总结
在Swift中使用Objective-C(简单)
在创建OjbC文件时, XCode会提示创建XXX-Bridging-Header.h文件, 创建之
在创建的XXX-Bridging-Header.h上导入需要引入到Swift中的Objective-C类
#import "Need.h"
然后在Swfit中就能使用它了...
分类:
移动开发 时间:
2014-07-23 13:38:36
阅读次数:
310
题意:
要求在一个特殊的图上找最大匹配,该图特点是:无向图,每个节点度数为3,是一个边双连通分量(the graph is 2-edge-connected (that is, at least 2 edges need to be removed in order to make the graph disconnected) 这一点是这样理解的把。。)
思路:
一般想法就直接建图求最大匹...
分类:
其他好文 时间:
2014-07-23 13:22:07
阅读次数:
207
I Think I Need a Houseboat
Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)
Total Submission(s): 9530 Accepted Submission(s): 2733
Problem Description
...
分类:
其他好文 时间:
2014-07-23 13:13:06
阅读次数:
321
DescriptionYou haveNintegers,A1,A2, ... ,AN. You need to deal with two kinds of operations. One type of operation is to add some given number to each ...
分类:
其他好文 时间:
2014-07-23 11:31:26
阅读次数:
269
Problem Description
Today the company has m tasks to complete. The ith task need xi minutes to complete. Meanwhile, this task has a difficulty level yi. The machine whose level below this task’s le...
分类:
其他好文 时间:
2014-07-22 23:57:27
阅读次数:
601
初始化: std::pair p; //initialize p.first and p.second with zero std::pair p(42, "hello"); make_pair(42, "hello"); // no need for the var name, it's r...
分类:
其他好文 时间:
2014-07-22 22:47:13
阅读次数:
209
版权声明:原创作品,同意转载,转载时请务必以超链接形式标明文章原始出版、作者信息和本声明。否则将追究法律责任。本文地址: http://blog.csdn.net/jobchanceleo/archive/2008/10/17/3089644.aspx08年10月份Leo博客每周共计3次更新。前次写...
分类:
其他好文 时间:
2014-07-22 22:44:15
阅读次数:
316
You want to use just the methods you like, without inheriting all the other methods that you’ll never need. This is possible with the borrowing method...
分类:
编程语言 时间:
2014-07-22 22:41:33
阅读次数:
291
Now I believe thoughts leading to DP is brutal DFS.. DFS is brutal force enumeration, but that's too much and naive. We need pruning. So, DFS + Prunin...
分类:
其他好文 时间:
2014-07-22 22:40:34
阅读次数:
183
典型的以空间换时间问题,思路很重要!
/*
员工年龄排序
员工可能有几万名,要求时间复杂度为O(n)
思路:员工的年龄必然在一个范围内,比如0-99,那么我们建立一个大小为100的辅助数组,然后遍历
员工年龄,取到一个年龄就将该年龄对应数组位置的值加1,最终数组中便保存了不同年龄的员工的个数
最后,打印数组即可。
by Rowandjj
2014/7/22
*/
#includ...
分类:
其他好文 时间:
2014-07-22 22:34:15
阅读次数:
167