title:
The sum of the squares of the first ten natural numbers is,
12 + 22 + ... + 102 = 385
The square of the sum of the first ten natural numbers is,
(1 + 2 + ... + 10)2 = 552 = 3025
Hence ...
分类:
其他好文 时间:
2014-06-05 12:03:29
阅读次数:
243
【题目】
Given a string S and a string T, find the minimum window in S which will contain all the characters in T in complexity O(n).
For example,
S = "ADOBECODEBANC"
T = "ABC"
Minimum window is "BANC".
Note:
If there is no such window in S that covers ...
分类:
其他好文 时间:
2014-06-05 11:14:26
阅读次数:
255
说明第一下:按照前面的方式我们创建了项目,如果使用的是最新的ADT,Minimum Android SDK选的是android2.*或1.*,此时会默认创建一个兼容的项目,——appcompat_v7,这个项目还是不能删除的,删除会报错。。
说明第二下:项目创建好了之后,发现layout文件夹(布局)中会有默认两个文件:adtivity和fragment文件:
1、Fragment概述...
分类:
移动开发 时间:
2014-06-05 10:21:13
阅读次数:
308
【题目】
Given a string S and a string T, find the minimum window in S which will contain all the characters in T in complexity O(n).
For example,
S = "ADOBECODEBANC"
T = "ABC"
Minimum window is "BANC".
Note:
If there is no such window in S that covers ...
Given an array S of n integers, are there elements
a, b, c, and d in S such that a +
b + c + d = target?
Find all unique quadruplets in the array which gives the sum of target.
Note:
...
分类:
其他好文 时间:
2014-06-05 00:34:06
阅读次数:
240
当一道题目,使用__int64超时,使用int就能A的时候,我想,这个题,不是一个好题。。。。。
add[i]:记录加的lazy标记
mul[i]:记录乘的lazy标记
num[i]:记录数的lazy标记
sum[i][j]:第i段,j次方的和。
除去lazy标记的下放,这完全就是一道水的线段树的题目。。。
lazy标记如何下放呢?
1,首先查看num标记,如果存在,果断下放。
2...
分类:
其他好文 时间:
2014-06-04 21:41:27
阅读次数:
343
成员:周其范20112794
胡宝月20112827上课的时候老师布置了这个题目,初一看这个题目,我们讨论的时候就是在想,应该从第一个数开始,一个一个加,一直加到最后一个数,然后从第二个数开始,一个一个加,加到最后一个,以此类推,在比较的过程中,我们需要比较每加一次的数大小,把每比一次的数赋给sum...
分类:
其他好文 时间:
2014-06-03 09:53:07
阅读次数:
243
逆序数的性质。1. 暴力解 1 #include 2 3 #define MAXNUM 5005 4
5 int a[MAXNUM]; 6 7 int main() { 8 int n; 9 int i, j, sum, min;10 11 while
(scanf(...
分类:
其他好文 时间:
2014-05-31 07:50:50
阅读次数:
170
DescriptionLet us consider sets of positive
integers less than or equal ton. Note that all elements of a set are different.
Also note that the order o...
分类:
其他好文 时间:
2014-05-31 05:12:49
阅读次数:
246
Floyd。注意字典序!!! 1 #include 2 #include 3 4
#define MAXNUM 55 5 #define INF 0x1fffffff 6 7 int cost[MAXNUM][MAXNUM]; 8 int
path[MAXNUM][MAXNUM]; 9 in...
分类:
其他好文 时间:
2014-05-31 04:41:38
阅读次数:
218