【HDOJ 1086】 模板水过】的更多相关文章

You can Solve a Geometry Problem too Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 8693    Accepted Submission(s): 4232 Problem Description Many geometry(几何)problems were designed in the ACM/I…
Rectangles    HDOJ(2056) http://acm.hdu.edu.cn/showproblem.php?pid=2056 题目描述:给2条线段,分别构成2个矩形,求2个矩形相交面积. 算法:先用快速排斥判断2个矩形是否相交.若不相交,面积为0.若相交,将x坐标排序去中间2个值之差,y坐标也一样.最后将2个差相乘得到最后结果. 这题是我大一的时候做过的,当时一看觉得很水,写起来发现其实没我想的那么水.分了好几类情况没做出来.今天看了点关于判断线段相交的知识,想起了这题便拿来练…
Going Home Time Limit: 1000MS   Memory Limit: 65536K Total Submissions: 15944   Accepted: 8167 Description On a grid map there are n little men and n houses. In each unit time, every little man can move one unit step, either horizontally, or vertical…
题意:求在数列中能找到几个个长度为k 的区间,里面的 k 个数字排完序后是连续的. 思路:枚举范围,判断区间内是否有重复的数字(主席树),没有的话求区间最大-区间最小(RMQ),判断是否等于K,是的话sum++,否则continue: 主席树:原理不太懂,暂时还没能到能研究的水平,不过知道时间复杂度之类的,以后希望能用到的时候不是敲完上交了才知道超时了.... 时间复杂度 建树      O(n): 更新     O(log(n)): 查询     O(log(n)): #include <io…
Problem Description Ignatius drinks milk everyday, now he is in the supermarket and he wants to choose a bottle of milk. There are many kinds of milk in the supermarket, so Ignatius wants to know which kind of milk is the cheapest. Here are some rule…
Stars Time Limit: 5000/2000 MS (Java/Others)    Memory Limit: 32768/65536 K (Java/Others) Total Submission(s): 785    Accepted Submission(s): 335 Problem Description Yifenfei is a romantic guy and he likes to count the stars in the sky. To make the p…
Problem Description Many geometry(几何)problems were designed in the ACM/ICPC. And now, I also prepare a geometry problem for this final exam. According to the experience of many ACMers, geometry problems are always much trouble, but this problem is ve…
Clock Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/65536 K (Java/Others) Total Submission(s): 316    Accepted Submission(s): 215 Problem Description Give a time.(hh:mm:ss),you should answer the angle between any two of the minute.hou…
达神主席树讲解传送门:http://blog.csdn.net/dad3zz/article/details/50638026 2016-02-23:真的是模板题诶,主席树模板水过.今天新校网不好,没有评测,但我立下flag这个代码一定能A.我的同学在自习课上考语文,然而机房党都跑到机房来避难了\(^o^)/~ 2016-02-24:果然A乐~~~,我们机房党又躲过啦数学考试.良心不安啊 #include<cstdio> #include<cstring> #include<…
http://acm.hdu.edu.cn/showproblem.php?pid=5012 Problem Description There are 2 special dices on the table. On each face of the dice, a distinct number was written. Consider a1.a2,a3,a4,a5,a6 to be numbers written on top face, bottom face, left face,…