题意:平面上,一个圆,圆的边上按顺时针放着n个点。现在要连m条边,比如a,b,那么a到b可以从圆的内部连接,也可以从圆的外部连接。给你的信息中,每个点最多只会连接的一条边。问能不能连接这m条边,使这些边都不相交。
算比较裸的题目了,关键找到如何判断两对点交不交叉的关系就好
#include
#include
#include
#include
#include
using namespac...
分类:
其他好文 时间:
2015-05-13 16:50:45
阅读次数:
116
分析:该題可以用线段树做,也可以用树状数组做;感觉树状数组容易一些,这里就用树状数组了。这里保存字符数组的下标从1开始,树状数组初始化从3开始,因为只有大于等于3使才可能有符合要求的字串出现,最终计算L到R区间的个数时要用getsum(R)-getsum(L+1),因为可能有符合要求的str[L-1],str[L],str[l+1]也被算进去了,实际上他并不在区间L到R内。更新时要注意三种情况,P...
分类:
编程语言 时间:
2015-05-13 10:42:28
阅读次数:
173
Ikki's Story IV - Panda's TrickTime Limit:1000MSMemory Limit:131072KTotal Submissions:8437Accepted:3101Descriptionliympanda, one of Ikki’s friend, lik...
分类:
其他好文 时间:
2015-04-19 19:18:04
阅读次数:
152
1、about选项卡
2、X File Settings选项卡
3、Textures & .fx files选项卡
4、Animation选项卡
5、Mesh选项卡
6、3DS Max Objects...
分类:
其他好文 时间:
2015-04-06 23:17:33
阅读次数:
366
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=4046When I wrote down this letter, you may have been on the airplane to U.S. We have known for 15 years...
分类:
编程语言 时间:
2015-04-04 13:34:06
阅读次数:
320
Blocks
Time Limit: 1000MS Memory Limit: 65536K
Total Submissions: 4529 Accepted: 2044
DescriptionPanda has received an assignment of painting a line of blocks. Since Panda is such an intell...
分类:
其他好文 时间:
2015-03-29 09:25:12
阅读次数:
125
题目大意:在一串字符串中某个区间查询wbw的数目,更新某个位置的字符
思路:线段树,每个枝结点记录以这个点为中心的字符是不是wbw,所以每次某个位置更新的时候,左右两个位置均要更新
而且查询的时候某个区间的wbw的个数,位于边界的字符的值不能算在内
//561MS 3400K 3373 B
#include
#include
#include
#include
using namespac...
分类:
其他好文 时间:
2015-03-10 10:24:52
阅读次数:
158
http://poj.org/problem?id=3207题意:一个圆上顺时针依次排列着标号为1~n的点,这些点之间共有m条边相连,每两个点只能在圆内或者圆外连边。问是否存在这些边不相交的方案。(n#include #include #include #include using namespac...
分类:
其他好文 时间:
2015-03-10 07:52:38
阅读次数:
178
Problem DescriptionWhen I wrote down this letter, you may have been on the airplane to U.S.
We have known for 15 years, which has exceeded one-fifth of my whole life. I still remember the first time...
分类:
其他好文 时间:
2015-03-09 19:09:55
阅读次数:
168
PandaTime Limit: 10000/4000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 2565Accepted Submission(s): 861Problem Descr...
分类:
其他好文 时间:
2015-03-09 18:59:56
阅读次数:
235