题目:http://www.spoj.com/problems/ORDERS/ and http://acm.hdu.edu.cn/showproblem.php?pid=2852
题意:spoj227:告诉每个位置前面有多少个数比当前位置小,求出原序列。hdu2852 设计一个容器,支持几种操作:增加/删除元素,求比a大的数中第k小的数是多少。
分析:两个题思路都是求数组里面的第K小的数。开...
分类:
编程语言 时间:
2015-07-21 13:03:25
阅读次数:
158
先上代码. 1 2 3 4 5 6 7 8 9 10 过滤结果:{{num|number:2}}11 {{someWord | ChangeFirstWord}}12 13 14 39 11行中的number过滤器是angular自带的.可以将数字按照自...
分类:
Web程序 时间:
2015-07-21 12:27:46
阅读次数:
118
1. 获取IOS APP占用的内存#import // ...void report_memory(void) { struct task_basic_info info; mach_msg_type_number_t size = sizeof(info); kern_return_t ke...
分类:
移动开发 时间:
2015-07-21 12:23:55
阅读次数:
220
题目:
Given a binary tree, find its minimum depth.
The minimum depth is the number of nodes along the shortest path from the root node down to the nearest leaf node.
题意:
给定一棵二叉树,返回它的最小高度。
最小高...
分类:
编程语言 时间:
2015-07-21 10:39:59
阅读次数:
132
http://poj.org/problem?id=3259DescriptionWhile exploring his many farms, Farmer John has discovered a number of amazing wormholes. A wormhole is very ...
分类:
其他好文 时间:
2015-07-21 10:35:43
阅读次数:
99
//模拟n个人参加选举的过程,并输出选举结果:假设候选人有四个,分别用A,B,C,D表示,当选某人时,直接输入其编号(由计算机随机产生),选举结束后按得票率从高到低输出候选人编号和所得票数 int number = 0; int rand = 0; int temp = 0; ...
分类:
移动开发 时间:
2015-07-21 10:16:25
阅读次数:
188
【017-Letter Combinations of a Phone Number (电话号码上的单词组合)】【LeetCode-面试算法经典-Java实现】【所有题目目录索引】原题 Given a digit string, return all possible letter combinations that the number could represent.
A mapping...
分类:
编程语言 时间:
2015-07-21 09:11:42
阅读次数:
133
【016-3 Sum Closest(最接近的三个数的和)】【LeetCode-面试算法经典-Java实现】【所有题目目录索引】原题 Given an array S of n integers, find three integers in S such that the sum is closest to a given number, target. Return the sum of th...
分类:
编程语言 时间:
2015-07-21 09:10:14
阅读次数:
151
Alex and Number时间限制:1 Sec内存限制:128 MB提交:69解决:12[提交][状态]题目描述Alex love Number theory. Today he think a easy problem, Give you number N and L, To calculat...
分类:
其他好文 时间:
2015-07-21 09:04:50
阅读次数:
192
今天在一台被监控的主机上写了一个用户参数(UserParameter),用于监控这台主机上的一个pid,还有一些别的用户参数,其他的用户参数都正确获得了,唯独这个后加的pid始终没有获得到数据,服务和日志都重启查看了,没有任何报错,也试过将pid的这个值设置成text和number,但都..
分类:
其他好文 时间:
2015-07-21 07:55:52
阅读次数:
3604