将所有点极角排序,建立线段树,线段树每个节点维护该区间内所有点组成的上下凸壳. 对于一个查询,二分查找出相应区间的左右端点,在线段树上得到$O(\log n)$个节点,在相应凸壳上三分查找出与斜边叉积最大的那个点,看看是否为正即可. 时间复杂度$O(n\log^2n)$. #include<cstdio> #include<algorithm> using namespace std; typedef long long ll; const int N=100010,E=20000…
Search GO 说明:输入题号直接进入相应题目,如需搜索含数字的题目,请在关键词前加单引号 Problem ID Title Source AC Submit Y 1000 A+B Problem 10983 18765 Y 1036 [ZJOI2008]树的统计Count 5293 13132 Y 1588 [HNOI2002]营业额统计 5056 13607 1001 [BeiJing2006]狼抓兔子 4526 18386 Y 2002 [Hnoi2010]Bounce 弹飞绵羊 43…
Tri Tiling Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 1631 Accepted Submission(s): 928 Problem DescriptionIn how many ways can you tile a 3xn rectangle with 2x1 dominoes? Here is a sampl…
Tri Tiling Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 2731 Accepted Submission(s): 1547 Problem Description In how many ways can you tile a 3xn rectangle with 2x1 dominoes? Here is a sam…
Tri Tiling Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 10306 Accepted: 5237 Description In how many ways can you tile a 3xn rectangle with 2x1 domino…