⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 usaco 3_4_1 closed fences题解_leokan的blog.mht

📁 美国USACO题库源程序
💻 MHT
📖 第 1 页 / 共 5 页
字号:
	LETTER-SPACING: normal
}
#ft A:link {
	LETTER-SPACING: normal
}
#ft A:visited {
	LETTER-SPACING: normal
}
</STYLE>

<DIV id=3Dusrbar><NOBR>
<SCRIPT> var myref =3D =
encodeURI("http://hi.baidu.com/leokan/blog/item/99577bc6a7834e1f9c163d4c%=
2Ehtml");</SCRIPT>
<A href=3D"http://www.baidu.com/" =
target=3D_blank>=B0=D9=B6=C8=CA=D7=D2=B3</A> | <A=20
href=3D"http://hi.baidu.com/" =
target=3D_blank>=B0=D9=B6=C8=BF=D5=BC=E4</A>
<SCRIPT language=3DJavaScript>
        document.write(" | <a =
href=3D'http://passport.baidu.com/?login&tpl=3Dsp&tpl_reg=3Dsp&u=3D"+myre=
f+"'>=B5=C7=C2=BC</a>");
        </SCRIPT>
 </NOBR></DIV>
<DIV id=3Dmain align=3Dleft><!--[if IE]>
<SCRIPT>
var objmain =3D document.getElementById("main");
function updatesize(){ var bodyw =3D window.document.body.offsetWidth; =
if(bodyw <=3D 790) objmain.style.width=3D"772px"; else if(bodyw >=3D =
1016) objmain.style.width=3D"996px"; else objmain.style.width=3D"100%"; =
}
updatesize(); window.onresize =3D updatesize;
</SCRIPT>
<![endif]-->
<DIV id=3Dheader>
<DIV class=3Dlc>
<DIV class=3Drc></DIV></DIV>
<DIV class=3Dtit><A class=3Dtitlink title=3D"gba1991=B5=C4=BF=D5=BC=E4 =
http://hi.baidu.com/leokan"=20
href=3D"http://hi.baidu.com/leokan">leokan=B5=C4blog</A></DIV>
<DIV class=3Ddesc></DIV>
<DIV id=3Dtabline></DIV>
<DIV id=3Dtab><A href=3D"http://hi.baidu.com/leokan">=D6=F7=D2=B3</A><A =
class=3Don=20
href=3D"http://hi.baidu.com/leokan/blog">=B2=A9=BF=CD</A><A=20
href=3D"http://hi.baidu.com/leokan/album">=CF=E0=B2=E1</A><SPAN>|</SPAN><=
A=20
href=3D"http://hi.baidu.com/leokan/profile">=B8=F6=C8=CB=B5=B5=B0=B8</A> =
<SPAN>|</SPAN><A=20
href=3D"http://hi.baidu.com/leokan/friends">=BA=C3=D3=D1</A> =
</DIV></DIV>
<DIV class=3Dstage>
<DIV class=3Dstagepad>
<DIV style=3D"WIDTH: 100%">
<TABLE class=3Dmodth cellSpacing=3D0 cellPadding=3D0 width=3D"100%" =
border=3D0>
  <TBODY>
  <TR>
    <TD class=3Dmodtl width=3D7>&nbsp;</TD>
    <TD class=3Dmodtc noWrap>
      <DIV class=3Dmodhead><SPAN =
class=3Dmodtit>=B2=E9=BF=B4=CE=C4=D5=C2</SPAN></DIV></TD>
    <TD class=3Dmodtc noWrap align=3Dright></TD>
    <TD class=3Dmodtr width=3D7>&nbsp;</TD></TR></TBODY></TABLE>
<DIV class=3Dmodbox id=3Dm_blog>
<DIV class=3Dtit>USACO 3.4.1 Closed Fences=CC=E2=BD=E2</DIV>
<DIV class=3Ddate>2008=C4=EA02=D4=C213=C8=D5 =D0=C7=C6=DA=C8=FD =
12:54</DIV>
<TABLE style=3D"TABLE-LAYOUT: fixed">
  <TBODY>
  <TR>
    <TD>
      <DIV class=3Dcnt>
      <H2>USACO 3.4.1 Closed Fences</H2>
      <P class=3Dt_msgfont>Closed Fences<BR><BR>A closed fence in the =
plane is a=20
      set of non-crossing, connected line segments with N corners (3 =
&lt; N &lt;=20
      200). The corners or vertices are each distinct and are listed in=20
      counter-clockwise order in an array {xi, yi}, i in (1..N). =
<BR><BR>Every=20
      pair of adjacent vertices defines a side of the fence. Thus {xi yi =
xi+1=20
      yi+1} is a side of the fence for all i in (1..N). For our =
purposes, N+1 =3D=20
      1, so that the first and last vertices making the fence closed.=20
      <BR><BR>Here is a typical closed fence and a point x,y:=20
      <BR><BR><BR>&nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp;=20
      &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; * x3,y3<BR>&nbsp;&nbsp;=20
      &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp;&nbsp;=20
      x5,y5&nbsp;&nbsp; / \<BR>x,y * &nbsp;&nbsp; &nbsp;&nbsp; * /=20
      \<BR>&nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; =
&nbsp;&nbsp; / \=20
      / &nbsp;&nbsp;&nbsp; \<BR>&nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp;=20
      &nbsp;&nbsp; &nbsp;&nbsp;&nbsp; / * &nbsp;&nbsp; \<BR>&nbsp;&nbsp; =

      &nbsp;&nbsp; &nbsp;&nbsp;&nbsp; x6,y6* x4,y4 &nbsp;&nbsp;&nbsp;=20
      \<BR>&nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; | =
&nbsp;&nbsp;=20
      &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp;&nbsp; \<BR>&nbsp;&nbsp;=20
      &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; | &nbsp;&nbsp; &nbsp;&nbsp; =

      &nbsp;&nbsp; &nbsp;&nbsp; \<BR>&nbsp;&nbsp; &nbsp;&nbsp;=20
      &nbsp;&nbsp;&nbsp; x1,y1*----------------* x2,y2<BR><BR>Write a =
program=20
      which will do the following: <BR><BR>Test an ordered list of =
vertices=20
      {xi,yi}, i in (1..N) to see if the array is a valid fence. =
<BR>Find the=20
      set of fence sides that a person (with no height) who is standing =
in the=20
      plane at position (x,y) can "see" when looking at the fence. The =
location=20
      x,y may fall anywhere not on the fence. <BR>A fence side can be =
seen if=20
      there exists a ray that connects (x,y) and any point on the side, =
and the=20
      ray does not intersect any other side of the fence. A side that is =

      parallel to the line of sight is not considered visible. In the =
figure,=20
      above the segments x3,y3-x4,y4; x5,y5-x6,y6; and x6-y6-x1,y1 are =
visible=20
      or partially visible from x,y. <BR><BR>PROGRAM NAME: =
fence4<BR>INPUT=20
      FORMAT<BR>Line 1:&nbsp;&nbsp; N, the number of corners in the=20
      fence&nbsp;&nbsp;<BR>Line 2:&nbsp;&nbsp; Two space-separated =
integers, x=20
      and y, that are the location of the observer. Both integers will =
fit into=20
      16 bits. <BR>Line 3-N+2:&nbsp;&nbsp; A pair of space-separated =
integers=20
      denoting the X,Y location of the corner. The pairs are given in=20
      counterclockwise order. Both integers are no larger than 1000 in=20
      magnitude. <BR><BR>SAMPLE INPUT (file fence4.in) <BR>13<BR>5 =
5<BR>0 0<BR>7=20
      0<BR>5 2<BR>7 5<BR>5 7<BR>3 5<BR>4 9<BR>1 8<BR>2 5<BR>0 9<BR>-2 =
7<BR>0=20
      3<BR>-3 1 <BR><BR>OUTPUT FORMAT<BR>If the sequence is not a valid =
fence,=20
      the output is a single line containing the word "NOFENCE".=20
      <BR><BR>Otherwise, the output is a listing of visible fence =
segments, one=20
      per line, shown as four space-separated integers that represent =
the two=20
      corners. Express the points in the segment by showing first the =
point that=20
      is earlier in the input, then the point that is later. Sort the =
segments=20
      for output by examining the last point and showing first those =
points that=20
      are earlier in the input. Use the same rule on the first of the =
two points=20
      in case of ties. <BR><BR>SAMPLE OUTPUT (file fence4.out)<BR>7<BR>0 =
0 7=20
      0<BR>5 2 7 5<BR>7 5 5 7<BR>5 7 3 5<BR>-2 7 0 3<BR>0 0 -3 1<BR>0 3 =
-3=20
      1<BR><BR><BR><BR>Closed =
Fences<BR><BR>=B1=D5=BA=CF=B5=C4=D5=A4=C0=B8<BR><BR>=D2=EB by=20
      =
Jeru<BR><BR><BR>=D2=BB=B8=F6=B1=D5=BA=CF=B5=C4=D5=A4=C0=B8=CA=C7=C6=BD=C3=
=E6=C9=CF=B5=C4=D2=BB=D0=A9=B2=BB=CF=E0=BD=BB=B5=C4=CA=D7=CE=B2=CF=E0=C1=AC=
=B5=C4=CF=DF=B6=CE=D0=CE=B3=C9=B5=C4=B6=E0=B1=DF=D0=CE=A3=AC=D3=D0N=B8=F6=
=BD=C7(=B6=A5=B5=E3) (3 &lt; N &lt;=20
      200)=A1=A3 =
=B6=A5=B5=E3=B2=BB=D6=D8=BA=CF=A3=AC=CB=FC=D2=D4=C4=E6=CA=B1=D5=EB=B7=BD=CA=
=BD=D2=D4=CA=FD=D7=E9{xi, yi}=B8=F8=B3=F6(i=3D1,2,...,N)=A1=A3=20
      =
<BR><BR>=C3=BF=D2=BB=B6=D4=CF=E0=C1=DA=B5=C4=B6=A5=B5=E3=B6=BC=CA=C7=D2=BB=
=CC=F5=D5=A4=C0=B8=A1=A3=D2=F2=B4=CB=B9=B2=D3=D0N=CC=F5=D5=A4=C0=B8 =
(=B6=A8=D2=E5xN+1=3Dx1, yN+1=3Dy1)=A1=A3=20
      =
<BR><BR>=D5=E2=C0=EF=D3=D0=D2=BB=B8=F6=D5=A4=C0=B8=B5=C4=C0=FD=D7=D3=BA=CD=
=D2=BB=B8=F6=B5=E3x,y:<BR>&nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp;=20
      &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; *=20
      x3,y3<BR>&nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp;=20
      &nbsp;&nbsp;&nbsp; x5,y5&nbsp;&nbsp; / \<BR>x,y * &nbsp;&nbsp;=20
      &nbsp;&nbsp; * / \<BR>&nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; =
&nbsp;&nbsp;=20
      &nbsp;&nbsp; / \ / &nbsp;&nbsp;&nbsp; \<BR>&nbsp;&nbsp; =
&nbsp;&nbsp;=20
      &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp;&nbsp; / * &nbsp;&nbsp;=20
      \<BR>&nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp;&nbsp; x6,y6* x4,y4=20
      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4=CB=FC=C3=C7=B5=DA=D2=BB=B8=F6=B5=E3=B5=C4=CB=B3=
=D0=F2<SPAN=20
      class=3Dt_tag =
href=3D"tag.php?name=3D%C5%C5%D0%F2">=C5=C5=D0=F2</SPAN>=A1=A3 =
<BR><BR>SAMPLE=20
      OUTPUT (file fence4.out)<BR>7<BR>0 0 7 0<BR>5 2 7 5<BR>7 5 5 =
7<BR>5 7 3=20
      5<BR>-2 7 0 3<BR>0 0 -3 1<BR>0 3 -3 1</P>
      <DIV class=3Dt_msgfont>
      <HR>
      </DIV>
      <P class=3Dt_msgfont><STRONG>USACO 3.4.1 Closed=20
      Fences<BR>=CC=E1=BD=BB=B4=CE=CA=FD:25=B4=CE</STRONG></P>
      <P=20
      =
class=3Dt_msgfont><STRONG>=CC=E1=BD=BB=C1=CB=BA=DC=B6=E0=B4=CE...=CE=D2=D3=
=C3=B5=C4fp=CA=C7noi=B0=E6,=D2=BB=B8=F6=D0=A1=B5=C4=C8=B1=C2=A9=CA=B9=CE=D2=
=D5=E2=C0=EF=CA=E4=B3=F6=D5=FD=C8=B7=B6=F8USACO=B4=ED=CE=F3...=C3=A4=C4=BF=
=CC=E1=BD=BB=C1=CB=BA=C3=BE=C3<BR>=D4=DA=B4=CB=BC=C7=C2=BC=D2=BB=CF=C2=C4=
=C7=B8=F6=C8=B1=C2=A9,=D2=D4=C3=E2=D2=D4=BA=F3=D4=D9=B7=B8=D5=E2=D1=F9=B5=
=C4=B4=ED=CE=F3<BR>function=20
      xx():<BR>begin <BR>if ...exit();<BR>if ...exit();<BR>if=20
      ...exit();<BR>end;</STRONG></P>
      <P =
class=3Dt_msgfont><STRONG>=D4=DA=CA=B2=C3=B4=CC=F5=BC=FE=B6=BC=C3=BB=B4=EF=
=B5=BD=CA=B1=D3=A6=B8=C3=D4=D9=CA=E4=B3=F6=D2=BB=B8=F6<BR>function =
xx():<BR>begin=20
      <BR>if ...exit();<BR>if ...exit();<BR>if=20
      =
...exit();<BR>exit(xx)<BR>end;<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C4<BR>a * b=3D|a|*|b|*cos=A6=C8=20
      =
=BA=DC=CF=E0=CB=C6<BR>=CA=B5=BC=CA=C9=CF=CF=F2=C1=BF=BB=FD=BE=CD=CA=C7=D2=
=BB=B8=F6=BE=D8=D5=F3=B5=C4=D0=D0=C1=D0=CA=BD=B7=FB=BA=C5=B5=C4=D4=CB=CB=E3=
,=BD=AB=CF=F2=C1=BF=B7=D6=BD=E2,=C6=F0=B5=E3=D2=C6=B5=BD=D4=AD=B5=E3=B5=C3=
=B7=D6=C1=BFa1i,b1j,a2i,a2j<BR>a *=20
      b=BE=CD=CA=C7<BR>|i&nbsp;&nbsp; j |<BR>|a1 b1|<BR>|a2=20
b2|<BR>a1*b2-b1*a2</STRONG></P>
      <P =
class=3Dt_msgfont><STRONG>=B2=BB=B1=D8=D2=C6=B5=BD=D4=AD=B5=E3=B5=C4=CD=A8=
=CA=BD:(p1 - p0) =A1=C1 (p2 - p0) =3D (x1 - x0)(y2=20
      - y0) - (x2 - x0)(y1 - y0).</STRONG></P>
      <P =
class=3Dt_msgfont><STRONG>=D7=F3=D3=D2=CA=D6=C2=DD=D0=FD:<BR>=CD=BC=C6=AC=
:</STRONG></P><STRONG>
      <DIV class=3Dt_msgfont align=3Dcenter forimg=3D"1"><IMG =
class=3Dblogimg=20
      =
src=3D"http://hiphotos.baidu.com/leokan/pic/item/a2a09a2b2793d7f5e7cd4038=
.jpg"=20
      border=3D0 small=3D"0"></DIV></STRONG>
      <P class=3Dt_msgfont></P>
      <P=20
      =
class=3Dt_msgfont><STRONG>=D7=F3=D3=D2=CA=D6=C2=DD=D0=FD=B2=BB=CA=C7=BF=B4=
=D2=BB=CC=F5=CF=DF=D4=DA=C1=ED=D2=BB=CC=F5=CF=DF=B5=C4=D7=F3=B1=DF=BB=B9=CA=
=C7=D3=D2=B1=DF,=CA=C2=CA=B5=C9=CF=C7=A1=C7=A1=CF=E0=B7=B4,a=D4=DAb=B5=C4=
=D7=F3=B1=DF=CB=FC=CA=C7=CD=A8=B9=FD=D3=D2=CA=D6=C2=DD=D0=FD=B5=C3=B5=BD=B5=
=C4.<BR>=BD=E1=BA=CF=C7=B0=C3=E6=CB=B5=B5=C4=CF=F2=C1=BF=BB=FD,a*b,=C8=E7=
=B9=FBa,b=B3=C9=D7=F3=CA=D6=CF=B5=CA=B1=A6=C8=BD=C7=CA=C7=B8=BA=CA=FD,=CB=
=F9=D2=D4a*b=CA=C7=D2=BB=B8=F6=B8=BA=CA=FD,=B6=F8=CB=FC=B3=C9=D3=D2=CA=D6=
=CF=B5=CA=B1a*b=CA=C7=D2=BB=B8=F6=D5=FD=CA=FD.<BR>=CD=A8=B9=FD=D5=E2=B8=F6=
=BE=CD=BF=C9=D2=D4=C5=D0=B6=CF=D2=BB=B8=F6=B5=E3=D4=DA=C1=ED=D2=BB=B8=F6=CF=
=F2=C1=BF=B5=C4=D7=F3=B1=DF=BB=B9=CA=C7=D3=D2=B1=DF.=A6=C8=3D0=CA=B1=C1=BD=
=CF=F2=C1=BF=C6=BD=D0=D0,=CB=F9=D2=D4=CB=FB=C3=C7=B5=C4=BB=FD=CE=AA0.</ST=
RONG></P>
      <P =
class=3Dt_msgfont><STRONG>=C1=BD=CF=DF=B6=CE=CF=E0=BD=BB:<BR>=BF=EC=CB=D9=
=C5=C5=B3=E2=CA=B5=D1=E9<BR>=CD=BC=C6=AC</STRONG></P>
      <P class=3Dt_msgfont></P>
      <DIV class=3Dt_msgfont align=3Dcenter forimg=3D"1"><IMG =
class=3Dblogimg=20
      =
src=3D"http://hiphotos.baidu.com/leokan/pic/item/de7276cb5fd01010bf09e63a=
.jpg"=20
      border=3D0 small=3D"0"></DIV>
      <P =
class=3Dt_msgfont><BR>=D2=D4=C1=BD=B8=F6=CF=DF=B6=CE=CE=AA=B6=D4=BD=C7=CF=
=DF=D7=F6=C1=BD=B8=F6=BE=D8=D0=CE,=C1=BD=B8=F6=BE=D8=D0=CE=D3=D0=CF=E0=BD=
=BB=B2=C5=CD=A8=B9=FD=BF=EC=CB=D9=C5=C5=B3=E2=CA=B5=D1=E9</P>
      <P =
class=3Dt_msgfont><STRONG>=BF=E7=C1=A2=CA=B5=D1=E9:<BR></STRONG><STRONG><=
IMG class=3Dblogimg=20
      =
src=3D"http://hiphotos.baidu.com/leokan/pic/item/058b8a44b66ff843500ffe3b=
.jpg"=20
      border=3D0 small=3D"0"></STRONG></P>
      <P =
class=3Dt_msgfont><STRONG>=BD=E9=C9=DC=CE=C4=D7=D6=BC=FB=CD=BC=C6=AC=C4=DA=
=C8=DD</STRONG></P>
      <P class=3Dt_msgfont><STRONG>=B4=FA=C2=EB:<BR>function=20
      =
multi(p1,p2,p0:xy):real;{=BC=C6=CB=E3=CF=F2=C1=BF=BB=FD}<BR>begin<BR>&nbs=
p;&nbsp;&nbsp;=20
      =

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -