Rule system

Chapter 77: Let Others Enjoy The Joy Together

What is a boss?

This is the boss!

The researchers and professors I met before were all asked to apply for a computer-related major at a certain university, and promised to lower their scores through independent enrollment.

Now it is direct admission!

No college entrance examination!

Direct admission!

The University of Science and Technology is also one of the top universities in China. Those who can enter are the top-notch students in the college entrance examination.

After hearing that, Zhao Yi had an urge to slam the algorithm package.

But forget it.

Who will set the goal of getting admitted to Mizuki University while crossing?

Still with curiosity, Zhao Yi clicked on the algorithm package sent by Professor Liu. There were four algorithm packages in total. He clicked on two and glanced at it.

headache!

The content of these algorithm packages is really complicated, and it takes a lot of time to understand it. It must be a magnificent project to simplify and correct it. I feel that it is better to write a new one.

This is the job of a programmer.

Other people's things are other people's. If you follow other people's ideas to understand the program, sometimes it is better to write a new copy, and the speed may be faster.

of course.

The premise is that it can be written.

In addition, after reading other people's programs, the thinking will also be affected. Perhaps when designing by yourself, you can think of some shortcuts, but those who study others can't.

A burst of hunger hit.

As soon as Zhao Yi opened the door, he heard his mother shout, "Xiao Yi, are you finished? The vegetables and steamed buns are still hot in the pot, and then go to bed after eating!"

"it is good"!

When he finished eating, he lay down and fell asleep.

When I woke up exhausted the next day, breakfast was already on the table, and a text message was received on the phone.

Dad: Your mother asked me to remind you to have breakfast.

Reply: Got it.

Ever since Zhao Zhenxi had a mobile phone, he always tried every means to use it, either calling or sending text messages. There are dozens of text messages in the monthly package. It’s like losing money without losing it, but most of his friends Without a mobile phone, there is no recipient to send a text message.

Zhao Yi shook his head funny.

After breakfast, he continued to fight vigorously.

debugging!

run!

After the screening program is compiled, it has been debugged and run. He mainly debugs the follow-up program and looks at the overall operation.

Nearly five thousand lines of code run, and there are still many errors.

Even with the assistance of "Contact Rate", just inputting errors can find more than 20 places, and a wrong symbol will cause huge problems in the program.

Debug and modify!

Debug and modify again!

After more than two hours, the program finally ran once successfully.

Zhao Yi entered several initial states of the Rubik's Cube, and all got the desired result.

His main concern is the speed of operation.

After a set of data was entered, the cpu reached its maximum efficiency instantly, the computer seemed to be stuck, and it took three or four seconds to get the result.

He simply added a count item nn to the screening program. Each time the screening program runs, the count item will increase a bit.

Then he entered two kinds of Rubik's Cube states that could be restored in 15 steps.

Run the program for about a second and get the result.

The result is no problem.

nn got different values, one is 36211 and the other is 67091.

"so little?"

Zhao Yi was surprised.

Even if he had confidence in the screening method, he did not expect that the second step of screening and comparison would brush such a huge amount of data.

Think about it.

The screening and comparison brushed away the most computationally demanding and most useless parts, and the continued operation eliminated more steps that made the Rubik's cube confusing.

The amount of calculation increases exponentially.

Screening makes the bottom of the index smaller, and within ten steps, it will increase in units of thousands or hundreds, and the amount of increase is negligible.

"If it is the most complicated situation, the number of screenings can reach tens of millions or even hundreds of millions?"

Zhao Yi thought.

That kind of data is actually not much.

Ordinary home computers can still solve the problem, but the calculation time is longer, maybe tens of seconds, maybe one minute, several minutes, ten minutes.

Even if it rises to the level of hours, it is already quite remarkable.

Now the world recognizes that the calculation of the third-order Rubik's Cube can only be done with a supercomputer, and the performance of home computers is far too poor.

After the program is designed, the rest is optimization.

Zhao Yi made an input optimization.

In the past, in order to facilitate the entry of the design theme, the input terminal required fifty-four colors of the six interfaces. In fact, inputting only three faces is enough to determine the entire Rubik's Cube.

After adding the input optimization code, only 27 colors of three faces are needed.

Then comes the detection code.

If the color of the input Rubik's cube is not true, the detection code will execute and give an error message.

then.

Zhao Yi made a simple interface.

There are 27 spaces on the left, which can be filled in with the colors of the Rubik’s Cube; on the right is a blank output interface, which will display the results of the minimum steps in text.

Add a small prompt box in the middle.

According to the running status of the program, put in three prompts: Please enter the color of the Rubik's Cube; the program is being executed, please wait; it is completed, please see the steps on the right.

ok!

End!

Zhao Yi looked at the interface on the computer and entered a Rubik's Cube state, and a huge sense of accomplishment emerged from the answer given on the right.

finished!

A few days and ten hours of work!

This is the essence!

This is art!

In the great moment of reaping success, can you count as a person without pretending to be forced?

Correct!

This is to let other people enjoy the joy together!

Zhao Yi quickly took a screenshot of the screen, then sent it to the'Computer Technology Exchange Group', and then dived silently with a smile on his face and arms folded.

Suddenly.

The group exploded!

...

When Zhao Yi posted data in response to online queries a few days ago, the group discussed the calculation of the third-order Rubik's Cube, and the discussion and discussion had no results.

Everyone thought it was over.

Zhao Yi took a video to restore the Rubik's Cube the day before yesterday, which once again caused discussion in the group, but there was still no result.

Most people in the group are not familiar with Zhao Yi.

This kind of question may involve key technology, it is very impolite to ask directly, because the technology involved may be invaluable.

Seeing the pictures sent by Zhao Yi now, everyone in the group was suddenly 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..."

The science missionary Ma Xiaojun: "Don't be kidding, I have been thinking about it for several days. I have no ideas at all. The amount of calculation is too huge!"

The dream of creating human beings Gao Jixian: "Can it really be calculated?"

Sister Geili Qian Hong: "I saw this, put it directly on the job at hand, and took out the Rubik's Cube picture from the drawer."

Qian Hong really sent a few pictures of Rubik's Cube, and added a sentence, "You use that calculator to help with the calculation. If it can be calculated, I will call your father."

Zhang Junlei: "It really is sister to force!"

Liu Chengwu: "Sister Gai Li is awesome!"

Ma Xiaojun: "Brilliant sister!"

Gao Jixian: "Sister Gai Li is awesome!"

Zhao Yi pursed his mouth 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 is quiet.

When Zhao Yi was about to wait for the follow-up, he suddenly heard a knock on the door outside, and only noticed that it was past twelve o'clock.

"So early?" He went to open the door.

A group of people stood at the door.

Sun Liang pushed the door in the front and entered.

Lin Xiaoqing and Zhao Linlin followed, laughing and talking to each other, and went in to say hello.

There are two left outside the door.

One is a middle-aged man with a blessed figure and casual clothes; the other is a tall woman in a long skirt, dressed up and down very fashionable.

The middle-aged man smiled and stretched out his hand, "You are Zhao Yi, a genius hacker on the Internet, and I am Zhou Fangsheng, the head of the "Big Bang" program group."

He pointed to the woman beside him, "This is Feng Lai from Tianyuan Studio."

"You can call me Sister Feng." Feng Lai added, with a warm smile on his face.

Zhao Yi nodded and asked, "What is your intention to...?"

"We are here to meet you face to face and talk about the misunderstanding that happened before."

Feng Lai said bluntly, "There is a lot of public opinion on the Internet, and there are all things said. I think it will have a bad impact on our column and your life."

She talked and looked around, then smiled and asked, "Shall we talk here?"

"Come in!"

Zhao Yi glanced at the room, but still twisted to give up his position.