计算几何: 堆几何模版就能够了。

。。

Description

Problem E

2D Geometry 110 in 1!

This is a collection of 110 (in binary) 2D geometry problems.

CircumscribedCircle x1 y1 x2 y2 x3 y3

Find out the circumscribed circle of triangle (x1,y1)-(x2,y2)-(x3,y3). These three points are guaranteed to be non-collinear. The circle is formatted as (x,y,r) where (x,y) is the center of circle, r is the
radius.

InscribedCircle x1 y1 x2 y2 x3 y3

Find out the inscribed circle of triangle (x1,y1)-(x2,y2)-(x3,y3). These three points are guaranteed to be non-collinear. The circle is formatted as (x,y,r) where (x,y) is the center of circle, r is the radius.

TangentLineThroughPoint xc yc r xp yp

Find out the list of tangent lines of circle centered (xc,yc) with radius r that pass through point (xp,yp). Each tangent line is formatted as a single real number "angle" (in degrees), the angle of the line
(0<=angle<180). Note that the answer should be formatted as a list (see below for details).


CircleThroughAPointAndTangentToALineWithRadius xp yp x1 y1 x2 y2 r

Find out the list of circles passing through point (xp, yp) that is tangent to a line (x1,y1)-(x2,y2) with radius r. Each circle is formatted as (x,y), since the radius is already given. Note that the answer
should be formatted as a list. If there is no answer, you should print an empty list.


CircleTangentToTwoLinesWithRadius x1 y1 x2 y2 x3 y3 x4 y4 r

Find out the list of circles tangent to two non-parallel lines (x1,y1)-(x2,y2) and (x3,y3)-(x4,y4), having radius r. Each circle is formatted as (x,y), since the radius is already given. Note that the answer
should be formatted as a list. If there is no answer, you should print an empty list.


CircleTangentToTwoDisjointCirclesWithRadius x1 y1 r1 x2 y2 r2 r

Find out the list of circles externally tangent to two disjoint circles (x1,y1,r1) and (x2,y2,r2), having radius r. By "externally" we mean it should not enclose the two given circles. Each circle is formatted
as (x,y), since the radius is already given. Note that the answer should be formatted as a list. If there is no answer, you should print an empty list.

For each line described above, the two endpoints will not be equal. When formatting a list of real numbers, the numbers should be sorted in increasing order; when formatting a list of (x,y) pairs, the pairs
should be sorted in increasing order of x. In case of tie, smaller y comes first.

Input

There will be at most 1000 sub-problems, one in each line, formatted as above. The coordinates will be integers with absolute value not greater than 1000. The input is terminated by end of file (EOF).

Output

For each input line, print out your answer formatted as stated in the problem description. Each number in the output should be rounded to six digits after the decimal point. Note that the list should be enclosed
by square brackets, and tuples should be enclosed by brackets. There should be no space characters in each line of your output.

Sample Input

  1. CircumscribedCircle 0 0 20 1 8 17
  2. InscribedCircle 0 0 20 1 8 17
  3. TangentLineThroughPoint 200 200 100 40 150
  4. TangentLineThroughPoint 200 200 100 200 100
  5. TangentLineThroughPoint 200 200 100 270 210
  6. CircleThroughAPointAndTangentToALineWithRadius 100 200 75 190 185 65 100
  7. CircleThroughAPointAndTangentToALineWithRadius 75 190 75 190 185 65 100
  8. CircleThroughAPointAndTangentToALineWithRadius 100 300 100 100 200 100 100
  9. CircleThroughAPointAndTangentToALineWithRadius 100 300 100 100 200 100 99
  10. CircleTangentToTwoLinesWithRadius 50 80 320 190 85 190 125 40 30
  11. CircleTangentToTwoDisjointCirclesWithRadius 120 200 50 210 150 30 25
  12. CircleTangentToTwoDisjointCirclesWithRadius 100 100 80 300 250 70 50

Output for the Sample Input

  1. (9.734940,5.801205,11.332389)
  2. (9.113006,6.107686,5.644984)
  3. [53.977231,160.730818]
  4. [0.000000]
  5. []
  6. [(112.047575,299.271627),(199.997744,199.328253)]
  7. [(-0.071352,123.937211),(150.071352,256.062789)]
  8. [(100.000000,200.000000)]
  9. []
  10. [(72.231286,121.451368),(87.815122,63.011983),(128.242785,144.270867),(143.826621,85.831483)]
  11. [(157.131525,134.836744),(194.943947,202.899105)]
  12. [(204.000000,178.000000)]

Rujia Liu's Present 4: A Contest Dedicated to Geometry and CG Lovers

Special Thanks: Di Tang and Yi Chen

Source

Root :: Prominent Problemsetters :: Rujia Liu



Root :: Rujia Liu's Presents :: Present 4: Dedicated to Geometry and CG Lovers

Root :: AOAPC I: Beginning Algorithm Contests -- Training Guide (Rujia Liu) :: Chapter 4. Geometry :: Geometric Computations in 2D :: 

option=com_onlinejudge&Itemid=8&category=528" style="color:blue; text-decoration:none">Examples

Submit Status

  1. #include <iostream>
  2. #include <cstring>
  3. #include <cstdio>
  4. #include <algorithm>
  5. #include <cmath>
  6. #include <vector>
  7.  
  8. using namespace std;
  9.  
  10. const double eps=1e-6;
  11.  
  12. int dcmp(double x){if(fabs(x)<eps) return 0; return (x<0)?-1:1;}
  13.  
  14. struct Point
  15. {
  16. double x,y;
  17. Point(double _x=0,double _y=0):x(_x),y(_y){};
  18. };
  19.  
  20. Point operator+(Point A,Point B) {return Point(A.x+B.x,A.y+B.y);}
  21. Point operator-(Point A,Point B) {return Point(A.x-B.x,A.y-B.y);}
  22. Point operator*(Point A,double p) {return Point(A.x*p,A.y*p);}
  23. Point operator/(Point A,double p) {return Point(A.x/p,A.y/p);}
  24.  
  25. bool operator<(const Point&a,const Point&b){return a.x<b.x||(a.x==b.x&&a.y<b.y);}
  26.  
  27. bool operator==(const Point&a,const Point&b){return dcmp(a.x-b.x)==0&&dcmp(a.y-b.y)==0;}
  28.  
  29. double Dot(Point A,Point B) {return A.x*B.x+A.y*B.y;}
  30. double Length(Point A) {return sqrt(Dot(A,A));}
  31. double Angle(Point A,Point B) {return acos(Dot(A,B)/Length(A)/Length(B));}
  32. double Angle(Point v) {return atan2(v.y,v.x);}
  33. double Cross(Point A,Point B) {return A.x*B.y-A.y*B.x;}
  34.  
  35. /**Cross
  36. P*Q > 0 P在Q的顺时针方向
  37. P*Q < 0 P在Q的逆时针方向
  38. P*Q = 0 PQ共线
  39. */
  40.  
  41. Point Horunit(Point x) {return x/Length(x);}///单位向量
  42. Point Verunit(Point x) {return Point(-x.y,x.x)/Length(x);}///单位法向量
  43.  
  44. Point Rotate(Point A,double rad)///逆时针旋转
  45. {
  46. return Point(A.x*cos(rad)-A.y*sin(rad),A.x*sin(rad)+A.y*cos(rad));
  47. }
  48.  
  49. double Area2(const Point A,const Point B,const Point C)
  50. {
  51. return Cross(B-A,C-A);
  52. }
  53.  
  54. /// 过两点p1, p2的直线一般方程ax+by+c=0 (x2-x1)(y-y1) = (y2-y1)(x-x1)
  55. void getLineGeneralEquation(const Point& p1, const Point& p2, double& a, double&b, double &c)
  56. {
  57. a = p2.y-p1.y;
  58. b = p1.x-p2.x;
  59. c = -a*p1.x - b*p1.y;
  60. }
  61.  
  62. ///P+t*v Q+w*t的焦点
  63. Point GetLineIntersection(Point P,Point v,Point Q,Point w)
  64. {
  65. Point u=P-Q;
  66. double t=Cross(w,u)/Cross(v,w);
  67. return P+v*t;
  68. }
  69.  
  70. ///点到直线距离
  71. double DistanceToLine(Point P,Point A,Point B)
  72. {
  73. Point v1=B-A,v2=P-A;
  74. return fabs(Cross(v1,v2))/Length(v1);
  75. }
  76.  
  77. ///点到线段距离
  78. double DistanceToSegment(Point P,Point A,Point B)
  79. {
  80. if(A==B) return Length(P-A);
  81. Point v1=B-A,v2=P-A,v3=P-B;
  82. if(dcmp(Dot(v1,v2))<0) return Length(v2);
  83. else if(dcmp(Dot(v1,v3))>0) return Length(v3);
  84. else return fabs(Cross(v1,v2))/Length(v1);
  85. }
  86.  
  87. ///点到直线投影
  88. Point GetLineProjection(Point P,Point A,Point B)
  89. {
  90. Point v=B-A;
  91. return A+v*(Dot(v,P-A)/Dot(v,v));
  92. }
  93.  
  94. ///推断规范相交
  95. bool SegmentProperIntersection(Point a1,Point a2,Point b1,Point b2)
  96. {
  97. double c1=Cross(a2-a1,b1-a1),c2=Cross(a2-a1,b2-a1);
  98. double c3=Cross(b2-b1,a1-b1),c4=Cross(b2-b1,a2-b1);
  99.  
  100. return dcmp(c1)*dcmp(c2)<0&&dcmp(c3)*dcmp(c4)<0;
  101. }
  102.  
  103. ///一个点是否在直线端点上
  104. bool OnSegment(Point p,Point a1,Point a2)
  105. {
  106. return dcmp(Cross(a1-p,a2-p))==0&&dcmp(Dot(a1-p,a2-p))<0;
  107. }
  108.  
  109. ///多边形有向面积
  110. double PolygonArea(Point* p,int n)
  111. {
  112. double area=0;
  113. for(int i=1;i<n-1;i++)
  114. area+=Cross(p[i]-p[0],p[i+1]-p[0]);
  115. return area/2;
  116. }
  117.  
  118. ///有向直线
  119. struct Line
  120. {
  121. Point p;
  122. Point v;
  123. double ang;
  124. Line(Point _p,Point _v):p(_p),v(_v){ang=atan2(v.y,v.x);}
  125. Point point(double a) {return p+(v*a);}
  126. bool operator<(const Line& L)const
  127. {
  128. return ang<L.ang;
  129. }
  130. };
  131.  
  132. ///直线平移距离d
  133. Line LineTransHor(Line l,int d)
  134. {
  135. Point vl=Verunit(l.v);
  136. Point p1=l.p+vl*d,p2=l.p-vl*d;
  137. Line ll=Line(p1,l.v);
  138. return ll;
  139. }
  140.  
  141. ///直线交点(如果存在)
  142. Point GetLineIntersection(Line a,Line b)
  143. {
  144. return GetLineIntersection(a.p,a.v,b.p,b.v);
  145. }
  146.  
  147. ///点p在有向直线的左边
  148. bool OnLeft(const Line& L,const Point& p)
  149. {
  150. return Cross(L.v,p-L.p)>=0;
  151. }
  152.  
  153. ///圆
  154. const double pi=acos(-1.0);
  155.  
  156. struct Circle
  157. {
  158. Point c;
  159. double r;
  160. Circle(Point _c=0,double _r=0):c(_c),r(_r){}
  161. Point point(double a)///依据圆心角算圆上的点
  162. {
  163. return Point(c.x+cos(a)*r,c.y+sin(a)*r);
  164. }
  165. };
  166.  
  167. ///a点到b点(逆时针)在圆上的圆弧长度
  168. double D(Point a,Point b,Circle C)
  169. {
  170. double ang1,ang2;
  171. Point v1,v2;
  172. v1=a-C.c; v2=b-C.c;
  173. ang1=atan2(v1.y,v1.x);
  174. ang2=atan2(v2.y,v2.x);
  175. if(ang2<ang1) ang2+=2*pi;
  176. return C.r*(ang2-ang1);
  177. }
  178.  
  179. ///直线与圆交点 返回交点个数
  180. int getLineCircleIntersection(Line L,Circle C,double& t1,double& t2,vector<Point>& sol)
  181. {
  182. double a=L.v.x,b=L.p.x-C.c.x,c=L.v.y,d=L.p.y-C.c.y;
  183. double e=a*a+c*c,f=2*(a*b+c*d),g=b*b+d*d-C.r*C.r;
  184. double delta=f*f-4.*e*g;
  185. if(dcmp(delta)<0) return 0;//相离
  186. if(dcmp(delta)==0)//相切
  187. {
  188. t1=t2=-f/(2.*e); sol.push_back(L.point(t1));
  189. return 1;
  190. }
  191. //相切
  192. t1=(-f-sqrt(delta))/(2.*e); sol.push_back(L.point(t1));
  193. t2=(-f+sqrt(delta))/(2.*e); sol.push_back(L.point(t2));
  194. return 2;
  195. }
  196.  
  197. ///圆与圆交点 返回交点个数
  198. int getCircleCircleIntersection(Circle C1,Circle C2,vector<Point>& Sol)
  199. {
  200. double d=Length(C1.c-C2.c);
  201. if(dcmp(d)==0)
  202. {
  203. if(dcmp(C1.r-C2.r)==0) return -1;//重合
  204. return 0;
  205. }
  206. if(dcmp(C1.r+C2.r-d)<0) return 0;
  207. if(dcmp(fabs(C1.r-C2.r)-d)>0) return 0;
  208.  
  209. double a=Angle(C2.c-C1.c);
  210. double da=acos((C1.r*C1.r+d*d-C2.r*C2.r)/(2*C1.r*d));
  211.  
  212. Point p1=C1.point(a-da),p2=C1.point(a+da);
  213.  
  214. Sol.push_back(p1);
  215. if(p1==p2) return 1;
  216.  
  217. Sol.push_back(p2);
  218. return 2;
  219. }
  220.  
  221. ///P到圆的切线 v[] 储存切线向量
  222. int getTangents(Point p,Circle C,Point* v)
  223. {
  224. Point u=C.c-p;
  225. double dist=Length(u);
  226. if(dist<C.r) return 0;
  227. else if(dcmp(dist-C.r)==0)
  228. {
  229. ///p在圆上仅仅有一条切线
  230. v[0]=Rotate(u,pi/2);
  231. return 1;
  232. }
  233. else
  234. {
  235. double ang=asin(C.r/dist);
  236. v[0]=Rotate(u,-ang);
  237. v[1]=Rotate(u,ang);
  238. return 2;
  239. }
  240. }
  241.  
  242. //两圆公切线 a,b 公切线再 圆 A B 上的切点
  243. int getTengents(Circle A,Circle B,Point* a,Point* b)
  244. {
  245. int cnt=0;
  246. if(A.r<B.r) { swap(A,B); swap(a,b); }
  247. int d2=(A.c.x-B.c.x)*(A.c.x-B.c.x)+(A.c.y-B.c.y)*(A.c.y-B.c.y);
  248. int rdiff=A.r-B.r;
  249. int rsum=A.r+B.r;
  250. if(d2<rdiff*rdiff) return 0;///内含
  251.  
  252. double base=atan2(B.c.y-A.c.y,B.c.x-A.c.x);
  253. if(d2==0&&A.r==B.r) return -1; ///无穷多
  254. if(d2==rdiff*rdiff)//内切 1条
  255. {
  256. a[cnt]=A.point(base); b[cnt]=B.point(base); cnt++;
  257. return 1;
  258. }
  259. ///外切
  260. double ang=acos((A.r-B.r)/sqrt(d2));
  261. a[cnt]=A.point(base+ang); b[cnt]=B.point(base+ang); cnt++;
  262. a[cnt]=A.point(base-ang); b[cnt]=B.point(base-ang); cnt++;
  263. if(d2==rsum*rsum)// one
  264. {
  265. a[cnt]=A.point(base); b[cnt]=B.point(pi+base); cnt++;
  266. }
  267. else if(d2>rsum*rsum)// two
  268. {
  269. double ang=acos((A.r-B.r)/sqrt(d2));
  270. a[cnt]=A.point(base+ang); b[cnt]=B.point(pi+base+ang); cnt++;
  271. a[cnt]=A.point(base-ang); b[cnt]=B.point(pi+base-ang); cnt++;
  272. }
  273. return cnt;
  274. }
  275.  
  276. ///三角形外接圆
  277. Circle CircumscribedCircle(Point p1,Point p2,Point p3)
  278. {
  279. double Bx=p2.x-p1.x,By=p2.y-p1.y;
  280. double Cx=p3.x-p1.x,Cy=p3.y-p1.y;
  281. double D=2*(Bx*Cy-By*Cx);
  282. double cx=(Cy*(Bx*Bx+By*By)-By*(Cx*Cx+Cy*Cy))/D+p1.x;
  283. double cy=(Bx*(Cx*Cx+Cy*Cy)-Cx*(Bx*Bx+By*By))/D+p1.y;
  284. Point p=Point(cx,cy);
  285. return Circle(p,Length(p1-p));
  286. }
  287.  
  288. ///三角形内切圆
  289. Circle InscribedCircle(Point p1,Point p2,Point p3)
  290. {
  291. double a=Length(p2-p3);
  292. double b=Length(p3-p1);
  293. double c=Length(p1-p2);
  294. Point p=(p1*a+p2*b+p3*c)/(a+b+c);
  295. return Circle(p,DistanceToLine(p,p1,p2));
  296. }
  297.  
  298. double RtoDegree(double x) {return x/pi*180.;}
  299.  
  300. char op[200];
  301. double a[10];
  302. Point v[10];
  303. double degree[10];
  304. vector<Point> sol;
  305.  
  306. int main()
  307. {
  308. while(scanf("%s",op)!=EOF)
  309. {
  310. if(strcmp(op,"CircumscribedCircle")==0)
  311. {
  312. for(int i=0;i<6;i++) scanf("%lf",a+i);
  313. Circle C=CircumscribedCircle(Point(a[0],a[1]),Point(a[2],a[3]),Point(a[4],a[5]));
  314. printf("(%.6lf,%.6lf,%.6lf)\n",C.c.x,C.c.y,C.r);
  315. }
  316. else if(strcmp(op,"InscribedCircle")==0)
  317. {
  318. for(int i=0;i<6;i++) scanf("%lf",a+i);
  319. Circle C=InscribedCircle(Point(a[0],a[1]),Point(a[2],a[3]),Point(a[4],a[5]));
  320. printf("(%.6lf,%.6lf,%.6lf)\n",C.c.x,C.c.y,C.r);
  321. }
  322. else if(strcmp(op,"TangentLineThroughPoint")==0)
  323. {
  324. for(int i=0;i<5;i++) scanf("%lf",a+i);
  325. int sz=getTangents(Point(a[3],a[4]),Circle(Point(a[0],a[1]),a[2]),v);
  326. for(int i=0;i<sz;i++)
  327. {
  328. double de=RtoDegree(Angle(v[i]));
  329. if(dcmp(de)<0) de=180.+de;
  330. else while(dcmp(de-180.)>=0) de-=180.;
  331. degree[i]=de;
  332. }
  333. sort(degree,degree+sz);
  334. putchar('[');if(sz==0) putchar(']');
  335. for(int i=0;i<sz;i++) printf("%.6lf%c",degree[i],(i!=sz-1)?
  336.  
  337. ',':']');
  338. putchar(10);
  339. }
  340. else if(strcmp(op,"CircleThroughAPointAndTangentToALineWithRadius")==0)
  341. {
  342. for(int i=0;i<7;i++) scanf("%lf",a+i);
  343. Point A=Point(a[2],a[3]),B=Point(a[4],a[5]);
  344. Circle C(Point(a[0],a[1]),a[6]);
  345.  
  346. Point normal=Verunit(B-A);
  347. normal=normal/Length(normal)*a[6];
  348.  
  349. Point ta=A+normal,tb=B+normal;
  350. Line l1=Line(ta,tb-ta);
  351. ta=A-normal,tb=B-normal;
  352. Line l2=Line(ta,tb-ta);
  353.  
  354. sol.clear();
  355. double t1,t2;
  356. int aa=getLineCircleIntersection(l1,C,t1,t2,sol);
  357. int bb=getLineCircleIntersection(l2,C,t1,t2,sol);
  358. sort(sol.begin(),sol.end());
  359.  
  360. putchar('[');
  361. for(int i=0,sz=sol.size();i<sz;i++)
  362. {
  363. if(i) putchar(',');
  364. printf("(%.6lf,%.6lf)",sol[i].x,sol[i].y);
  365. }
  366. putchar(']'); putchar(10);
  367. }
  368. else if(strcmp(op,"CircleTangentToTwoLinesWithRadius")==0)
  369. {
  370. for(int i=0;i<9;i++) scanf("%lf",a+i);
  371. Line LA=Line(Point(a[0],a[1]),Point(a[2],a[3])-Point(a[0],a[1]));
  372. Line LB=Line(Point(a[4],a[5]),Point(a[6],a[7])-Point(a[4],a[5]));
  373. Line la1=LineTransHor(LA,a[8]),la2=LineTransHor(LA,-a[8]);
  374. Line lb1=LineTransHor(LB,a[8]),lb2=LineTransHor(LB,-a[8]);
  375.  
  376. sol.clear();
  377. sol.push_back(GetLineIntersection(la1,lb1));
  378. sol.push_back(GetLineIntersection(la1,lb2));
  379. sol.push_back(GetLineIntersection(la2,lb1));
  380. sol.push_back(GetLineIntersection(la2,lb2));
  381. sort(sol.begin(),sol.end());
  382.  
  383. putchar('[');
  384. for(int i=0,sz=sol.size();i<sz;i++)
  385. {
  386. if(i) putchar(',');
  387. printf("(%.6lf,%.6lf)",sol[i].x,sol[i].y);
  388. }
  389. putchar(']'); putchar(10);
  390.  
  391. }
  392. else if(strcmp(op,"CircleTangentToTwoDisjointCirclesWithRadius")==0)
  393. {
  394. for(int i=0;i<7;i++) scanf("%lf",a+i);
  395. Circle C1=Circle(Point(a[0],a[1]),a[2]+a[6]);
  396. Circle C2=Circle(Point(a[3],a[4]),a[5]+a[6]);
  397. sol.clear();
  398. getCircleCircleIntersection(C1,C2,sol);
  399. sort(sol.begin(),sol.end());
  400. putchar('[');
  401. for(int i=0,sz=sol.size();i<sz;i++)
  402. {
  403. if(i) putchar(',');
  404. printf("(%.6lf,%.6lf)",sol[i].x,sol[i].y);
  405. }
  406. putchar(']'); putchar(10);
  407. }
  408. }
  409. return 0;
  410. }

UVA12304 2D Geometry 110 in 1! 计算几何的更多相关文章

  1. UVA-12304 2D Geometry 110 in 1! (有关圆的基本操作)

    UVA-12304 2D Geometry 110 in 1! 该问题包含以下几个子问题 CircumscribedCircle x1 y1 x2 y2 x3 y3 : 三角形外接圆 Inscribe ...

  2. UVA 12304 - 2D Geometry 110 in 1! - [平面几何基础题大集合][计算几何模板]

    题目链接:https://cn.vjudge.net/problem/UVA-12304 题意: 作为题目大合集,有以下一些要求: ①给出三角形三个点,求三角形外接圆,求外接圆的圆心和半径. ②给出三 ...

  3. UVa 12304 (6个二维几何问题合集) 2D Geometry 110 in 1!

    这个题能1A纯属运气,要是WA掉,可真不知道该怎么去调了. 题意: 这是完全独立的6个子问题.代码中是根据字符串的长度来区分问题编号的. 给出三角形三点坐标,求外接圆圆心和半径. 给出三角形三点坐标, ...

  4. Uva 12304 - 2D Geometry 110 in 1!

    http://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&page=show_problem&p ...

  5. UVA12304-2D Geometry 110 in 1!

    就是给了六个关于圆的算法.实现它们. 注意的是,不仅输出格式那个符号什么的要一样.坐标的顺序也要从小到大-- 基本上没考虑什么精度的问题,然后就过了. 大白鼠又骗人.也许我的方法比較好? 我的做法就是 ...

  6. hdu 1086:You can Solve a Geometry Problem too(计算几何,判断两线段相交,水题)

    You can Solve a Geometry Problem too Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/3 ...

  7. .Uva&LA部分题目代码

    1.LA 5694 Adding New Machine 关键词:数据结构,线段树,扫描线(FIFO) #include <algorithm> #include <cstdio&g ...

  8. [GodLove]Wine93 Tarining Round #9

    比赛链接: http://vjudge.net/contest/view.action?cid=48069#overview 题目来源: lrj训练指南---二维几何计算   ID Title Pro ...

  9. uva 12304点与直线与圆之间的关系

    Problem E 2D Geometry 110 in 1! This is a collection of 110 (in binary) 2D geometry problems. Circum ...

随机推荐

  1. 【Nginx笔记】nginx配置文件具体解释

    本文主要对nginx的配置做重点说明,关于nginx的其他基本概念.建议參考官网描写叙述.这里推荐Nginx Beginner's Guide这篇文档.对刚開始学习的人高速认识nginx非常有帮助. ...

  2. Tui-x简单介绍

    1.什么是Tui-x Tui-x是一个创建cocos2d-x UI界面的解决方式,而builder用的则是FlashCS,通过使用jsfl来拓展FlashCS从而达到UI编辑器的功能.这个jsfl所做 ...

  3. 关于Opengl中将24位BMP图片加入一个alpha通道并实现透明的问题

    #include <windows.h>#include <GL/glut.h>#include <GL/glaux.h>#include <stdio.h& ...

  4. ZOJ 3829 贪心 思维题

    http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemCode=3829 现场做这道题的时候,感觉是思维题.自己智商不够.不敢搞,想着队友智商 ...

  5. DotNetBar.Bar控制Y顺序控制方向

    DotNetBar.Bar控件Y方向上的顺序控制 老帅       控件DevComponents.DotNetBar.Bar是能够有多种用途的.能够作为容器,也能够作为工具条,不管做什么,在Y方向上 ...

  6. oracle列合并

    在很多场合,我们会须要用到oracle列合并,oracle提供了一些方法用于把某列的多行数据合并成一行. 一.10G曾经使用WMSYS.WM_CONCAT   wmsys.wm_concat将字段的值 ...

  7. Introduction to Probability (三) Independence

    两个事件独立性的定义是:事件A的发生对事件B的发生毫无影响,即从A的发生与否.我们不能猜測出B是否发生. 从概率等式的表示来看就是B在A发生的情况下发生的概率等于B发生的概率本身. 进而引出了A与B同 ...

  8. 如何设置Java虚拟机内存以适应大程序的装载

    Java虚拟机对于运行时的程序所占内存是有限制的,当我们的项目或者程序很大时,往往会照成内存溢出. 举个例子: public class SmallTest1 { public static void ...

  9. MFC-消息分派

    前言 由于工作需要,这几天学了一点MFC,在AFX里看到很多熟悉的东西,如类型信息,序列化,窗口封装和消息分派.几乎每个界面库都必须提供这些基础服务,但提供的手法却千差万别.MFC大量地借用了宏,映射 ...

  10. Eclipse中快捷键的使用

    1:引入包   ctrl+shift+o 2:对输入进行提示:Alt+/ 3: 全局搜索:crtrl + h 4:Eclipse创建方法快捷键Alt+shift+M 5:Eclipse创建局部变量快捷 ...