Shape of HDU Time Limit: 3000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 4972    Accepted Submission(s): 2250 Problem Description 话说上回讲到海东集团推选老总的事情,最终的结果是XHD以微弱优势当选,从此以后,“徐队”的称呼逐渐被“徐总”所取代,海东集团(HDU)也算是名副其实了.…
链接: http://acm.hdu.edu.cn/showproblem.php?pid=2108 http://acm.hust.edu.cn/vjudge/contest/view.action?cid=27459#problem/A Shape of HDU Time Limit: 3000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 4320    Acc…
Shape of HDU Time Limit: 3000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others) Problem Description 话说上回讲到海东集团推选老总的事情,最终的结果是XHD以微弱优势当选,从此以后,“徐队”的称呼逐渐被“徐总”所取代,海东集团(HDU)也算是名副其实了.创业是需要地盘的,HDU向钱江肉丝高新技术开发区申请一块用地,很快得到了批复,据说这是因为他们公司研发的“海东牌”…
Shape of HDU Time Limit: 3000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 5575    Accepted Submission(s): 2531 Problem Description 话说上回讲到海东集团推选老总的事情,最终的结果是XHD以微弱优势当选,从此以后,“徐队”的称呼逐渐被“徐总”所取代,海东集团(HDU)也算是名副其实了.…
Shape of HDU Time Limit: 3000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 5059    Accepted Submission(s): 2294 Problem Description 话说上回讲到海东集团推选老总的事情,最终的结果是XHD以微弱优势当选,从此以后,“徐队”的称呼逐渐被“徐总”所取代,海东集团(HDU)也算是名副其实了.…
题解:按照输入顺序依次将点连接起来,对于连续的三个点p0,p1,p2,令向量a=p1-p0,b=p2-p1 若是凸多边形,那么b相对于a一定是向逆时针方向旋转的 判断两向量的旋转方向,可以使用向量的叉积 a×b=x1×y2-x2×y1 a×b>0  b在a的逆时针方向a×b=0  b平行于a(共线)a×b<0  b在a的顺时针方向 要注意的是,对于最后一个点pn,还要和起始的两个点p0,p1判断一次. #include <cstdio> struct node{int x,y;}p…
#include <iostream> #include <algorithm> #include <cstring> #include <cstdio> #include <string> #include <map> #include <cmath> #include <vector> #define Faster ios::sync_with_stdio(false),cin.tie(0) #define…
求点到直线的距离: double dis(point p1,point p2){   if(fabs(p1.x-p2.x)<exp)//相等的  {    return fabs(p2.x-pegx);    }  else     {   double k=(p2.y-p1.y)/(p2.x-p1.x);   double b=p2.y-k*p2.x;   return fabs(k*pegx-pegy+b)/sqrt(k*k+1);//返回的是距离的   }}判断多边形是否为凸多边形 if…
LINK:Cupid's Arrow 前置函数 atan2 返回一个向量的幅角.范围为[Pi,-Pi) 值得注意的是 返回的是 相对于x轴正半轴的辐角. 而判断一个点是否在一个多边形内 通常有三种方法: 一种就是令这个点向多边形内所有边求角度的和 如果为2Pi 或者 -2Pi那么就在其中 一种是射线法 看这个点引出的射线和多边形的交点个数.奇数在内部 反之在外部. 面积判别法 看下和每条边所形成面积 是否等于多边形的面积. 前两者都还可以用于凹多边形 第三者我不太清楚. 这里使用的是第一种方法:…
Problem Description 话说上回讲到海东集团推选老总的事情,最终的结果是XHD以微弱优势当选,从此以后,"徐队"的称呼逐渐被"徐总"所取代,海东集团(HDU)也算是名副其实了. 创业是需要地盘的,HDU向钱江肉丝高新技术开发区申请一块用地,很快得到了批复,据说这是因为他们公司研发的"海东牌"老鼠药科技含量很高,预期将占全球一半以上的市场.政府划拨的这块用地是一个多边形,为了描述它,我们用逆时针方向的顶点序列来表示,我们很想了解这块…
You can Solve a Geometry Problem too Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 6425    Accepted Submission(s): 3099 Problem Description Many geometry(几何)problems were designed in the ACM/I…
Problem Description As we all know that RXD is a life winner, therefore he always goes out, dating with his female friends.Nevertheless, it is a pity that his female friends don't like extremely hot temperature. Due to this fact, they would not come…
Problem Description   You live in a village but work in another village. You decided to follow the straight path between your house (A) and the working place (B), but there are several rivers you need to cross. Assume B is to the right of A, and all…
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…
Legal or Not Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 5906    Accepted Submission(s): 2734 Problem Description ACM-DIY is a large QQ group where many excellent acmers get together. It is…
Shape of HDU Time Limit: 3000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 5369    Accepted Submission(s): 2445 Problem Description 话说上回讲到海东集团推选老总的事情,最终的结果是XHD以微弱优势当选,从此以后,"徐队"的称呼逐渐被"徐总"所取代,海东…
下面是别人解题报告的链接,很详细,写的很好 http://blog.csdn.net/chl_3205/article/details/8520597 下面贴我的代码 #include <cstdio> struct point { int x,y; } p[]; bool checkDir(point p0,point p1,point p2) { ) return true; else return false; } int main() { // freopen("in.cpp…
Shape of HDU Time Limit: 3000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 7797    Accepted Submission(s): 3526 Problem Description 话说上回讲到海东集团推选老总的事情,最终的结果是XHD以微弱优势当选,从此以后,"徐队"的称呼逐渐被"徐总"所取代,海东集…
链接:传送门 思路:判断每支箭是否在多边形内,计算几何点定位中水题,不清楚下面的代码能不能适用于给定点的顺序不确定( 既不是顺时针又不是逆时针 ) /************************************************************************* > File Name: hdu1756.cpp > Author: WArobot > Blog: http://www.cnblogs.com/WArobot/ > Created T…
Shape of HDU Time Limit: 3000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 217 Accepted Submission(s): 126   Problem Description 话说上回讲到海东集团推选老总的事情,最终的结果是XHD以微弱优势当选,从此以后,“徐队”的称呼逐渐被“徐总”所取代,海东集团(HDU)也算是名副其实了.创业是需要…
Higher Math Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 2219    Accepted Submission(s): 1219 Problem Description You are building a house. You’d prefer if all the walls have a precise right…
再遇攻击 Time Limit: 1000 MS    Memory Limit: 65536 K Total Submit: 253(37 users)   Total Accepted: 56(29 users)       Rating:         Special Judge: No Description Dota中英雄技能攻击会有一个范围,现在释放一个技能给出他的攻击范围和目标英雄的位置,问是否能攻击到.攻击范围保证是一个多边型. Input 有多组测试数据 第一行输入1个整数n…
Problem Description 人随着岁数的增长是越大越聪明还是越大越笨,这是一个值得全世界科学家思考的问题,同样的问题Eddy也一直在思考,因为他在很小的时候就知道亲和串如何判断了,但是发现,现在长大了却不知道怎么去判断亲和串了,于是他只好又再一次来请教聪明且乐于助人的你来解决这个问题. 亲和串的定义是这样的:给定两个字符串s1和s2,如果能通过s1循环移位,使s2包含在s1中,那么我们就说s2 是s1的亲和串. Input 本题有多组测试数据,每组数据的第一行包含输入字符串s1,第二…
War on Weather Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 300    Accepted Submission(s): 162 Problem Description After an unprovoked hurricane attack on the south shore, Glorious Warrior ha…
A water problem 题目链接: http://acm.hdu.edu.cn/showproblem.php?pid=5832 Description Two planets named Haha and Xixi in the universe and they were created with the universe beginning. There is 73 days in Xixi a year and 137 days in Haha a year. Now you k…
这里是杭电hdu上的链接:http://acm.hdu.edu.cn/showproblem.php?pid=3999  Problem Description: As we know,the shape of a binary search tree is greatly related to the order of keys we insert. To be precisely: 1.  insert a key k to a empty tree, then the tree becom…
E - 5 Time Limit:1500MS     Memory Limit:262144KB     64bit IO Format:%I64d & %I64u Submit Status Practice HDU 5391 Description Tina Town is a friendly place. People there care about each other. Tina has a ball called zball. Zball is magic. It grows…
p.MsoNormal { margin: 0pt; margin-bottom: .0001pt; text-align: justify; font-family: Calibri; font-size: 10.5000pt } h1 { margin-top: 5.0000pt; margin-bottom: 5.0000pt; text-align: center; font-family: 宋体; color: rgb(26,92,200); font-weight: bold; fo…
HDU 2096 /* HDU 2096 小明A+B --- 水题 */ #include <cstdio> int main() { #ifdef _LOCAL freopen("D:\\input.txt", "r", stdin); #endif int a, b, c, n; scanf("%d", &n); while (n--){ scanf("%d%d", &a, &b); a…
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=2602 水题啊水题 还给我WA了好多次 因为我在j<w[i]的时候状态没有下传.. #include <cstdio> #include <algorithm> #include <cstring> using namespace std; typedef long long LL; typedef pair<int,int> PII; #define PB…