宋壬初吧 关注:25贴子:419
  • 10回复贴,共1

2009-5-20赛

收藏回复

  • 121.20.96.*
一楼百度


1楼2009-05-20 15:08回复
    • 124.238.31.*
    2楼喂熊


    2楼2009-05-20 15:10
    回复
      同意这个观点


      IP属地:上海禁言 |5楼2009-05-20 15:11
      回复
        晕了,郁闷了,要不回来我再看看题吧,你也顺便给我翻译一下


        IP属地:上海禁言 |6楼2009-05-20 15:12
        回复
          放你邮箱里吧!


          禁言 |7楼2009-05-20 15:14
          回复
            已经发过去了!


            禁言 |8楼2009-05-20 15:20
            回复
              XI Olympiad in Informatics 2003/2004 
              --------------------------------------------------------------------------------
              Task: KAG
              C-algae
              --------------------------------------------------------------------------------
              III stage competition (national finals) 
              Source file: kag.* 
              Memory limit: 32 MB 
              C-algae is the Byteotians' favourite dish of their national cuisine. C-algae have a very specific structure. An algae consisting of a single cell is a c-algae. Two c-algae K1 and K2, can be combined in either one of the following ways: 
              by choosing all the cells from both K1 and K2, and all the connections from both K1 and K2, 
              by choosing all the cells from both K1 and K2, all the connections from both K1 and K2, and setting further connections: each cell from K1 is connected to every cell from K2. 
              As a result we obtain a new c-algae K. 
              Unfortunately the hostile country of Bitotia has recently started selling algae imitating c-algae. These look so alike that it is hard to tell the difference between a false one and a genuine c-algae. This is the reason why the Byteotian government has asked you to write a programme that would allow verification if a given algae is a c-algae. 
              Task
              Write a programme that: 
              reads the descriptions of algae from the standard input, 
              checks which of them are proper c-algae, 
              writes the answer to the standard output. 
              Input
              In the first line of the standard input a single integer k is written, 1 <= k <= 10, it denotes the number of algae to be examined. Descriptions of k algae are written in the following lines. Each single description is of the following form: in the first line there are two integers written, separated by a single space, n i m, 1 <= n <= 10.000, 0 <= m <= 100.000. They denote the number of cells and the number of connections respectively. The cells are numbered from 1 to n. In the following m lines the connections are described - each by two integers a, b, separated by a single space (a<>b, 1 <= a,b <= n), indicating that the cells a and b are connected. Each connection is specified once. 
              Output
              k lines should be written to the standard ouput. In the ith line one word should be written: 
              TAK - ('yes' in Polish) - if the ith algae is a proper c-algae, 
              NIE - ('no' in Polish) - otherwise


              禁言 |14楼2009-05-20 15:40
              回复
                XI Olympiad in Informatics 2003/2004 
                --------------------------------------------------------------------------------
                Task: MAK
                Maximal orders of permutations
                --------------------------------------------------------------------------------
                III stage competition (national finals) 
                Source file: mak.* 
                Memory limit: 64 MB 
                A permutation of n elements is a one-to-one function (injection) p: {1,2,...,n} -> {1,2,...,n}. An order of permutation p is the minimal k >= 1, such that for all i=1,2,...,n we have: 
                p(p(p...p(i)...)=i
                 k times
                , i.e. p composed with itself k times becomes identity function. For example, the order of the permutation of 3 elements p(1)=3, p(2)=2, p(3)=1 is 2, because p(p(1))=1, p(p(2))=2, p(p(3))=3.
                For a given n let us consider permutations of n-elements having the the largest order possible. For example, the maximal order of a permutation of 5 elements is 6. An example of a permutation of 5 elements whose order is 6 is p(1)=4, p(2)=5, p(3)=2, p(4)=1, p(5)=3. 
                Among all permutations of n elements having the maximal order, we would like to find the earliest one (in a lexycographic order). Being more precise, we say a permutation p of n elements is earlier than a permutation r of n elements, if there is i, such that p(j) = r(j) for all j < i and p(i) < r(i). The earliest permutation of 5 elements having an order 6 is p(1)=2,p(2)=1,p(3)=4,p(4)=5,p(5)=3. 
                Task
                Write a programme that: 
                reads from the standard input a set of integers n1,n2,...,nd, 
                for each number ni (for i=1,2,...,d) determines the earliest permutation of ni elements havaing the maximal order, 
                writes the determined permutations to the standard output. 
                Input
                There is one positive integer d in the first line of the standard input, 1 <= d <= 10. In the following d lines there are positive integers n1, n2, ..., nd, one per line, 1 <= ni <= 10.000. 
                Output
                Your programme should write d lines to the standard output. The ith line should contain a sequence of integers separated by spaces, forming the least permutation of ni elements having the maximal order, i.e. the sequence p(1), p(2), ..., p(ni), where p denotes this permutation. 
                Example
                For the following input data: 
                2
                5
                14
                the correct answer is: 
                2 1 4 5 3
                2 3 1 5 6 7 4 9 10 11 12 13 14 8


                禁言 |17楼2009-05-20 16:04
                回复
                  XI Olimpiad in Informatics 2003/2004 
                  --------------------------------------------------------------------------------
                  Task: WSC
                  East-West
                  --------------------------------------------------------------------------------
                  III stage competition 
                  Source file: wsc.* 
                  Memory limit: 32 MB 
                  International agreements signed by the Awfully Vast State impose on it transit obligations - it has to enable the transport of nuclear waste from its eastern neighbours power plants to recycling facilities in the West, by means of its railway system. Ecological reasons impose such traffic organization, that the waste-carrying trains leave the territory of the state as quickly as possible. 
                  The railway network in this country has a very peculiar structure. It consists of n cities - railway junctions and n-1 two-way railway track segments, connecting the junctions. Transport is possible between each pair of cities. Furthermore, there is a section of the railway track, whose ends are not border cities and every connection from the eastern to the western border has to lead through that very section. 
                  All waste-carrying trains arrive at the eastern border on the same day, before dawn, at distinct checkpoints, however. For safety reasons the trains only move during the day. Only a single waste-carrying train can move on a given track section at a time, but an unlimited amount of them can wait at a junction. It takes one day for a train to traverse a section of the track. The traffic has to be organized in such a way, that allows each waste-carrying train to reach a distinct destination on the western border. 
                  How many days, at least, do the waste-carrying trains have to spend on the territory of the Awfully Vast State? 
                  


                  禁言 |18楼2009-05-20 16:04
                  回复

                    Task
                    Your task is to write a programme which: 
                    reads from the standard input a description of the railway network and border checkpoints at which the waste-carrying trains have arrived, 
                    finds the minimal number of days the transit has to last, 
                    writes the solution to the standard output. 
                    Input
                    The first line of the input contains three integers 1 < n, w, z < 106, n >= w+z+2, separated by single spaces. n denotes the number of junctions (which are labelled with 1,...,n), while w and z denote the number of border checkpoints on the eastern and western border, respectively. The checkpoints on the eastern border are labelled with 1,...,w, while those on the western border with n-z+1,...,n. 
                    In the following n-1 lines there is a decription of the railway network. Each line contains two distinct integers, 1 < a,b < n, separated by a single space. They denote junctions connected by a section of the railway. 
                    The n+1st line contains a single integer p, 1 < p < w, 1 < p < z, denoting the number of waste-carrying trains. In the next (and last) line of the input there are p distinct integers, all of which are not greater than w, separated by single spaces. These are the numbers of checkpoints on the eastern border, at which the waste-carrying trains have arrived. 
                    Output
                    The first and only line of the output should contain exactly one integer, denoting the minimal amount of days the waste have to spend on the territory of the state. 
                    Example
                    For the input data: 
                    9 2 3
                    1 3
                    2 3
                    4 3
                    4 5
                    4 6
                    7 4
                    5 8
                    9 6
                    2
                    1 2
                    the correct outcome is: 
                    4
                     
                    The arrows denote the movement of the trains in consecutive days for one of the optimal organizations of the railway traffic - a loop means that on a given day the train waited at the junction.


                    禁言 |19楼2009-05-20 16:04
                    回复
                      维护贴吧秩序,人工置顶


                      禁言 |22楼2010-06-13 23:54
                      回复