摘要: 1 /* 2 网络图用临接矩阵表示 3 算法复杂 4 度边数m顶点数n 5 O(n*m*m) 6 寻找增广路径用bfs 7 */ 8 #include<iostream> 9 #include<stdio.h>10 #include<queue>11 #include<cstring>12 using namespace std;13 #define MaxSize 100014 #define MaxNum 0xfffffff15 int g[MaxSize][MaxSize];16 17 int Augment(int g[][MaxSize 阅读全文
posted @ 2012-02-20 23:34 徐徐而来 阅读(258) 评论(0) 推荐(1) 编辑
摘要: View Code 1 #include<iostream> 2 #include<stdio.h> 3 #include<queue> 4 #include<cstring> 5 using namespace std; 6 #define MaxSize 1000 7 #define MaxNum 0xfffffff 8 int g[MaxSize][MaxSize]; 9 10 int Augment(int g[][MaxSize],int n,int s,int t)11 {12 deque<int> q;13 int pr 阅读全文
posted @ 2012-02-20 23:24 徐徐而来 阅读(134) 评论(0) 推荐(0) 编辑
摘要: 1 import java.text.*; 2 import java.util.*; 3 public class ACM2 { 4 public static void main(String[] args) { 5 DecimalFormat f=new DecimalFormat("0.00"); 6 DecimalFormat g=new DecimalFormat("0.0#"); 7 Scanner cin=new Scanner (System.in); 8 double x=cin.nextDouble... 阅读全文
posted @ 2012-02-20 00:11 徐徐而来 阅读(368) 评论(0) 推荐(1) 编辑