• <ins id="pjuwb"></ins>
    <blockquote id="pjuwb"><pre id="pjuwb"></pre></blockquote>
    <noscript id="pjuwb"></noscript>
          <sup id="pjuwb"><pre id="pjuwb"></pre></sup>
            <dd id="pjuwb"></dd>
            <abbr id="pjuwb"></abbr>
            posts - 74,  comments - 33,  trackbacks - 0
            For products that are wrapped in small packings it is necessary that the sheet of paper containing the directions for use is folded until its size becomes small enough. We assume that a sheet of paper is rectangular and only folded along lines parallel to its initially shorter edge. The act of folding along such a line, however, can be performed in two directions: either the surface on the top of the sheet is brought together, or the surface on its bottom. In both cases the two parts of the rectangle that are separated by the folding line are laid together neatly and we ignore any differences in thickness of the resulting folded sheet.

            After several such folding steps have been performed we may unfold the sheet again and take a look at its longer edge holding the sheet so that it appears as a one-dimensional curve, actually a concatenation of line segments. If we move along this curve in a fixed direction we can classify every place where the sheet was folded as either type A meaning a clockwise turn or type V meaning a counter-clockwise turn. Given such a sequence of classifications, produce a drawing of the longer edge of the sheet assuming 90 degree turns at equidistant places.

            Input

            The input contains several test cases, each on a separate line. Each line contains a nonempty string of characters A and V describing the longer edge of the sheet. You may assume that the length of the string is less than 200. The input file terminates immediately after the last test case.

            Output

            For each test case generate a PostScript drawing of the edge with commands placed on separate lines. Start every drawing at the coordinates (300, 420) with the command "300 420 moveto". The first turn occurs at (310, 420) using the command "310 420 lineto". Continue with clockwise or counter-clockwise turns according to the input string, using a sequence of "x y lineto" commands with the appropriate coordinates. The turning points are separated at a distance of 10 units. Do not forget the end point of the edge and finish each test case by the commands stroke and showpage.

            You may display such drawings with the gv PostScript interpreter, optionally after a conversion using the ps2ps utility.



            Sample Input

            V
            AVV

            Sample Output

            300 420 moveto
            310 420 lineto
            310 430 lineto
            stroke
            showpage
            300 420 moveto
            310 420 lineto
            310 410 lineto
            320 410 lineto
            320 420 lineto
            stroke
            showpage


            題目很長,很無聊。
            意思就是告訴你一起點在(300,420),然后畫一條長度為10的直線,“310 420 lineto”,到點(310,420)。
            輸入一串少于200長度的字符串,其中‘A’表示順時針旋轉,‘V’表示逆時針旋轉,每次都畫一條長度為10的直線。
            最后再輸出stroke和showpage 。
            看這題就當為周末的英語考試復習下英語好了,其實是很水的模擬題。
            posted on 2008-12-23 20:46 KNIGHT 閱讀(172) 評論(0)  編輯 收藏 引用
            <2009年3月>
            22232425262728
            1234567
            891011121314
            15161718192021
            22232425262728
            2930311234

            常用鏈接

            留言簿(8)

            隨筆檔案

            文章檔案

            Friends

            OJ

            搜索

            •  

            最新評論

            閱讀排行榜

            評論排行榜

            国内精品久久久久久99蜜桃| 欧美精品一区二区精品久久| 伊人情人综合成人久久网小说| 漂亮人妻被中出中文字幕久久 | 一本色综合网久久| 久久伊人五月天论坛| 亚洲精品无码久久千人斩| 久久99精品免费一区二区| 精品国产乱码久久久久软件| 久久久久久国产精品无码下载| 久久国产亚洲精品无码| 亚洲av成人无码久久精品| 久久精品国产亚洲欧美| 狠狠色丁香久久综合五月| 久久精品国产清自在天天线| 精品久久久久久成人AV| 一本久久免费视频| 中文字幕无码av激情不卡久久| 无码国内精品久久人妻| AAA级久久久精品无码区| 久久99精品国产麻豆不卡| 久久Av无码精品人妻系列| 一本久久综合亚洲鲁鲁五月天亚洲欧美一区二区 | 久久久久国产精品三级网| 日产精品久久久久久久性色| 久久久亚洲欧洲日产国码是AV| 青青草国产精品久久| 国产亚洲精久久久久久无码| 亚洲午夜久久久久久噜噜噜| 久久亚洲日韩看片无码| 日本高清无卡码一区二区久久| 中文成人无码精品久久久不卡| 亚洲国产精品久久久久婷婷软件| 久久se这里只有精品| 91久久成人免费| 国产成人无码精品久久久久免费 | 国产精品亚洲综合久久| 久久人人爽人爽人人爽av| 亚洲?V乱码久久精品蜜桃| 热久久国产欧美一区二区精品| 久久se精品一区精品二区国产|