摘要: 线段树基础操作 阅读全文
posted @ 2018-10-15 18:28 真想不出名字了 阅读(238) 评论(0) 推荐(0) 编辑
摘要: Problem Description有N个比赛队(1<=N<=500),编号依次为1,2,3,。。。。,N进行比赛,比赛结束后,裁判委员会要将所有参赛队伍从前往后依次排名,但现在裁判委员会不能直接获得每个队的比赛成绩,只知道每场比赛的结果,即P1赢P2,用P1,P2表示,排名时P1在P2之前。现在 阅读全文
posted @ 2018-10-14 19:05 真想不出名字了 阅读(167) 评论(0) 推荐(0) 编辑
摘要: Anna and Maria are in charge of the math club for junior students. When the club gathers together, the students behave badly. They've brought lots of 阅读全文
posted @ 2018-10-13 23:59 真想不出名字了 阅读(230) 评论(0) 推荐(0) 编辑
摘要: Problem Description Consider a un-rooted tree T which is not the biological significance of tree or plant, but a tree as an undirected graph in graph 阅读全文
posted @ 2018-10-10 19:45 真想不出名字了 阅读(523) 评论(0) 推荐(0) 编辑
摘要: There are N different kinds of transport ships on the port. The ith kind of ship can carry the weight of V[i]V[i] and the number of the ith kind of sh 阅读全文
posted @ 2018-10-08 20:14 真想不出名字了 阅读(235) 评论(0) 推荐(0) 编辑
摘要: There are N children in kindergarten. Miss Li bought them N candies. To make the process more interesting, Miss Li comes up with the rule: All the chi 阅读全文
posted @ 2018-09-16 11:11 真想不出名字了 阅读(361) 评论(0) 推荐(0) 编辑
摘要: You are given positive integer number n. You should create such strictly increasingsequence of k positive numbers a1, a2, ..., ak, that their sum is e 阅读全文
posted @ 2018-09-08 21:52 真想不出名字了 阅读(236) 评论(0) 推荐(0) 编辑
摘要: 描述 Given an N*N matrix, find the coolest square sub-matrix.We define the cool value of the square matrix as X-Y where X indicating the sum of all inte 阅读全文
posted @ 2018-09-08 20:16 真想不出名字了 阅读(237) 评论(0) 推荐(0) 编辑
摘要: Sheila is a student and she drives a typical student car: it is old, slow, rusty, and falling apart. Recently, the needle on the speedometer fell off. 阅读全文
posted @ 2018-09-08 11:38 真想不出名字了 阅读(324) 评论(0) 推荐(0) 编辑
摘要: 描述 Given an N-digit number, you should remove K digits and make the new integer as large as possible. Given an N-digit number, you should remove K dig 阅读全文
posted @ 2018-09-08 10:34 真想不出名字了 阅读(157) 评论(0) 推荐(0) 编辑
摘要: 描述 In this problem, `lattice points' in the plane are points with integer coordinates. In order to contain his cows, Farmer John constructs a triangul 阅读全文
posted @ 2018-09-04 14:10 真想不出名字了 阅读(261) 评论(0) 推荐(1) 编辑
摘要: Alice, a student of grade 6, is thinking about an Olympian Math problem, but she feels so despair that she cries. And her classmate, Bob, has no idea 阅读全文
posted @ 2018-09-01 23:23 真想不出名字了 阅读(595) 评论(0) 推荐(0) 编辑
摘要: 基础素数测试模板 对于大数的素性判断,目前Miller-Rabin算法应用最广泛。一般底数仍然是随机选取,但当待测数不太大时,选择测试底数就有一些技巧了。比如,如果 被测数小于4759123141,那么只需要测试三个底数 a[]={2,7,61} 就足够了。当然,测试的越多,正确的范围也越大。如果你 阅读全文
posted @ 2018-09-01 10:56 真想不出名字了 阅读(636) 评论(0) 推荐(1) 编辑
摘要: tarjan求强连通分量 阅读全文
posted @ 2018-09-01 01:05 真想不出名字了 阅读(209) 评论(0) 推荐(0) 编辑
摘要: Problem Description people in USSS love math very much, and there is a famous math problem . give you two integers n,a,you are required to find 2 inte 阅读全文
posted @ 2018-08-31 19:26 真想不出名字了 阅读(250) 评论(0) 推荐(1) 编辑