/*
ID:kevin_s1
PROG:runround
LANG:C++
*/
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
using namespace std;
//直接枚举即可
//gobal variable...
用tarjan进行缩点。
然后用dfs求最长路。水体。。。
#include
#include
#include
#include
#include
#include
#include
using namespace std;
#define maxn 110000
vectorold[maxn];
vectorvec[maxn];
int dnf[maxn],low[maxn],instac...
如果不需要求边的个数的话,就是一个裸的最小割问题。
求边的个数就用边的权值记录一下。
#include
#include
#include
#include
#include
using namespace std;
#define INF 99999999
#define LL long long
const LL maxn =55;
const LL maxm =4400;
con...
from:unix高级环境编程
unix/linux中共享内存是最高效的ipc方式。
有几种使用方式:
1)mmap /dev/zero设备:
fd = open("/dev/zero", O_RDWR);
area = mmap(0, size, PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0);
close(fd);
加入MAP_SHARE...
破烂的文具盒里,一张十年的纸条子和一袋存了十年的德芙巧克力
浅绿色的纸条子上写是当时你给我抄的作业题目,蓝色清秀的字体
可是十年后,你却已嫁他人
将身后的风雪,夕阳,空气埋葬、窑藏,待很多年以后酿成美酒,开窑,与另一个人共饮...
dp[i][j]:还有i个不相同的位置,还能走j步,一共有多少种走法。
很明显
dp[i][j]=sigm(dp[i-k][j-1]*c[i][k]*c[n-i][m-k]);
用记忆化搜索记忆一下即可。
#include
#include
#include
#include
#include
#include
#include
using namespace std;
#define m...
使用l,r指针游动。
然后使用记录游动过程中的最大值。
我离散化了一下。
#include
#include
#include
#include
#include
#include
using namespace std;
#define maxn 110000
mapmp;
struct list
{
int x;
int get;
int lose;
in...
As we all know,a thread is a separate process on your computer.you can run multiple threads all at the same time.
multi-threaded code has the disadvantage of becoming quite complex very quickly,altho...
LinQ to Object是指对任意IEnumerable或Ienumerable集合使用linq查询.它可代替查询任何可枚举的集合.如List,Array或Dictionary.
LINQ的优点
和foreache相比有三个优点
它们更简明、更易读,尤其在筛选多个条件时。它们使用最少的应用程序代码提供强大的筛选、排序和分组功能。无需修改或只需做很小的修改即可...
题目链接:点击打开链接
= = 990+ms卡过
#include
#include
#include
#include
#include
#include
using namespace std;
#define N 100010
#define L(x) (x<<1)
#define R(x) (x<<1|1)
#define ll int
ll n,m,k,a,b;
ll x[N];
b...