Chapter Seventy-Seven: Let the Others Enjoy the Joy Together
What is Big Guy?
This is the big guy!
The researchers and professors I met before were all asked to apply for computer-related majors at a certain university, and promised to reduce their scores for admission through independent enrollment.
Now it's direct admission!
No college entrance examination!
Direct Admission!
The University of Science and Technology is also one of the top universities in China, and those who can enter are the top students with the highest scores in the college entrance examination.
Zhao Yi had the urge to stumble on the algorithm package when he heard it.
But, forget it.
Who made the goal of being admitted to Mizuki University when he crossed over?
Zhao Yi was still curious, and clicked on the algorithm package sent by Professor Liu, there were four algorithm packages, and he clicked on two and glanced at them a few times.
Headache!
The content of these algorithm packages is really complex, and it takes a lot of time to understand them, and it must be a grand project to simplify and correct them, and I feel that it is better to write a new one.
That's what a programmer does.
Other people's things are someone else's, and following other people's ideas to understand the program, sometimes it's better to write a new one, maybe faster.
Of course.
The premise is that it can be written.
In addition, if you look at other people's programs, your thinking will also be affected, and you may be able to think of some shortcuts when you design yourself, but you can't think of them when you study others.
A wave of hunger hits.
As soon as Zhao Yicai pushed the door open, he heard his mother's shout, "Xiao Yi, are you done?" There are still hot vegetables and steamed buns in the pot, go to sleep after eating!"
"Good"!
When he had finished eating, he lay down and fell asleep.
When I woke up the next day, breakfast was already on the table, and I received a text message on my phone.
Dad: Your mom asked me to remind you to have breakfast.
Re: Got it.
Since Zhao Zhenxi has a mobile phone, he always tries his best to use it, either calling or texting, dozens of text messages per monthly package, it seems to be a loss if he doesn't use it, but most of his circle of friends don't have a mobile phone, and there is no receiver if they want to send text messages.
Zhao Yi shook his head amusedly.
After breakfast, he continued to fight energetically.
Debugging!
Run!
After the screening program is programmed, it has been debugged and run, and he mainly debugs the follow-up program and looks at the overall operation.
Nearly 5,000 lines of code run, and there are still a lot of errors.
Even with the help of "Contact Rate", just typing errors can find more than 20 places, and typing a wrong symbol will lead to huge problems in the program.
Debug, modify!
Debug and modify!
After more than two hours, the program finally worked successfully.
Zhao Yi entered several initial states of the Rubik's Cube, and all of them got the imaginary results.
His main focus is on the speed of operation.
One of the data inputs was instantaneously maximized when the CPU was at its maximum, and the computer seemed to get stuck, and it took three or four seconds to get the result.
He simply added a count item nn to the filter, and each time the filter runs, the count increases a little bit.
Then he entered two kinds of Rubik's Cube states that could be restored in fifteen steps.
The program ran for about a second and got the result.
It turned out to be no problem.
nn got different values, one was 36211 and the other was 67091.
"So little?"
Zhao Yi was surprised.
Even if he was confident in the screening method, he did not expect that the second step of screening and comparison would brush down such a huge amount of data.
It's right to think about it.
Filtering and comparing brushes down the most computationally demanding, least useless, and continues to run the parts that eliminate more of the steps that make the Rubik's Cube confusing.
The amount of computation is incremented exponentially.
Screening makes the bottom of the index smaller, and within ten steps, it will become an increase in thousands and hundreds, and the increase is negligible.
"If it is the most complex situation, the number of screenings can reach tens of millions, or even hundreds of millions?"
Zhao Yi thought.
That's not a lot of data.
Ordinary home computers can still solve the problem, but the computing time required is longer, maybe tens of seconds, maybe a minute, a few minutes, or more than ten minutes.
Even to the point where it goes up to the point of hours, it's already quite remarkable.
Now it is recognized in the world that the calculation of the third-order Rubik's Cube can only be done with a supercomputer, and the performance of a home computer is too poor.
Once the program is designed, all that's left is optimization.
Zhao Yi made an input optimization.
Previously, in order to facilitate access to the design topic, the input side required fifty-four colors of six interfaces, but in fact, only three faces were input to determine the entire Rubik's Cube.
After adding the input optimization code, only twenty-seven colors of three faces are needed.
After that, there is the detection code.
If the color of the Rubik's Cube is not true, the detection code will be executed to give an error message.
And then.
Zhao Yi made a simple interface.
There are 27 spaces on the left that can be filled in with the color of the Rubik's Cube, and on the right is a blank output screen that displays the results of the rotation with the least number of steps.
Plus a small tooltip in the middle.
According to the running of the program, put in three prompts: please enter the color of the Rubik's cube, the program is executing, please wait, and complete, please see the steps on the right.
ok!
Come to an end!
Zhao Yi looked at the interface on the computer, and after entering a Rubik's Cube state, the answer given on the right side, a huge sense of accomplishment emerged.
That's it!
The result of a few days and more than a dozen hours of work!
This is the essence!
It's art!
At the great moment of success, can you still be considered a person if you don't pretend to be forced?
Right!
It's about having fun with other people!
Zhao Yi quickly took a screenshot of the screen, and then sent it to the 'Computer Technology Exchange Group', and then dived silently with a smile on his face and hands on his chest.
Suddenly.
The swarm exploded!
......
A few days ago, when Zhao Yi posted data in response to questions on the Internet, the group discussed the problem of calculating the third-order Rubik's Cube, and there was no result in the discussion.
Everyone thought it was over.
The day before yesterday, Zhao Yi took a video to restore the Rubik's Cube, which once again caused discussion in the group, but there was still no result.
Most of the people in the group are not familiar with Zhao Yi.
It is very impolite to ask directly about this kind of problem that may involve key technologies, because the technology involved may be invaluable.
Now seeing the picture sent by Zhao Yi, all the people in the group were shocked.
Intelligent technology Zhang Junlei: "Is this a third-order Rubik's Cube?"
Mechanical signal Liu Chengwu: "I don't believe it! I don't believe it! I don't believe it......"
Science missionary Ma Xiaojun: "Don't be kidding, I've been thinking about it for several days, and I have no idea at all, and the amount of calculation is too huge!"
Gao Jixian, who created a dream: "Can it really be calculated?"
Sister Qian Hong: "When I saw this, I put it directly on the work at hand and took out the Rubik's Cube/Rubik's Cube picture from the drawer. ”
Qian Hong really sent a few pictures of the Rubik's Cube, and added a sentence by the way, "You use that calculator to help calculate it, and if you can calculate it, I will call you Dad." ”
Zhang Junlei: "Sure enough, it's Sister Li!"
Liu Chengwu: "Give Sister Li a force!"
Ma Xiaojun: "Give Sister Li a force!"
Gao Jixian: "Give Sister Li a force!"
Zhao Yi pursed his lips vigorously, looked at the picture and entered the Rubik's Cube calculator, quickly calculated the result, and then sent the screenshot to the group.
Suddenly.
The group was quiet.
Zhao Yi was about to wait for the follow-up, when he suddenly heard a knock on the door outside, and when he paid attention, he found that it was more than twelve o'clock.
"So early?" he said, opening the door.
There was a group of people standing at the door.
Sun Liang pushed the door at the front and entered.
Lin Xiaoqing and Zhao Linlin followed closely behind, laughing and talking to each other, saying hello and going in.
There are two left outside the door.
One is a middle-aged man with a bit of fat and dressed in casual clothes, and the other is a tall woman in a long skirt, dressed up and down very fashionably.
The middle-aged man smiled and stretched out his hand, "You are Zhao Yi, a genius hacker on the Internet, I am Zhou Fangsheng, the head of the program group of "Brain Bang". ”
He pointed to the woman beside him, "This is Feng Lei from Tianyuan Studio." ”
"You can call me Sister Feng. Vonleh added, with a warm smile on his face.
Zhao Yi nodded and asked, "What is your intention ......?"
"We're here to meet you face to face and talk about the misunderstanding that happened before. ”
Feng Lei said bluntly, "There is a lot of public opinion on the Internet, and there is everything to say, I think, whether it is for our column or for your life, it will have a bad impact." ”
She looked left and right and asked with a smile, "Are you going to talk here?"
"Please come in!"
Zhao Yi glanced into the room, but turned around to give up his position.