- 博客(9)
- 资源 (2)
- 问答 (1)
- 收藏
- 关注
原创 JAVA 学习(1)
一、 面向对象的程序设计 1、类、域、方法与实例对象 class : 【修饰词列表】 class 【extends 父类 】【implements 接口名称列表】 1)构造方法与类名相同; 2)构造方法不具有任何返回值类型; 3)任何一个类都有构造方法,如果没有显示的构造方法,系统会为类定义一个默认的构造方法(不含参数)一旦类中已经有定义的构造方法,
2015-10-27 23:59:18 254
原创 poj 3764
题意:已知:给出n个结点,n-1条边(附边的长度).定义:两结点间的异或长度为两点之间所有边相异或的值.求:树中的最长异或长度. 思路:恒等式:x ^ y == ( x ^ z ) ^ ( y ^ z ),有了这个等式,我们可以将任意两点x、y的异或长度Xor[x,y]转化为x到另一结点z(如z=0)的异或长度Xor[x,z],y到另一结点z(如z=0)的异或长度Xor[y,z]相异或,即Xor[
2015-10-21 13:59:55 318
原创 hdu 4096
大模拟准定挂好多次,心塞塞的 #include #include #include #include #include #include using namespace std; mapstring,int> nword; mapstring,int> vword; int wcnt; bool vis[3005]; int head[3005], ecnt; c
2015-10-11 21:06:56 283
原创 POJ 2406 Power Strings
Description Given two strings a and b we define a*b to be their concatenation. For example, if a = “abc” and b = “def” then a*b = “abcdef”. If we think of concatenation as multiplication, exponentiati
2015-10-10 21:33:00 223
原创 SPOJ DISUBSTR Distinct Substrings
Description Given a string, we need to find the total number of its distinct substrings.InputT- number of test cases. T<=20; Each test case consists of one string, whose length is <= 1000OutputFor ea
2015-10-10 21:23:59 265
原创 POJ 3261 Milk Patterns
POJ 3261 Description Farmer John has noticed that the quality of milk given by his cows varies from day to day. On further investigation, he discovered that although he can’t predict the quality of m
2015-10-10 21:10:50 257
原创 POJ 1743 Musical Theme
Description A musical melody is represented as a sequence of N (1<=N<=20000)notes that are integers in the range 1..88, each representing a key on the piano. It is unfortunate but true that this repre
2015-10-10 20:58:43 229
原创 后缀数组
2009年国家集训队论文 关于后缀数组的实现论文里都讲的的很清楚了,个人觉得后缀数组重点应用的是基数排序思想,跟height数组 两个数组不要弄混: sa[i] 排名i的suffix的起始位置是sa[i]。 rank[i] suffix(i)的排名为rank[i]。 两个比较流行的算法一个是倍增法一个是DC3算法
2015-10-10 20:37:23 287
原创 UVALive 6904
题意 : 有如下交通收费标准 1. 公交车 1每次,火车1每次,火车2每次 2.公交车火车之间换乘需要重新买票 3. 3可以买一张公交卡,有效期1天,无限次坐车,但是火车票要额外买4.3可以买一张公交卡,有效期1天,无限次坐车,但是火车票要额外买 4. 6一张坐车卡,有效期一天无限次坐乘火车公交车 5. 18有效期7天的公交卡,无限次,火车需要额外
2015-10-02 17:53:14 273
iOS app 模拟器图片显示不全
2016-01-06
TA创建的收藏夹 TA关注的收藏夹
TA关注的人