排序后贪心或根据第二关键字找最长下降子序列#pragma comment(linker,
"/STACK:1024000000,1024000000")#include#include#include#include#include#include#include#include#include#i...
分类:
其他好文 时间:
2014-05-08 19:36:06
阅读次数:
267
Why need initialization and cleanup?A large
segment of C bugs occur when the programmer forgets to initialize or clean up a
variable.The class designe...
分类:
编程语言 时间:
2014-05-08 19:13:20
阅读次数:
326
动态字幕代码:在需要处加入欢迎访问JavaScript教程网
特点:当你把鼠标指向字幕时字幕停止并有链接、移开鼠标指针字幕又滚动了,运用以上代码即可实现。延伸:动态字幕有一个属性“direction”,它是控制字幕滚动方向的,把“direction”的属性改为“up”,就可以实现向上滚动,同理当改为...
分类:
编程语言 时间:
2014-05-08 19:04:30
阅读次数:
379
本来是打算昨天晚上写的, 昨天网速渣的连CSDN都进不去,没办法 只能现在来写了
先写写对KM算法的理解,KM算法是对每个点设置一个顶标,只有当边长等于两边点的顶标之和的时候才进行增广,这样就能保证得到的一定是最大权匹配。
如果找不到匹配的时候就对交替路中X集合的顶标减少一个d Y集合的顶标增加一个d。
这样两个点都在交替路中的时候x[i]+y[i]的和不边
X在 Y不在的时候x[...
分类:
其他好文 时间:
2014-05-07 15:50:04
阅读次数:
348
本文出自:http://blog.csdn.net/svitter
原题:http://poj.org/problem?id=1141
题意:输出添加括号最少,并且使其匹配的串。
题解: dp [ i ] [ j ] 表示添加括号的个数, pos[ i][ j ] 表示i, j中哪个位置分开,使得两部分分别匹配。
初始值置dp [ i ] [ i ] = 1; 如果只有一个括号,...
分类:
其他好文 时间:
2014-05-07 15:17:21
阅读次数:
367
.closest( selector )
Description: For
each element in the set, get the first element that matches the selector by testing the element itself and traversing up through its ancestors in the DOM tre...
分类:
Web程序 时间:
2014-05-07 15:07:34
阅读次数:
380
Dual Core CPUTime Limit:15000MSMemory
Limit:131072KTotal Submissions:18120Accepted:7818Case Time
Limit:5000MSDescriptionAs more and more computers are...
分类:
其他好文 时间:
2014-05-07 13:35:17
阅读次数:
227
Description
Given a map of islands and bridges that connect these islands, a Hamilton path, as we all know, is a path along the bridges such that it visits each island exactly once. On our map, there...
分类:
其他好文 时间:
2014-05-07 13:04:35
阅读次数:
402
Chef had an interesting dream last night. He dreamed of a new revolutionary chicken recipe. When he woke up today he tried very hard to reconstruct the ingredient list. But, he could only remember cer...
分类:
其他好文 时间:
2014-05-07 11:23:54
阅读次数:
330
题目;http://poj.org/problem?id=3182题意:一个棋盘中间有一个联通块,给你一个起点让你从起点开始绕联通块外围一圈并回到起点,求最小步数。分析:首先根据数据的范围比较小,所以觉得应该是搜索,而且是BFS。朴素的想法是从起点开始BFS
8个方向扩展,不过这样肯定要跪。注意到这...
分类:
其他好文 时间:
2014-05-07 11:18:41
阅读次数:
330