People attend college or university for a lot of different reasons. I believe that the three most common reasons are to prepare for a career, to have ...
分类:
其他好文 时间:
2015-05-15 21:12:50
阅读次数:
140
题目传送门 1 #include 2 #include 3 #define lson l, m, rt > 1;23 build (lson);24 build (rson);25 }26 27 int update(int p, int l, int r, int rt)28 ...
分类:
其他好文 时间:
2015-05-15 19:53:15
阅读次数:
118
题目:Say you have an array for which theithelement is the price of a given stock on dayi.If you were only permitted to complete at most one transaction ...
分类:
其他好文 时间:
2015-05-15 19:25:13
阅读次数:
150
The best recipe for becoming a complete flop in Google Play is to release an app that is battery and memory hungry with a slow interface. Most likely,...
分类:
移动开发 时间:
2015-05-15 15:22:14
阅读次数:
236
Given an interval list which are flying and landing time of the flight. How many airplanes are on the sky at most?ExampleFor interval list[[1,10],[2,3...
分类:
其他好文 时间:
2015-05-14 23:40:05
阅读次数:
174
Given a non-negative number represented as an array of digits, plus one to the number.The digits are stored such that the most significant digit is at the head of the list.
对一个数字进行加1运算,这里需要注意进位的情况。按以...
分类:
其他好文 时间:
2015-05-14 20:34:53
阅读次数:
126
题目链接:http://poj.org/problem?id=2886题意:N个人坐成一个圈,每个人都有个值A代表这他左边或右边的第A个人出圈,刚开始第k个人出圈。第i个人出圈得到价值为i的因子数的个数。求出圈价值最大的那个人。思路:因为数据N为500000,所以需要利用线段树。不需要考虑N个人坐成一圈,认为N个人排成一个队列。每次更新当前队列中第k个人出圈,得到出圈人的下标。代码如下:#inclu...
分类:
其他好文 时间:
2015-05-14 14:15:44
阅读次数:
94
在Sina App Engine(SAE)上用python flask框架+MySQL搭app服务器时,select返回中文时jsonify函数报如下错误:(为调试放拜我异常时return的traceback.format_exc())
Traceback (most recent call last): File “/data1/www/htdocs/245/jcguo/1/myapp.py”...
分类:
数据库 时间:
2015-05-14 08:43:09
阅读次数:
962
There is a matrix containing at most 106
elements divided into r rows and c columns. Each element
has a location (x; y) where 1 x r, 1 y c. Initially, all the elements are zero. You need to...
分类:
其他好文 时间:
2015-05-13 23:18:45
阅读次数:
411
Follow up for "Remove Duplicates": What if duplicates are allowed at most twice?
For example,
Given sorted array nums = [1,1,1,2,2,3],
Your function should return length = 5, with the first five el...
分类:
其他好文 时间:
2015-05-13 23:18:20
阅读次数:
331