ARC在OC里面个人感觉又是一个高大上的牛词,在前面Objective-C中的内存管理部分提到了ARC内存管理机制,ARC是Automatic Reference Counting---自动引用计数。有自动引用计数,那么就得有手动引用计数MRC(Mannul Reference Counti...
分类:
其他好文 时间:
2014-08-18 08:02:23
阅读次数:
227
解题报告
题意:
矩形面积并。
思路:
扫描线+线段树
#include
#include
#include
#include
using namespace std;
struct Seg
{
int lx,rx,h,v;
friend bool operator < (Seg a,Seg b)
{
return a.h<b.h;
...
分类:
其他好文 时间:
2014-08-16 21:10:01
阅读次数:
241
一、 COUNT函数 在实际统计应用中,需要计算观测值出现的次数,这项功能可以通过COUNT函数来实现,它有下面三种形式和功能: form you used 返回值 例子 COUNT(*) 整个表或组的行数 select count(*) as Count COUNT(column) 当参数中所选定...
分类:
其他好文 时间:
2014-08-16 14:58:00
阅读次数:
320
Counting SheepTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 2060Accepted Submission(s): 1359 Pr...
分类:
其他好文 时间:
2014-08-16 12:30:40
阅读次数:
334
简单的深度搜索就可以了,看见有人说什么使用并查集,那简直是大算法小用了。
因为可以深搜而不用回溯,故此效率就是O(N*M)了。
技巧就是增加一个标志P,每次搜索到池塘,即有W字母,那么就认为搜索到一个池塘了,P值为真。
搜索过的池塘不要重复搜索,故此,每次走过的池塘都改成其他字母,如'@',或者'#',随便一个都可以。
然后8个方向搜索。
#include
#include
#inc...
分类:
其他好文 时间:
2014-08-15 23:51:10
阅读次数:
519
Painting some colored segments on a line, some previously painted segments may be covered by some the subsequent ones.
Your task is counting the segments of different colors you can see at last.
...
分类:
其他好文 时间:
2014-08-14 10:47:38
阅读次数:
222
/************************************************************************/
/*
递归问题:
给定一个区间,求其中所有0~9数字总计出现次数
思路:
设f(a),f(b)为各自从1开始到a,b中所有0~9数字总计出现次数。
则ans=f(b)-f(a-1);递归的话就是建立f(k)和f(10*k+x)的关系.
对于一...
分类:
其他好文 时间:
2014-08-12 17:25:44
阅读次数:
182
Main reference:http://zhaohongze.com/wordpress/2014/01/04/leetcode-minimum-window-substring/The ART of counting. So difficult and beautiful problem. I...
先上题目:1148 - Mad CountingPDF (English)StatisticsForumTime Limit:0.5 second(s)Memory Limit:32 MBMob was hijacked by the mayor of the Town "TruthTown". M...
分类:
其他好文 时间:
2014-08-11 23:52:03
阅读次数:
357
Description
Problem H
Counting Rectangles
Input: Standard Input
Output:Standard Output
Time Limit: 3Seconds
Given n points on the XY plane, count how many regular rectanglesare formed. A...
分类:
其他好文 时间:
2014-08-10 18:49:00
阅读次数:
268