摘要: 1 #include 2 #include 3 #include 4 #include 5 #include 6 using namespace std; 7 #define maxn 60500 8 #define inf 0x3fffffff 9 int ch[maxn][2]; 10 int s[maxn],ma[maxn],val[maxn],pre[maxn],rt[maxn]; 11 int n,nn; 12 int e[maxn],ne[maxn*2],f[maxn],v[maxn*2]; 13 void add(int x,int y){ 14 ne... 阅读全文
posted @ 2014-04-11 19:07 wangyucheng 阅读(159) 评论(0) 推荐(0) 编辑
摘要: 题目:http://www.lydsy.com/JudgeOnline/problem.php?id=2561#include#include#include#include#includeusing namespace std;#define maxn 20010#define maxm 400100int e[maxn],u[maxm],ne[maxm],v[maxm],l[maxm],n,m,tt=1;int s,t,L;bool been[maxn];void add(int x,int y,int z){ ne[++tt]=e[x],e[x]=tt,v[tt]=y,l[... 阅读全文
posted @ 2014-04-11 16:46 wangyucheng 阅读(219) 评论(0) 推荐(0) 编辑