#include #include using namespace std;#define COL 10#define ROW 10int tbl[ROW][COL];void print(int* tbl) { for (int i=0; i<ROW; i++) { for (...
分类:
其他好文 时间:
2014-11-08 21:57:48
阅读次数:
252
DescriptionProblem HCounting RectanglesInput: Standard InputOutput:Standard Output Time Limit: 3SecondsGiven n points on the XY plane, count how many ...
分类:
其他好文 时间:
2014-11-08 16:32:29
阅读次数:
173
Problem Description
The God of sheep decides to pixelate some pictures (i.e., change them into pictures with mosaic). Here's how he is gonna make it: for each picture, he divides the picture into n x...
分类:
其他好文 时间:
2014-11-07 19:04:18
阅读次数:
373
题目3385: [Usaco2004 Nov]Lake Counting 数池塘Time Limit:1 SecMemory Limit:128 MBDescription农夫约翰的农场可以表示成N×M(1≤N,M≤100)个方格组成的矩形.由于近日的降雨,在约翰农场上的不同地方形成了池塘.每一个方...
分类:
其他好文 时间:
2014-11-05 12:10:38
阅读次数:
214
一、什么是 ARC ?所谓ARC就是Automatic Reference Counting , 即自动引用计数。ARC是自iOS5引入的。ARC机制的引入是为了简化开发过程的内存管理的。相对于之前的MRC (Manual Reference Counting) , ARC机制显得更加自动化。在使用...
分类:
移动开发 时间:
2014-11-05 01:54:51
阅读次数:
226
一、前言
ios开发中,@property的修饰就有很多的修饰词,如retain、assign、strong、weak、nonatomic等等,而这些修饰词在ARC模式下与非ARC模式下也是略有不同。下面先简单说说ARC模式
二、什么是ARC
ARC是iOS 5推出的新功能,全称为Automatic Reference Counting。一句话说,...
分类:
移动开发 时间:
2014-11-04 19:47:10
阅读次数:
262
比较简单的一道深搜题目,适合练手1//题目链接:http://poj.org/problem?id=23862//解题思路:将湖泊定义为1,陆地定义为0,dfs搜索每个点即可3#include4#include56intmap[110][110],vis[110][110];//map模拟地图,vi...
分类:
其他好文 时间:
2014-11-03 12:46:30
阅读次数:
189
题目链接:点击打开链接
#include
#include
using namespace std;
typedef long long ll;
ll re;
vector p;
void dfs(int dep, int g) {
if (dep == 0)
return ;
if (p[dep-1] == 1) {
re += (dep-1) * (1...
分类:
其他好文 时间:
2014-10-30 13:32:20
阅读次数:
159
Lake Counting
Time Limit: 1000MS
Memory Limit: 65536K
Total Submissions: 20782
Accepted: 10473
Description
Due to recent rains, water has pooled in various places i...
分类:
其他好文 时间:
2014-10-30 00:18:09
阅读次数:
183
计数排序(Counting sort)是一种稳定的线性时间排序算法。计数排序使用一个额外的数组C,其中第i个元素是待排序数组A中值等于i的元素的个数。然后根据数组C来将A中的元素排到正确的位置。计数排序不是比较排序,排序的速度快于任何比较排序算法。由于用来计数的数组C的长度取决于待排序数组中数据.....
分类:
编程语言 时间:
2014-10-28 19:35:34
阅读次数:
218