摘要: 最近使用git从github上clone代码,总是失败,奔溃了快。还有ubuntu连apt-get update都执行不了,有的时候都装不了git,就快骂娘了。可惜在这样一个环境下,只能靠自己搞定了,设置代理是比较好的方式引用http://yansu.org/2013/05/20/set-proxy-for-git-or-apt.html安装goagent这个教程网上很多,放狗一搜即可。不过网上goagent教程里讲的大部分是给浏览器用的。其实goagent是监听了本地的8087端口,其实任何程序都可以利用这个端口,只要设置好即可。设置git代理直接在终端输入export https_prox 阅读全文
posted @ 2013-08-10 23:52 z.arbitrary 阅读(221) 评论(0) 推荐(0) 编辑
摘要: 题意:区间翻转,切割,插入// File Name: ACM/HDU/3487.cpp// Author: Zlbing// Created Time: 2013年08月10日 星期六 21时35分28秒#include#include#include#include#include#include#include#include#include#include#include#includeusing namespace std;#define CL(x,v); memset(x,v,sizeof(x));#define INF 0x3f3f3f3f#define LL long long# 阅读全文
posted @ 2013-08-10 22:05 z.arbitrary 阅读(319) 评论(0) 推荐(0) 编辑
摘要: 题意:依次找第i大的数下标pos[i],然后将区间[i,pos[i]]翻转分析:splay树区间翻转// File Name: ACM/HDU/1890.cpp// Author: Zlbing// Created Time: 2013年08月10日 星期六 20时26分39秒#include#include#include#include#include#include#include#include#include#include#include#includeusing namespace std;#define CL(x,v); memset(x,v,sizeof(x));#defin 阅读全文
posted @ 2013-08-10 21:21 z.arbitrary 阅读(567) 评论(0) 推荐(0) 编辑
摘要: 区间更新求和主要用来练习splay树区间更新问题//splay树的题解// File Name: 3468-splay.cpp// Author: Zlbing// Created Time: 2013年08月09日 星期五 16时30分32秒#include#include#include#include#include#include#include#include#include#include#include#includeusing namespace std;#define CL(x,v); memset(x,v,sizeof(x));#define INF 0x3f3f3f3f# 阅读全文
posted @ 2013-08-10 16:59 z.arbitrary 阅读(263) 评论(0) 推荐(0) 编辑
摘要: 题意:给出一个n个数的数列a,对于第i个元素ai定义fi=min(abs(ai-aj)),(1#include#include#include#include#include#include#include#include#include#include#includeusing namespace std;#define CL(x,v); memset(x,v,sizeof(x));#define INF 0x3f3f3f3f#define LL long long#define REP(i,r,n) for(int i=r;i=r;i--)const int MAXN=200010;con 阅读全文
posted @ 2013-08-10 14:08 z.arbitrary 阅读(1305) 评论(0) 推荐(0) 编辑
摘要: 这个题也是单点维护,不管来的是人还是狗,只要num=0就插入,否则就删除。// File Name: ACM/bzoj/1208.cpp// Author: Zlbing// Created Time: 2013年08月08日 星期四 16时33分53秒#include#include#include#include#include#include#include#include#include#include#include#includeusing namespace std;#define CL(x,v); memset(x,v,sizeof(x));#define INF 0x3f3f 阅读全文
posted @ 2013-08-10 11:00 z.arbitrary 阅读(487) 评论(0) 推荐(0) 编辑