自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+

菜鸟只能慢慢练

望各路高手多多赐教

  • 博客(5)
  • 问答 (1)
  • 收藏
  • 关注

原创 poj1407 zoj1141

//这道题明显的lca问题,使用

2014-07-25 22:45:25 586

原创 poj1330

//当时在写这道题的时候 #include #include #include using namespace std; const int N = 10000; vector a[N]; int f[N],r[N]; void DFS(int u,int dep) {     r[u] = dep;     for(vector::iterator i

2014-07-25 22:41:38 548

原创 zoj1674

#include #include #include #include using namespace std; const int maxn = 1000 + 10; int layer[maxn]; int parent[maxn]; map mhash; int num = 0; void solve(int i) {     string s1;

2014-07-25 22:33:15 492

原创 poj 1703 并查集

#include #include using namespace std; const int maxn = 100000 + 10; int set[maxn + maxn ];//这道题是这样的思路,如果a,b是对立帮派(龙帮,蛇帮),那么a和b + n(b的对立帮派)是同一帮派,b 和 a+n(a的对立帮派)是同一帮派 int set_find(int d) {

2014-07-24 23:00:26 550

原创 poj 1988 并查集

#include #include const int maxn = 100000 + 100; int set[maxn];//记录每个元素的栈低(代表元素)元素 int top[maxn];//记录每个元素的栈顶元素 int cnt[maxn];//j记录每个元素到栈低的元素个数 int set_find(int p)//查找元素p的栈底元素,并进行路径压缩,并更新 p

2014-07-24 22:47:38 547

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除