https://vjudge.net/problem/HDU-2680 题意:给出m条边及其起始点终点与长度,已知可以从w个起点出发,求到某个终点s的最短路径。注意是单向边。m<1e5,w<n<1000. 题解:若每个起点都kijkstra一遍时间复杂度为O((E+VlogV)*V),会TLE,想 ...
分类:
其他好文 时间:
2018-03-07 20:19:33
阅读次数:
184
Description Farmer John's farm consists of a long row of N (1 <= N <= 100,000)fields. Each field contains a certain number of cows, 1 <= ncows <= 2000 ...
分类:
其他好文 时间:
2018-03-06 21:54:15
阅读次数:
258
«Next please», — the princess called and cast an estimating glance at the next groom. The princess intends to choose the most worthy groom, this is, t ...
分类:
其他好文 时间:
2018-03-04 21:11:34
阅读次数:
175
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=3613 题目大意: 题目大意就是将字符串s分成两部分子串,若子串是回文串则需计算价值,否则价值为0,求分割字符串s能获得的最大价值。 解题思路: 用manacher算法计算出p[i],每次计算p[i]是顺 ...
分类:
其他好文 时间:
2018-03-04 01:14:00
阅读次数:
204
题目链接: http://acm.hdu.edu.cn/showproblem.php?pid=3613 题目大意: 大意就是将字符串s分成两部分子串,若子串是回文串则需计算价值,否则价值为0,求分割字符串s能获得的最大价值。 解题思路:将原串s反转得到rs,然后进行rs,s扩展KMP匹配,得到ex ...
分类:
其他好文 时间:
2018-03-04 01:07:50
阅读次数:
176
1.动态sql 01.if:单独使用if,后面必须有where 1=1 02.where:上面的代码有点问题,就是在xml文件中的sql语句有where 1=1,如果查询条件多的话,性能是很低的,因为每次查询都需要判断一次!这时候 我们就需要使用 where 标签来代替! 代码: 03.choose ...
分类:
其他好文 时间:
2018-03-01 11:51:00
阅读次数:
156
主要知识点 常规multi-field搜索结果分析 dis_max参数设置 一、为帖子数据增加content字段 POST /forum/article/_bulk { "update": { "_id": "1"} } { "doc" : {"content" : "i like to write... ...
分类:
其他好文 时间:
2018-02-28 19:45:13
阅读次数:
167
Description Since you are the best Wraith King, Nizhniy Magazin ?Mir? at the centre of Vinnytsia is offering you a discount. You are given an array a ...
分类:
其他好文 时间:
2018-02-26 23:15:26
阅读次数:
233
At Stackify, we understand the amount of effort that goes into creating great applications. That’s why we build tools for Application Performance Mana ...
分类:
移动开发 时间:
2018-02-26 15:11:40
阅读次数:
636
Stefan Hagen在博文 "SAP Cloud Application Studio Performance Best Practices" 里介绍了在C4C里使用Cloud Application Studio进行ABSL编程的一些性能方面的最佳实践。 文章里提纲挈领地给出了一些guidel ...
分类:
移动开发 时间:
2018-02-25 14:36:24
阅读次数:
175