上一页 1 ··· 4 5 6 7 8 9 10 11 12 13 下一页
摘要: BNU的基础题,数据结构的基础题,顺便搞下.二叉树是一种常用的数据结构。我们可以用大写的英文字母表示二叉树的节点。如下: B / \ / \ C A \ \ ... 阅读全文
posted @ 2015-04-25 16:45 BYYB_0506 阅读(655) 评论(0) 推荐(0) 编辑
摘要: 题目大意: 就是说,给你两个起始的x和y,然后x每次增加m,y每次增加n,以及长度L,求出最小的变化次数T,有(x+m*T)-(y+n*T)==P*L.解题思路: 裸裸的扩展欧几里得。 分析:假设跳了T次以后,青蛙1的坐标便是x+m*T,青蛙2的坐标为y+n*T。它们能够相遇的情况为(x+m*... 阅读全文
posted @ 2015-04-25 11:50 BYYB_0506 阅读(171) 评论(0) 推荐(0) 编辑
摘要: 题目描述刷题是每个ACMer必由之路,已知某oj上有n个题目,第i个题目小X能做对的概率为Pi(0 2 # include 3 4 using namespace std; 5 6 # define MAX 1234 7 8 double p[MAX]; 9 double dp[MAX]... 阅读全文
posted @ 2015-04-25 00:35 BYYB_0506 阅读(625) 评论(0) 推荐(0) 编辑
摘要: 题目大意:解题思路:代码: 1 # include 2 # include 3 4 using namespace std; 5 6 # define inf 99999999 7 # define MAX 1000010 8 9 struct Segtree 10 { 11... 阅读全文
posted @ 2015-04-24 00:47 BYYB_0506 阅读(181) 评论(0) 推荐(0) 编辑
摘要: 看到UESTC的数据结构专题快要结束了,感觉自己真心浪费了好多时间,没有像鑫航学姐那样叮嘱的一样,紧紧的跟住训练。所以下决心认认真真的开始学习下线段树的知识,以前对于线段树的学习都是一知半解的,就是说,我只知道线段树是用来单点更新和区间查值的,其实,线段树的功能远远不止这些。 先来说下,线段树... 阅读全文
posted @ 2015-04-23 23:40 BYYB_0506 阅读(232) 评论(0) 推荐(0) 编辑
摘要: 294 DivisorsMathematicians love all sorts of odd properties of numbers. For instance, they consider 945 to be aninteresting number, since it is the r... 阅读全文
posted @ 2015-04-23 21:15 BYYB_0506 阅读(281) 评论(0) 推荐(0) 编辑
摘要: 先并查集,然后最小生成树,最短路,强连通,双连通,LCA,二分匹配,网络流,2-sat这部分搞完后,开始树直径,树重心,欧拉回路,树分治 阅读全文
posted @ 2015-04-23 20:43 BYYB_0506 阅读(225) 评论(0) 推荐(0) 编辑
摘要: Sum of Consecutive Prime NumbersTime Limit:1000MSMemory Limit:65536KTotal Submissions:20560Accepted:11243DescriptionSome positive integers can be repr... 阅读全文
posted @ 2015-04-22 23:14 BYYB_0506 阅读(136) 评论(0) 推荐(0) 编辑
摘要: Sum of Different PrimesTime Limit:5000MSMemory Limit:65536KTotal Submissions:3280Accepted:2040DescriptionA positive integer may be expressed as a sum ... 阅读全文
posted @ 2015-04-22 00:59 BYYB_0506 阅读(196) 评论(0) 推荐(0) 编辑
摘要: Binary numbers and their pattern of bits are always very interesting to computer programmers. In this problem you need to count the number of positive... 阅读全文
posted @ 2015-04-21 22:09 BYYB_0506 阅读(208) 评论(1) 推荐(0) 编辑
上一页 1 ··· 4 5 6 7 8 9 10 11 12 13 下一页