poj 1266 Cover an Arc.】的更多相关文章

http://poj.org/problem?id=1266 Cover an Arc. Time Limit: 1000MS   Memory Limit: 10000K Total Submissions: 823   Accepted: 308 Description A huge dancing-hall was constructed for the Ural State University's 80-th anniversary celebration. The size of t…
题目链接:http://acm.timus.ru/problem.aspx?space=1&num=1043 题目大意:一个2000*2000方格坐标,x,y范围都是[-1000,1000].现在给你一个圆弧,告诉你圆弧的两个端点和任意一个中间点.现在要你算出最小的矩形(长和宽都要为整数,即四个顶点在方格顶点上)来完全覆盖这个圆弧. 算法思路:很明显要算出圆心,这个可以有线段中垂线交求,也可以由方程,只是很麻烦.然后以圆心找出这个圆的左右上下四个极点,判断是否在圆弧上(用叉积即可),与给出的三个…
题目大意:给出一条圆弧上的两个端点A,B,和圆弧上两端点之间的一个点C,现在要用一块各个定点的坐标均为整数的矩形去覆盖这个圆弧,要求最小的矩形面积. 思路:叉积在本体发挥很强大的作用.首先求出三个点所在圆的圆心,也就是三角形的外心,然后判断着个圆上最上,最下,最左,最右四个点是否在该圆弧上,如果在,那么所求矩形的最上,最下,最左,最右边的坐标就是对应的点的坐标,否则,应该有圆弧两端点的坐标的相对大小来确定! 要判断一个点是否在圆弧上,主要用到叉积!把AB连结起来,设待检测的点式P,则如果是p在圆…
http://poj.org/problem?id=2376 Cleaning Shifts Time Limit: 1000MS   Memory Limit: 65536K Total Submissions: 12604   Accepted: 3263 Description Farmer John is assigning some of his N (1 <= N <= 25,000) cows to do some cleaning chores around the barn.…
Mayor's posters Time Limit:1000MS     Memory Limit:65536KB     64bit IO Format:%I64d & %I64u Submit Status Practice POJ 2528 Description The citizens of Bytetown, AB, could not stand that the candidates in the mayoral election campaign have been plac…
http://poj.org/problem?id=2482 线段树扫描线 #include<cstdio> #include<cstring> #include<algorithm> using namespace std; const int N = 20003; int in() { int k = 0, fh = 1; char c = getchar(); for(; c < '0' || c > '9'; c = getchar()) if (c…
Chessboard Time Limit: 2000MS   Memory Limit: 65536K Total Submissions: 14787   Accepted: 4607 Description Alice and Bob often play games on chessboard. One day, Alice draws a board with size M * N. She wants Bob to use a lot of cards with size 1 * 2…
Chessboard Time Limit: 2000MS   Memory Limit: 65536K Total Submissions: 12800   Accepted: 4000 Description Alice and Bob often play games on chessboard. One day, Alice draws a board with size M * N. She wants Bob to use a lot of cards with size 1 * 2…
Mayor's posters Time Limit: 1000MS   Memory Limit: 65536K Total Submissions: 59239   Accepted: 17157 Description The citizens of Bytetown, AB, could not stand that the candidates in the mayoral election campaign have been placing their electoral post…
题目链接:http://poj.org/problem?id=2784 Buy or Build Time Limit: 2000MS   Memory Limit: 65536K Total Submissions: 1528   Accepted: 592 Description World Wide Networks (WWN) is a leading company that operates large telecommunication networks. WWN would li…