NOIP2017 Travels


11.10

  • Most of the people in the school booked a hotel near the examination room together, and I went home directly (it feels close to the examination room).
  • Went to the hospital in the afternoon...
  • I went to bed at ten o'clock in the evening.

11.11(Day1 )

  • I got up at 6:40 in the morning and went to the examination room but didn't arrive at 8 o'clock.
  • Went around the second middle school with ytx and hz, the campus is really big...
  • The game starts, after reading the T1 T2 question in the first ten minutes, then start thinking about T1.
    • Hey, looking at the T1 data range, it should be the conclusion question, right? Looking at the sample, it seems a*2-bthat they are both , so I hurriedly called a*2-band thought about T2.
    • Wow, T2 is obviously a direct simulation. I guess the code farmer's problem... Deal with it, dfs should be ok, but I don't know if I can write it, it is better to make a small sample to test T1.
    • Yeah, I tested a sample 5 7and it was wrong...
      • Quickly make a violent program to hit the table. The violent idea is as follows:
        first sort a, b, a>band then open a bool array to record, starting from 0 and pushing backwards until there are consecutive b numbers that can be paid, then the latter Can pay.
      • I got some data myself, and after observation, it seemed that the answer should be yes a*(b-1)-b, so I changed the program.
    • Start playing T2.
      • First use a stack to match, and then recursively find the answer. The idea is very simple, and there are many details in the fight.
      • Be careful to write a rough outline on the draft paper before starting the code. Everything went well, the variables were defined after the program was finished, and the compilation passed quickly.
      • I tested the first sample and found some errors. I adjusted it. It was probably because there were some errors in the sequence when returning the values.
      • I tested the second sample, and found a mistake again, found a small mistake, corrected it, and passed both samples.
    • T3 looked at half an hour left, I probably thought about it, maybe it is a dp (look at that k is so small, probably every point, how much more than d, get a two-dimensional dp), but the time is running out , I directly hit a spfa to find the shortest path, leaving dfs O(n^n) to do it violently, I don’t know how many points it can get...
  • When I got home at night, I reopened the QQ Speed ​​that I hadn't played for a month and relaxed. Who knows that the update took about ten minutes. In order to go to bed early, I played a few games and fell asleep at ten. I feel a little chill in my body, and the quilt is tightly wrapped when I sleep at night, and I have a cold at critical moments...

11.12 (Day2)

  • It was almost the same as yesterday. When I arrived at the examination room before 8 o'clock, ytx suddenly said "on luogu" and heard someone say that he would test the network stream. He quickly became the network stream overnight, and then memorized the template before the test. I was shocked, feeling cold...
  • At the beginning of the game, I still read the topic first. T1 seems to be a direct violent dfs. T2 and T3 have understood the topic and haven't thought about it.
  • So I started writing T1, and I typed the program in about ten minutes. I tested the data and it seemed to be ok. I couldn’t get anything out of hand. I thought about whether it would explode long long or something. It seemed okay, so I went Do it later.
  • T2 Seeing that n is so small, it may be due to state compression, but at that time, the understanding of the topic was not deep enough and there was no idea, so I skipped to T3.
  • T3 this kind of question, it feels like a data structure like a line segment tree, did not think about it, first made a violent simulation. When I opened the array, I realized that it only passed 30 points, which strengthened my idea of ​​data structure. Look at the watch, there is still an hour and a half, then think of eleven o'clock, and see if you can start the correct solution afterwards.But in the end did not figure it out
  • A little panic, look back at T2.
    • There is still an hour, "Squeeze the situation that has been developed?" I thought to myself, but how to transfer...
    • Later found the title means exactly that: to find a tree in this figure, the developer can get the cost of that edge on the starting point (from the point near the root), and then make sigma(点权*深度)a minimum.
    • A few days ago seemed to think the proper way similar simulation questions ( portal ), as long as the modifications deltathere all of a sudden take a little tree right point and should be on the line.
    • Think about the complexity, enumerate a tree, it seems to be O(n^n), and then calculate the minimum cost of this tree, the complexity is O(n), it seems that the point of n=8 can be passed , Pruning should be fine when enumerating the tree, but 80 points are not bad.
    • So I started to play, first hit the method of not enumerating the tree (for the first 20 points), directly on the code of the question, it seems to be all right, probably write the framework on the draft paper, and it will be written in a while.
    • I backed up the program and started to add the part of the enumeration tree. As a result, this writing was cool. The program came out several times in the meantime, but it was crossed off by the sample I made myself. After adjusting it for a long time, it was found that there was a problem with the data recording in dfs, but only fifteen minutes were left. I was anxious and made a decision to delete the program and rewrite it (in fact, it has been refactored once before)!
    • Then I deleted it (and the original 20-point backup of course), clarified my thoughts a little bit, started writing, writing, and then the exam was over...
  • The mentality collapsed, I went out of the examination room to discuss with other people, and found that they all made T2 (at least 80 points), eh...

11.13

  • Today I suddenly realized that d2T1 sqrt has its own log constant, plus the double is used, the accuracy is really not good, and it seems a lot of points are missing... However, since the test is over, it is over. Now you can think about it. It doesn't have any substantive effect. Let's pick up the courses in school first.

11.14

  • I got the source program tonight. I tested it and found that d1t2 has no AC! ? I got some data on Luogu, and when I looked at it, I found that I missed a line, and then I looked at the code. There was a situation where there was no output... That is to say, this question may be 0 points... It's really sad...

11.15

  • In the afternoon, I took a closer look at the code and found that I made another mistake that shouldn't be made.Lead to no points, See the following program specifically...
    Write picture description here
    Write picture description here
  • This story tells us not to abuse the right program when data is not read breakand returnah ...... (do take data reading, especially the kind of sets of data)

11.20

  • Today is the day for the school's autumn outing, and it is also the day for NOIP to issue results. The website said it started at 8:30 in the morning, and we got on the train at 7 o'clock in the autumn tour and went to Changlong. It was 8:30 in the car, and I borrowed a classmate’s mobile phone to check the score, and found that "the score has not been uploaded yet." It was still the case at noon, which even showed that the genius gave points. In the evening, the teacher posted the results in the QQ group, with 330! ? (330=100(math)+90(complexity)+0(park)+20(treasure)+30(phalanx)+90(cheese) )Maybe luck, the data is not stuck in the place where I made a mistake. In short, we still have to continue learning, it's not over yet!

11.30

  • The score is 295, and it is still a first class, and it can be regarded as a glory for the school. Originally it was estimated that there were only a dozen first class this year, but now suddenly it has become 21. The teacher is very happy, saying that we will have KFC tomorrow! Continue to refuel next year.

Guess you like

Origin blog.csdn.net/jackypigpig/article/details/78516070