排序后贪心或根据第二关键字找最长下降子序列#pragma comment(linker,
"/STACK:1024000000,1024000000")#include#include#include#include#include#include#include#include#include#i...
分类:
其他好文 时间:
2014-05-08 19:36:06
阅读次数:
267
HttpWebRequest myReq =
(HttpWebRequest)WebRequest.Create(path+filename); //创建一个请求(获得需要的文件信息)
HttpWebResponse myRes = (HttpWebResponse)myReq.GetRe...
分类:
Web程序 时间:
2014-05-07 17:00:11
阅读次数:
270
本来是打算昨天晚上写的, 昨天网速渣的连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
std::string GetFilePath() { char
exepath[MAX_PATH];std::string strdir,tmpdir;memset(exepath,0,MAX_PATH);
GetModuleFileName(NULL,exepath,MAX_PATH); tmp...
分类:
其他好文 时间:
2014-05-07 14:59:14
阅读次数:
240
DescriptionYou are to write a program that has
to decide whether a given line segment intersects a given rectangle.An
example:line: start point: (4,9)...
分类:
其他好文 时间:
2014-05-07 13:55:45
阅读次数:
387
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
题目;http://poj.org/problem?id=3182题意:一个棋盘中间有一个联通块,给你一个起点让你从起点开始绕联通块外围一圈并回到起点,求最小步数。分析:首先根据数据的范围比较小,所以觉得应该是搜索,而且是BFS。朴素的想法是从起点开始BFS
8个方向扩展,不过这样肯定要跪。注意到这...
分类:
其他好文 时间:
2014-05-07 11:18:41
阅读次数:
330
C#中关于文件操作的类主要有:1、Path类 2、Directory类 3、File类
4、Stream类1、Path类Path类中方法主要是对字符串的操作,与实际的文件没有任何关系。但是他对于文件的路径的形式的字符串的操作相当牛逼,可以直接提取类似文件路径字符串中的文件目录信息(GetDir...
分类:
其他好文 时间:
2014-05-07 00:48:56
阅读次数:
352