📄 maxflow.h
字号:
#ifndef __MAXFLOW_H__
#define __MAXFLOW_H__
typedef long flowtype;
struct Edge
{
long from;
long to;
long cap;
};
#define BLOCK_SIZE 512
struct EdgeList
{
struct Edge edge[BLOCK_SIZE];
struct EdgeList *next;
int num;
};
struct Graph
{
long node_min, node_max;
long m;
long source;
long sink;
struct EdgeList *first;
struct EdgeList *current;
};
struct Graph * init_graph(long source, long sink);
void add_edge(struct Graph *graph, long from, long to, long cap);
flowtype maxflow(struct Graph *graph, int *cut);
#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -