contains a integerTindicating the total number of test cases. Each test case begins with an integerN, denoting the number of stars in the sky. FollowingNLines, each contains2Integersxi,yi , describe the coordinates ofNStars.1≤T≤ 3≤n≤ −10000≤xi,yi≤10000 All coordinates is distinct. Outputfor Each test case, please output "' YES '" If the Stars can form a regular polygon. Otherwise, Output "' NO '" (both without quotes).Sample Input330 01 11 040 00 11 01 150 00 10 22 22 0Sample Ou
Lining up
Time Limit: 2000MS
Memory Limit: 32768K
Total Submissions: 24786
Accepted: 7767
Description"How am I ever going to solve this problem?" said the pilot.Indeed, the pilot is not facing a easy task. She had to drop packages at specific points scattered in a dangerous area. Furthermore, the pilot could only fly through the area once in a straight line, and she had to fly over as many points as Pos Sible. All points were given
Chapter Two, the local theory of the curve2.1 Concept of the curveA discussion of non-regular curves:, which is an irregular point (a sharp point), and it is an irregular curve.Intuitively, discontinuities, outliers, nodes (intersections), cusp points are non-regular points.It is recorded that when the same curve is represented by different parametric equations, the same curve may appear as a regular curve under one parameter representation and a non-regular curve under another parameter represe
Topic PortalTest instructions: Given some points, ask to make up the area and maximum of two disjoint rectanglesAnalysis: Violent enumeration, first find the two points that can make up the rectangle and save it (vis array very good), and then write a function to determine whether four points inside another rectangle. There was no save rectangle, with for to find the rectangle, the result is confused to forget to judge the situation of the back shape .../*****************************************
Title: The topic is very simple, that is, a matrix is solid, give a line segment, ask if line and matrix intersectProblem-solving ideas: The use of line segments and segments are crossed, and then determine whether the line is inside the matrix, it should be noted that the coordinates of the matrix he gives is obviously not the upper left and right coordinates, it is necessary to judge the bottom left and right point of the coordinates.#include POJ 1410 intersection (computational
first.
1610: [Usaco2008 feb]line tethered game time
limit:5 Sec Memory limit:64 MBsubmit:1810 solved:815[Submit] [Status] [Discuss]
DescriptionFarmer John has recently invented a game to test the pretentious Bessie. At the beginning of the game, FJ would give Bessie a piece of wood with a non-coincident point of N (2 Input* Line 1th: Enter 1 positive integers: N* 2nd. N+1 Line: Line i+1 with 2 spaces separated by the integer x_i, y_i, describes the coordinates of point IOutputL
program would repeatedly read in four points that define, lines in the X-y plane and determine how and where the Li NES intersect. All numbers required by this problem would be reasonable, say between-1000 and 1000.InputThe first line contains an integer N between 1 and ten describing how many pairs of lines is represented. The next N lines would each contain eight integers. These integers represent the coordinates of four points on the plane in the order X1y1x2y2x3y3x4y4. Thus each of these in
Topic PortalTest instructions: A polygon, a point and a B point, meet the PB Analysis: This is a Apollonius circle. Since it is a circle, then the general equation of the Circle: (x + d/2) ^ 2 + (y + e/2) ^ 2 = (D ^ 2 + E ^ 2-4 * F)/4, the center and radius are solved by the PB = = PA * k solution equation. Then is a set of templates, Shanghai Jiaotong University's Red Book./************************************************* author:running_time* Created TIME:2015/11/9 Monday 11:51:27* Fil E Name:
Topic PortalTest instructions: Find a straight line, so that the rest of the points are in the same side of the line, and so that the average distance to get straight lines shortest.Analysis: The training guide P274, the convex hull first, if each side is counted side, is O (n ^ 2), however, according to the formula known straight line ax + by + C = 0. The distance from the point (x0, y0) to the line is: Fabs (ax0+by0+c)/sqrt (a*a+ B*B).So as long as the x's and and Y's and, can be calculated at
fixed-point $I $ root axis, which satisfies $IA ^2 = If^2\rightarrow IA = if$.q$\cdot$ e$\cdot$ DCommentary:1. The root axis refers to the equal power of the two circles (trajectory), that is, a point to the power of the two circumference of the same points of the trajectory. The trajectory is a straight line perpendicular to the two-circle concentric line. In particular,When the two circles intersect, the root axis is two round common chord;When the two circles are tangent, the root axis is th
, E; the intN, M; the intTMP[MAXM]; the intANS[MAXM];94 the intOK (point P, line L) { theRT ((L.B.Y-L.A.Y) * (p.x-l.a.x)-(P.Y-L.A.Y) * (l.b.x-l.a.x)); the }98 About BOOLCMP (line A, line B) { - if(A.A = = B.A)returnA.B b.b;101 returnA.A B.A;102 }103 104 intMain () { the //FRead ();106 intx1, x2;107 BOOLFlag =1;108 while(~rint (n) N) {109 Cls (TMP); Cls (ans); the Rint (m); Rint (s.x); Rint (S.Y); Rint (e.x); Rint (E.Y);111 Rep (i, n) { the Rint (x1); Rint (x2);113Line[
Summer training out of the first one blood feel oneself Meng Meng da ...This problem itself is not a pit point is just a translation giant pit ...Solution Thigh in do B ann seniors in do e i idle also nothing just a word a word translation f ...Finally feel ...Most of the problems do not understand ...It doesn't really work ...Presumably ...is to give you a point of n ...M-Loop ...Ask you which circuit is the outermost ...In the end is to let you ask which circuit composed of the largest graphic
.
The procedure for triangular fee-for-horse points is:
(1) If there is a corner greater than 120 degrees. Then the point at which this corner is located is the Fermi point.
(2) if not present. So for the triangle ABC, take two edges (if AB, AC), outward do equilateral triangle get C ' and A '. Then the intersection of AA ' and CC ' is the fee-for-horse point.
So for this n polygon, the strategy I took is completely different, using simulated annealing practice. This approac
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.