#include #include #include #include using namespace std;void print(vector &num) { int len = num.size(); bool value_begin = false; for (int i=...
分类:
其他好文 时间:
2014-10-31 20:37:03
阅读次数:
210
如果程序中需要使用C++的输入(cin)或输出(cout)工具,必须提供这样两行代码:1 #include 2 using namespace std; //可以使用空间名称为std里面的东西 当我建立一个名为HelloWord 的C++工程时会出现这样的代码:1 using namespac...
分类:
编程语言 时间:
2014-10-31 20:34:06
阅读次数:
141
zoj月赛的题目,非常不错的一个状压dp。。题目大意是一个一维的2048游戏只要有相邻的相同就会合并,合并之后会有奖励分数,总共n个,每个都可以取或者不取问最终得到的最大值数据范围n#include #include#include#include#includeusing namespace st...
分类:
其他好文 时间:
2014-10-31 20:29:23
阅读次数:
212
HDU 3718 Similarity
题目链接
题意:给定一个标准答案字符串,然后下面每一行给一个串,要求把字符一种对应一种,要求匹配尽量多
思路:显然的KM最大匹配问题,位置对应的字符连边权值+1
代码:
#include
#include
#include
#include
using namespace std;
const int MAXNODE ...
分类:
其他好文 时间:
2014-10-31 19:08:04
阅读次数:
214
下边代码解决了 避免创建新线程 规避了线程池的创建过多线程 解决浪费资源问题
using System;
using System.Collections.Generic;
using System.Text;
using System.Threading;
namespace MyThreadPool
{
///
/// 线程任务队列
///
///
publi...
分类:
编程语言 时间:
2014-10-31 17:26:08
阅读次数:
196
控制器代码:usingSystem;usingSystem.Collections.Generic;usingSystem.Linq;usingSystem.Web;usingSystem.Web.Mvc;usingSystem.Data;usingSystem.Configuration;usingSystem.Data.SqlClient;namespace显示Demo.Controllers{publicclassHomeController:Controller{////GET:/Ho..
分类:
数据库 时间:
2014-10-31 16:04:06
阅读次数:
225
本来以为很容易的,结果还是写了我两个小时。用指针模拟queue类,再加上类,各种错误,总算是解决掉了--#include#include#includeusing namespace std;class Item{private: int time; int cost;public: ...
分类:
其他好文 时间:
2014-10-31 15:32:14
阅读次数:
254
本来以为很容易的,结果还是写了我两个小时。用指针模拟queue类,再加上类,各种错误,总算是解决掉了--#include#include#includeusing namespace std;class Item{private: int time; int cost;public: ...
分类:
其他好文 时间:
2014-10-31 15:25:41
阅读次数:
140
#include #include #include #include #include int Int[10010];int visit[100010];using namespace std;int main(){ int n; while(cin>>n&&n) { ...
分类:
其他好文 时间:
2014-10-31 15:04:55
阅读次数:
234
滚动建图,最大费用流(每次仅仅有就10个点的二分图)。复杂度,m/n*(n^2)(n //78ms#include #includeusing namespace std;const double inf =0x3f3f3f3f;const int maxv=50,maxe=500;int head...
分类:
其他好文 时间:
2014-10-31 15:04:34
阅读次数:
239