Chapter 122 National Youth Olympiad in Informatics
The Informatics League is one of the most special of the five disciplines.
The most important reason.
It's because the school doesn't offer a computer science course at all.
Although Qianbei Middle School also has its own "computer room", it is almost never open to students, except for the fact that students are sometimes required to fill in information online.
Not only that, but the names of the competitions in several other subjects are "National High School XX League" and "National Middle School Student XX Competition".
The full name of informatics is the "National Youth Informatics Olympiad".
It may be because informatics is more niche, which is divided into NOI and NOIP, the former is a formal competition, and the latter is a popularization group and a promotion group.
In the middle of the race, there are a bunch of things that seem to be very troublesome.
If it weren't for obsessive-compulsive disorder, if he wanted to make up a gold medal in the all-around of five subjects, Su Mu would really be too lazy to look at these inexplicable rules and regulations.
However, fortunately, these things will not be officially prepared until the second half of this year, and it should not be a big problem to contact the teachers in charge of the school at that time.
In the summer vacation, it should be enough to do a little bit of work, and brush to the point of level three or four.
In addition to the five major competitions.
Su Mu also plans to try the National English Proficiency Competition for Middle School Students and the annual New Concept Essay Contest.
These will not be officially announced until the end of the year.
For Su Mu, it can only be regarded as the end of the schedule.
Another important point is world influence
In terms of influence, Su Mu is still in one star, and there is no specific value, only a small progress bar.
Looking at the appearance of the progress bar, Su Mu's current one-star has only completed less than 10.
Regarding this aspect, Su Mu plans to start with the aspect and video first, and become a writer or an up master.
Not only can you get a certain amount of influence, but you may also be able to get a certain amount of money.
In particular, the incentive plan launched by Dilidili in recent years has fed a large number of up owners who generate electricity for love.
And, though, the influence side can only provide one skill point per month at the moment.
But moving up to the late stage is definitely a long-term way to earn skill points.
There are a few things that are recorded here and there.
Come back to your senses.
Su Mu was stunned and found that he seemed to have a lot of things.
Although the pressure is not very high, it is all a competition to give away skill points.
But it still takes time to hone it to accumulate.
"I still have to increase my physical fitness by two levels first."
Su Mu thought silently.
"Ding! You have entered the Level 5 Library and all the points you earn from studying have increased by 100"
"Ding! You have viewed an informatics question, +1 informatics points, 1/100 of the current points, level 1. ”
Because some students in Zhejiang East University of Foreign Studies need to review for graduate school in the summer, the library will be open to 8 p.m. during the day from Monday to Friday during the summer vacation, and closed on Saturdays and weekends.
Because there is no restraint from other things, Su Mu's action power has become very high now.
On his first working day home, he began his journey to the library, and what he is doing now is to start all over again as a subject of informatics.
However, as soon as he got started, he felt a little uncomfortable.
Because informatics is just too complicated.
The preliminary round examines the general and practical knowledge of computer science popularization, and is mainly based on written examinations.
The semi-final is a program design that must be debugged on a computer.
Whether it is computer popularization of scientific knowledge or programming, Su Mu has to learn from scratch.
The two books he has in his hands now are "Informatics Olympiad - Improving Chapter" and "Informatics Olympiad: Mathematics Yitong ++ Edition" purchased on Taobao
"In recent years, there have often been questions about finding a feasible solution or the optimal solution to a problem, which are collectively referred to as optimization problems, and greedy algorithms are common methods to solve this kind of problems."
The first thing Su Mu opened was this "Informatics Olympiad One Book: Improvement Chapter"
"Optimization Problem." He touched his chin, and several mathematical solutions for optimization flashed through his mind.
Many things in informatics are themselves connected to mathematics, which makes his state of mind a little more stable.
However, when he saw the example questions, several questions immediately appeared in his mind.
Task 1 requires that a number be selected from each row in a matrix of positive integers in n rows such that the sum of the selected n numbers is maximum.
Analyzing this problem can be solved by a greedy algorithm, select n times, and select the maximum value in the corresponding row each time.
Su Mu ""
This kind of topic still needs to be analyzed??
Isn't that a matter of course?
She looked at the second topic.
Question 2 in an n?? In the squares, each grid is given a number (i.e., a weight), which stipulates that each movement can only go up or to the right, and now try to find a road strength so that the sum of the weights from the lower left corner to the upper right corner is the largest.
Resolve in this case
Look at it step by step.
Su Mu didn't think there was anything difficult, it was just a matter of taking extreme values.
However, when he turned to the classic exercises and analysis at the back, the whole person was not good.
【Classic Exercise】On an 8x8 square-square, start from any designated square, and find a path for the horse to go through each square of the board and only pass it once.
Parsing is first of all a search problem, which is solved by using depth-first search, and the algorithm is as follows
1. Enter the initial position coordinates x,y;
Step 2
If ampapgt64 outputs a solution, return to the previous step--
(x,y)←
Calculate the sub-nodes of (x,y) in eight directions and select those that are feasible
Loop through all feasible child nodes, and repeat 2 in Step ++
Apparently 2 is a recursive process called as follows (++ program parsing)
defen8
voiddfs(tx,ty,tunt)
{
ti,tx,ty
if(untampapgtnn)
{
output_sotn()// Output a solution
return
}
for(i=0iampaplt8i++)
{
tx=hn[i]x//hn[]holds eight azimuth subnodes
ty=hn[i]y
s[tx][ty]=unt
dfs(tx,ty,unt+1)//recursive call
s[tx][ty]=0
}
}
This is perfectly feasible because it is entering the entire solution.
But when the horse traverses 8x8, there are so many solutions that it is not an exaggeration to describe it astronomically, so our solution process is very slow, and the time to come up with a solution will also be very slow.
When we select the child nodes of each node, we give priority to the search with the smallest 'exit', which means the number of feasible child nodes in these child nodes, that is, the fewer 'grandson' nodes, the priority of hops.
If you give preference to sub-nodes with more exports, there will be more and more sub-nodes with fewer outlets, and it is likely that 'dead' nodes will appear
This search below is purely futile and wastes a lot of useless time.
On the other hand, if you give priority to jumping nodes with fewer exits every time, there will be fewer and fewer nodes with fewer exits, so that the chance of success in jumping is greater.
Su Mu: ". . . ”
A bunch of questions slowly appeared in his mind again.
I didn't expect such a big leap forward.
Seeing that there was only one small question, but it was a dense analysis, Su Mu suddenly understood why so many people participated in the Mathematics Olympiad, but so few people participated in the Informatics Olympiad.
This thing, are you sure it's suitable for teenagers??
Won't it be bald?
ps, because I'm going to start online classes, I have a lot of things to prepare, and I'll be busy slowly, so the update time will occasionally change, but two more per day should be able to be maintained
PS2 weakly asks for a few recommendation votes.
。