GDOI2018 enigmatic summary

A summary from konjac

     Day0

             After I finished typing the summary in the computer room, I started to work on the questions I played yesterday, and I AC found the error soon after. I didn't know what to do next, so I made a template and re-understood the algorithm structure and its application.

      Day1

            I got up early in the morning, put on my running shoes and went out for a run. I was afraid that I would not get into the state so quickly on the first day, so I was lazy and had no choice. After running about 2 kilometers, I sweated a little, then went home and took a shower. Refreshed. Come to the computer room early and start doing the questions.

            first question

                  It seems that n numbers are given, and you are asked to divide them into k parts according to the serial number, so that the weights of each part are equal, and find the largest k. can be done? ? The original title of the primary school competition? ? Let it go.

            Question 2

                  There are n numbers, and there is a mod number m, and you can do an overall +1 or an overall -1 for a certain interval. Finally, make these n numbers mod m all 0, and find the minimum number of operations.
                  Looks like DP? ? Violence is hard to beat.

            Question 3

                  This question is very disgusting. It is said that there is a child who wants to pick apples. Each time, only the apple at the root of the tree is picked. After picking, the apple on the top will fall down one layer. Assuming that the child picks apples only once a day, ask what is the total weight of apples contained in node x and its subtrees before picking apples on the i-th day. There are also p operations, each time adding an apple of weight w to the x node.
                  The score of this question seems to be easy to get, and it is violent. Using the tree array and dfs sequence should be able to score more than 20 points.

            Question 4

                  Let’s forget this question. Given a graph of n points, each two points has at most one connected edge, and there are m paths, indicating that two adjacent points on the path are connected. Find the expectation of the strong connected component? ? emmmmm.
                  Do you think I understand the question? I don't even know how to fight violence, so I have to find a pattern. When I find that m is 0, the answer is n to the power of x (forgot how much). Fast exponentiation solver for emm burst zero.

            finally

                 The first question is definitely over, the enumeration factor + judgment is enough (expected 100)
                 The violence of the second question is still playing for a long time, but I found that the third example is very sad, I changed it, and finally broke down and engaged in a water method, and even the examples could not pass emm (expected to see the data 0~20)
                 The third question seems to be worth 20, so I messed around with more than 170 lines of code, and it should be stuck (expected 20)
                 For the fourth question, I can forget about the rules. . .
                 Overall it is still very metaphysical 120~140.

                 Happiness is not very low in the end, but there is still a lot of room for improvement 125. (The judgment example of the third question is wrong, resulting in not entering the function that solves part of the score and only getting 10 violent points, the second question is unexpected Card over 15 greedy emmm)

      Day2

           It was very annoying in the morning, so I slept for a while when I couldn’t get up to run, but I didn’t feel refreshed when I went to the exam room.

           first question

                  I didn't read the first question beforehand, it's a bit long. Specifically, each point has a weight ai, and the edge weight between two nodes (x,y) is defined as sigma( sigma( i+j ( gcd(i,j)==1 ) ) ( 1 <= j <= ay) ) (1 <= i <= ax).
                   It seems that it can be sorted and then the record status should be able to water 40.

           Question 2

               The funny subgraph is really funny. I pushed the C function and found that it is not, because there is not necessarily an edge between the selected point sets, what should I do? . . It took a long time to grind.

           Question 3

              There are n wooden boards, which are equivalent to n points on a two-dimensional plane. The distance function between each two points is abs(x1-x2)*min(y1,y2). Each query points two points in the L to R interval Point the longest distance. It seems to only be violent, and some points seem to be unable to get emm.

          Question 4

                  Given a graph, there are two operations, one is to hide the x point, and the other is to restore the x point. The smallest ring size in which x is required. After thinking about the process of finding the smallest ring by floyed, I found that it is not possible, because the size of the smallest ring where the x point is located is not the size of the smallest ring in the entire graph. So it just doesn't work. Violent search hit.
            In the end, I don't know why, the first question is all wrong, the second question is all wrong, the third question gets violent points, and the fourth question gets violent points, a total of 30 points emm.

            So the two days add up to 155, and the chicken has won a second prize. The next step is to learn new algorithms and do exercises. Come on! ! Violence is great

                  



Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325976369&siteId=291194637