• <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


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

            常用鏈接

            留言簿(8)

            隨筆檔案

            文章檔案

            Friends

            OJ

            搜索

            •  

            最新評論

            閱讀排行榜

            評論排行榜

            国产999精品久久久久久| 少妇内射兰兰久久| 久久精品国产精品亜洲毛片| 国产精品青草久久久久福利99 | yellow中文字幕久久网| 久久九九久精品国产| 亚洲国产欧美国产综合久久| 久久夜色精品国产亚洲| 久久亚洲sm情趣捆绑调教| 精品久久久久久亚洲精品| 人人狠狠综合88综合久久| 久久av无码专区亚洲av桃花岛| 久久99精品免费一区二区| 日日躁夜夜躁狠狠久久AV| 久久久中文字幕日本| 国产精品久久久亚洲| 伊人久久大香线蕉成人| 国产精品热久久无码av| 精品熟女少妇av免费久久| 久久精品国产亚洲AV影院| 99久久成人18免费网站| 久久精品人人做人人妻人人玩| 狠狠色丁香久久婷婷综合蜜芽五月| 国产美女久久久| 久久狠狠高潮亚洲精品| 国产成年无码久久久免费| 久久精品无码一区二区三区日韩| 国产精品对白刺激久久久| 久久w5ww成w人免费| 亚洲αv久久久噜噜噜噜噜| 亚洲精品久久久www| 久久强奷乱码老熟女| 精品久久久久久久久久久久久久久 | 人妻精品久久久久中文字幕| 99久久人人爽亚洲精品美女| 狠狠色噜噜狠狠狠狠狠色综合久久| 久久只有这精品99| 久久天天躁狠狠躁夜夜不卡| 久久久久亚洲AV无码专区首JN| 亚洲天堂久久久| 色欲久久久天天天综合网 |