摘要: 比如我今天想写一个二分查找: 首先,很容易的写下 int bSearch(int begin, int end, int e) 然后,很自然的定义 int mid, left = begin, right = end; 接下来怎么写呢?while(left > 1; 用位运算能节省一些时间... 阅读全文
posted @ 2015-05-14 00:32 AI_Believer 阅读(508) 评论(0) 推荐(0)
摘要: splay_rotate:inline void rotate(splay_node *x){ splay_node *y,*z;int d1,d2; d1=get_parent(x,y);//三个结点扔过来同时统计d值 d2=get_parent(y,z); if(y->c... 阅读全文
posted @ 2015-05-09 00:13 AI_Believer 阅读(285) 评论(0) 推荐(0)
摘要: 1.没有dp的日子仿佛饭菜没放盐,没有树巨结垢的日子仿佛口袋没有钱.2.算法努力,AC随缘.3.人生就像OI啊真是又WA又T。。。---J 阅读全文
posted @ 2015-05-08 22:55 AI_Believer 阅读(384) 评论(0) 推荐(0)
摘要: 传送门:http://oj.cnuschool.org.cn/oj/home/problem.htm?problemID=620绝世难题(一) 可爱的仙人掌难度级别:E; 运行时间限制:1000ms; 运行空间限制:262144KB; 代码长度限制:2000000B试题描述---“神犇是怎么样的。。... 阅读全文
posted @ 2015-05-06 21:32 AI_Believer 阅读(351) 评论(0) 推荐(0)
摘要: 1 #include 2 #include 3 #include 4 #include 5 #include 6 #include 7 using namespace std; 8 9 char in[15] = "std00.in";10 char out[15] = "std00... 阅读全文
posted @ 2015-05-06 21:27 AI_Believer 阅读(301) 评论(0) 推荐(0)
摘要: 传送门:http://oj.cnuschool.org.cn/oj/home/problem.htm?problemID=302The Flash难度级别:B; 运行时间限制:1000ms; 运行空间限制:51200KB; 代码长度限制:2000000B试题描述"My name is Barry A... 阅读全文
posted @ 2015-05-03 14:51 AI_Believer 阅读(184) 评论(0) 推荐(0)
摘要: 传送门:http://oj.cnuschool.org.cn/oj/home/problem.htm?problemID=986WZJ的数据结构(八)难度级别:E; 运行时间限制:3000ms; 运行空间限制:51200KB; 代码长度限制:2000000B试题描述给你一个N个节点的森林,从1到N编... 阅读全文
posted @ 2015-05-03 14:46 AI_Believer 阅读(286) 评论(0) 推荐(0)
摘要: 其实可以优化读入函数的,但考虑到现在的数据多么坑是吧,就酱吧……万一不给你最后那个字符不就T了…… 1 #include 2 #include 3 #include 4 #include 5 #include 6 #include 7 using namespace std... 阅读全文
posted @ 2015-04-27 21:50 AI_Believer 阅读(233) 评论(0) 推荐(0)
摘要: 传送门:http://oj.cnuschool.org.cn/oj/home/problem.htm?problemID=983WZJ的数据结构(七)难度级别:C; 运行时间限制:1000ms; 运行空间限制:51200KB; 代码长度限制:2000000B试题描述给你一棵N个节点的无根树,每个点有... 阅读全文
posted @ 2015-04-26 17:11 AI_Believer 阅读(237) 评论(0) 推荐(0)
摘要: 传送门:http://oj.cnuschool.org.cn/oj/home/problem.htm?problemID=1720604悲剧文本难度级别:B; 运行时间限制:1000ms; 运行空间限制:51200KB; 代码长度限制:2000000B试题描述 你有一个键盘,键盘上所有的键都能正常使... 阅读全文
posted @ 2015-04-25 22:28 AI_Believer 阅读(424) 评论(0) 推荐(0)