上一页 1 ··· 3 4 5 6 7 8 9 10 11 ··· 13 下一页
摘要: Description Ponyo and Garfield are waiting outside the box-office for their favorite movie. Because queuing is so boring, that they want to play a gam 阅读全文
posted @ 2016-08-07 18:24 wust_ouyangli 阅读(375) 评论(0) 推荐(0) 编辑
摘要: 代码 //先init,然后Build_tree(hd[0],左,右),接下来Update(hd[前一个],hd[当前],左,右,数,数量) //可支持在线。最后可查询 #define e tree[rt] #define p tree[pre] int hd[maxn]; struct Tree{ 阅读全文
posted @ 2016-08-07 10:37 wust_ouyangli 阅读(119) 评论(0) 推荐(0) 编辑
摘要: Problem Description Alice get a string S. She thinks palindrome string is interesting. Now she wanna know how many three tuple (i,j,k) satisfy 1≤i≤j<k 阅读全文
posted @ 2016-08-07 10:34 wust_ouyangli 阅读(373) 评论(0) 推荐(0) 编辑
摘要: Problem Description In this problem, you are given a string s and q queries.For each query, you should answer that when all distinct substrings of str 阅读全文
posted @ 2016-08-07 10:18 wust_ouyangli 阅读(243) 评论(0) 推荐(0) 编辑
摘要: 代码 int rmq[maxn][20],Lg[maxn]; void GetLg() { Lg[0]=-1; for(int i=1;i<maxn;i++) Lg[i]=Lg[i-1]+(i&(i-1)?0:1); } int f(int x){ return 1<<x; } void ST(in 阅读全文
posted @ 2016-08-05 15:55 wust_ouyangli 阅读(92) 评论(0) 推荐(0) 编辑
摘要: Problem Description YaoYao is fond of playing his chains. He has a chain containing n diamonds on it. Diamonds are numbered from 1 to n. At first, the 阅读全文
posted @ 2016-08-03 20:29 wust_ouyangli 阅读(262) 评论(0) 推荐(0) 编辑
摘要: Description Wind loves pretty dogs very much, and she has n pet dogs. So Jiajia has to feed the dogs every day for Wind. Jiajia loves Wind, but not th 阅读全文
posted @ 2016-08-03 18:14 wust_ouyangli 阅读(238) 评论(0) 推荐(0) 编辑
摘要: Description You have N integers, A1, A2, ... , AN. You need to deal with two kinds of operations. One type of operation is to add some given number to 阅读全文
posted @ 2016-08-03 15:18 wust_ouyangli 阅读(132) 评论(0) 推荐(0) 编辑
摘要: 解析: 多校标答 第一类:Pij 表示第i个点和第j个点组合的点,那么Pij的权值等于w[i][j]+w[j][i](表示得分)第二类:原串中的n个点每个点拆出一个点,第i个点权值为 –a[s[i]] (表示要花费)第三类:对于10种字符拆出10个点,每个点的权值为 -(b[x]-a[x]) 最大权 阅读全文
posted @ 2016-08-02 20:37 wust_ouyangli 阅读(152) 评论(0) 推荐(0) 编辑
摘要: Description 辉辉热衷于洞穴勘测。某天,他按照地图来到了一片被标记为JSZX的洞穴群地区。经过初步勘测,辉辉发现这片区域由n个洞穴(分别编号为1到n)以及若干通道组成,并且每条通道连接了恰好两个洞穴。假如两个洞穴可以通过一条或者多条通道按一定顺序连接起来,那么这两个洞穴就是连通的,按顺序连 阅读全文
posted @ 2016-08-01 21:00 wust_ouyangli 阅读(194) 评论(0) 推荐(0) 编辑
上一页 1 ··· 3 4 5 6 7 8 9 10 11 ··· 13 下一页