09 2015 档案

POJ(2186)强连通分量分解
摘要:#include#include#includeusing namespace std;const int MAX_N=10005;vector G[MAX_N]; vector rG[MAX_N];//存储边反向之后的图 vector PostOrder;//存储图的后序遍历 int V,E;bo... 阅读全文

posted @ 2015-09-22 12:12 vCoders 阅读(159) 评论(0) 推荐(0) 编辑

求有向图中强连通分量的个数
摘要:#include#include#includeusing namespace std;const int MAX_N=10005;vector G[MAX_N]; vector rG[MAX_N];//存储边反向之后的图 vector PostOrder;//存储图的后序遍历 int V,E;bo... 阅读全文

posted @ 2015-09-22 10:51 vCoders 阅读(2249) 评论(0) 推荐(0) 编辑

HDOJ5441(图论中的并查集)
摘要:#include#include#includeusing namespace std;const int MAX_N=100005;const int MAX_V=20005;const int MAX_Q=5005;struct edge{ int from,to,cost;}es[MAX... 阅读全文

posted @ 2015-09-19 11:54 vCoders 阅读(176) 评论(0) 推荐(0) 编辑

HDOJ5438(图的各个连通分量遍历)
摘要:#include#includeusing namespace std;const int MAX_N=100005;templatestruct Stack{private: T a[MAX_N]; int top;public: Stack(){ top=0; } ... 阅读全文

posted @ 2015-09-18 23:10 vCoders 阅读(183) 评论(0) 推荐(0) 编辑

HDOJ5044(最近公共祖先)
摘要:#include #include using namespace std; const int MAX_N=100005; struct Edge{ int v,id,next; }edge[MAX_N*4]; int a[MAX_N],b[MAX_N],to[MAX_N],k[MAX_N],lca[MAX_N]; int head[MAX_N],opr[MAX_N],fa[MAX_N... 阅读全文

posted @ 2015-09-18 21:05 vCoders 阅读(256) 评论(0) 推荐(0) 编辑

C++输入输出知识
摘要:1.strtok将字符串中的单词用' '分割出来#include#include#include#include#includeusing namespace std;int main(){ /* fstream fin("input.txt",ios::in); fin>>va... 阅读全文

posted @ 2015-09-04 18:08 vCoders 阅读(284) 评论(0) 推荐(0) 编辑

JAVAmap容器基本使用
摘要:import java.io.PrintWriter; import java.util.HashMap; import java.util.Map; import java.util.Scanner; import java.util.Iterator; public class Main { static PrintWriter cout = new PrintWriter(Sys... 阅读全文

posted @ 2015-09-04 11:25 vCoders 阅读(432) 评论(0) 推荐(0) 编辑

JAVAset容器基本知识
摘要:import java.io.PrintWriter; import java.util.HashSet; import java.util.Scanner; import java.util.Iterator; public class Main { static PrintWriter cout = new PrintWriter(System.out, true); sta... 阅读全文

posted @ 2015-09-04 10:21 vCoders 阅读(512) 评论(0) 推荐(0) 编辑

HDOJ2043(JAVAset容器练习)
摘要:import java.io.PrintWriter;import java.util.HashSet;import java.util.Scanner;public class Main { static PrintWriter cout = new PrintWriter(System.o... 阅读全文

posted @ 2015-09-04 09:40 vCoders 阅读(210) 评论(0) 推荐(0) 编辑

< 2025年3月 >
23 24 25 26 27 28 1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 31 1 2 3 4 5

导航

统计

点击右上角即可分享
微信分享提示