标题来源:哥几个系列故事——形成完善II意甲冠军:中国思维:在manacher断 保证非严格递减即可了#include #include #include using namespace std;const int maxn = 100110;int a[maxn i) dp[i] = min(.....
分类:
其他好文 时间:
2015-07-03 10:30:01
阅读次数:
116
题意:给定一个矩阵,其中有一些地方有水,现在有一些长度任意,宽为1的木板,要求在所有板不跨越任何坑的前提下,用一些木板盖住这些有水的地方,问至少需要几块板子?
思路:
然后你们懂的,二分匹配好了。
代码如下:
#include
#include
#include
#include
using namespace std;
const int N = 600;
int n,...
分类:
其他好文 时间:
2015-07-03 09:22:10
阅读次数:
126
先贴出来网狐源码:
#ifndef WH_THREAD_HEAD_FILE
#define WH_THREAD_HEAD_FILE
#pragma once
#include "ServiceCoreHead.h"
//////////////////////////////////////////////////////////////////////////////////
//线程...
分类:
其他好文 时间:
2015-07-03 09:19:05
阅读次数:
1092
//poj 4014
//sep9
#include
#include
using namespace std;
int n;
struct DICE
{
int ids;
int num;
int a[128];
}d[1024];
int cmp1(DICE x,DICE y)
{
return x.num<y.num;
}
int cmp2(DICE x,DICE y)
{
...
分类:
其他好文 时间:
2015-07-03 09:16:32
阅读次数:
341
1 #include 2 #include 3 #include 4 #include 5 #include 6 #include 7 using namespace std; 8 int map[60][10]; 9 int main()10 {11 int n,m;12 whi...
分类:
其他好文 时间:
2015-07-03 09:10:28
阅读次数:
111
1AC. 1D DP + Sieving#include #include #include #include #include #include #include #include #include #include #include using namespace std;int ways(in...
分类:
其他好文 时间:
2015-07-03 07:59:09
阅读次数:
110
http://poj.org/problem?id=1256题意是说求出一个字符串的全排列,按字典序需要注意的是字典序和传统意义上的字典序不同重新定义了,A#include #include #include #include #include #include using namespace st...
分类:
其他好文 时间:
2015-07-03 06:53:51
阅读次数:
105
本文摘自《UNIX网络编程 卷1》。fork和exec函数 fork函数是Unix/Linux中派生新进程的唯一方法。其定义如下:#include pid_t fork(void);// 返回:若成功则在子进程中返回0,在父进程中返回子进程ID,若出错则返回-1 fork函数调用一次,返回两...
分类:
其他好文 时间:
2015-07-03 06:49:03
阅读次数:
177
#include
#include
void inplace_swap(int *x, int *y) {
*y = *x ^ *y;
*x = *x ^ *y;
*y = *x ^ *y;
}
int main() {
int x = 12;
int y = 23;
inplace_swap(&x, &y);
printf...
分类:
其他好文 时间:
2015-07-03 01:44:19
阅读次数:
127
//poj 2193
//sep9
#include
using namespace std;
typedef __int64 INT;
INT dp[16][2048];
int n,m;
int main()
{
int cases,t=0;
scanf("%d",&cases);
while(cases--){
scanf("%d%d",&n,&m);
memset(dp,0...
分类:
其他好文 时间:
2015-07-03 01:41:59
阅读次数:
198