Last night the book named [Data Structure with Java Hubbed] was closed. When talked about the advantage that I have taken of, with the help of that book I familize myself with data structure, especially the Java Collection Framework. I think it impor…
From this blog, we start to talk about the index in mongo Database, which is similar to the traditional database. Generally speaking, if the index need to be created in the traditional database, so does MongoDB.  In MongoDB ,the field '_id ' has been…
The Java Connections FrameWork is a group of class or method and interfacs in the java.util package. Its main purpose is to provide a unified framework for implementing common data structure. A collections is a object that contains other objects,whic…
In this blog, we will talk about another the index which was called "The embedded ". First we init 1w the records as follows: watermark/2/text/aHR0cDovL2Jsb2cuY3Nkbi5uZXQvc3hiMDg0MTkwMTExNg==/font/5a6L5L2T/fontsize/400/fill/I0JBQkFCMA==/dissolve…
In this blog the procedure of mongodb will be described in details. It is known that mongodb has provided a series of efficient solution to some different questions, such as high performance, changeable type and so on. Compared with the mysql databas…
[POJ3237]Tree Description You are given a tree with N nodes. The tree's nodes are numbered 1 through N and its edges are numbered 1 through N − 1. Each edge is associated with a weight. Then you are to execute a series of instructions on the tree. Th…
[BZOJ3451]Normal Description 某天WJMZBMR学习了一个神奇的算法:树的点分治! 这个算法的核心是这样的: 消耗时间=0 Solve(树 a) 消耗时间 += a 的 大小 如果 a 中 只有 1 个点 退出 否则在a中选一个点x,在a中删除点x 那么a变成了几个小一点的树,对每个小树递归调用Solve 我们注意到的这个算法的时间复杂度跟选择的点x是密切相关的. 如果x是树的重心,那么时间复杂度就是O(nlogn) 但是由于WJMZBMR比较傻逼,他决定随机在a中选…
[CQOI2012]局部极小值 Description 有一个\(n\)行\(m\)列的整数矩阵,其中\(1\)到\(nm\)之间的每个整数恰好出现一次.如果一个格子比所有相邻格子(相邻是指有公共边或公共顶点)都小,我们说这个格子是局部极小值. 给出所有局部极小值的位置,你的任务是判断有多少个可能的矩阵. 答案对\(123456789\)取模. \(1\leq n\leq 4,1\leq m\leq 7\). 样例输入: 1 3 .X. 样例输出: 2 我们可以发现一张图上的最小值点最多\(8\…
1713 -- [CQOI2006]凸多边形 Description 逆时针给出n个凸多边形的顶点坐标,求它们交的面积.例如n=2时,两个凸多边形如下图: 则相交部分的面积为5.233. Input 第一行有一个整数n,表示凸多边形的个数 以下依次描述各个多边形.第i个多边形的第一行包含一个整数mi,表示多边形的边数,以下mi行每行两个整数,逆时针给出各个顶点的坐标. Output 输出仅包含一个实数,表示相交部分的面积,保留三位小数. Sample Input 2 6 -2 0 -1 -2 1…
[BZOJ4310]跳蚤 Description 很久很久以前,森林里住着一群跳蚤.一天,跳蚤国王得到了一个神秘的字符串,它想进行研究. 首先,他会把串分成不超过 k 个子串,然后对于每个子串 S,他会从S的所有子串中选择字典序最大的那一个,并在选出来的 k 个子串中选择字典序最大的那一个.他称其为"魔力串". 现在他想找一个最优的分法让"魔力串"字典序最小. Input 从文件flea.in中读入数据. 第一行一个整数k. 接下来一个长度不超过10^5的字符串 S…