Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How does Qt realize the problem of building up mountains in the Lilliputian country?

2025-01-15 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

Shulou(Shulou.com)06/01 Report--

This article mainly introduces the relevant knowledge of "how to realize the mountain building problem in the small country by Qt". The editor shows you the operation process through the actual case, the operation method is simple and fast, and the practicality is strong. I hope this article "how to realize the mountain building problem in the small country by Qt" can help you solve the problem.

From story to code

There is a building block mountain in Lilliputian. This building block mountain is very big and fragile. It means that even if someone goes into the mountain, others do not know; very fragile means that only one person can enter the mountain at a time to build, otherwise the built building blocks may collapse.

So the question is, what can we do to make sure there are no problems?

One way is to set up a fence around Building Block Hill, just like Trump. But the cost is too big for the Lilliputian to afford, so the two of us came up with a way:

Set up a work card at an intersection into the mountain.

If you go into the mountains to build building blocks, you must get this license card at this intersection now.

Hand in your license card after the work is finished.

Lilliputian is an honest country, and everyone abides by this rule, so the work of building a building block mountain can be carried out smoothly. A project as big as a fence was supposed to be set up, but a work card was solved. What an ingenious method!

But over time, something happens that leads to problems with the building block project:

There was a villain who watched the game the night before last and forgot to take his work card when he went into the mountain without a good rest, so that later people can still get a work card to go into the mountain to build building blocks, and the result can be imagined: it is very likely to cause the building block mountain to collapse.

Or someone got his work card normally when he entered the mountain, but forgot to return it when he came out of the mountain. It turned out that there was no one in the mountain, but no one could enter the mountain. Although the mountain will not collapse, there is no way to continue the project.

There is also a situation where God (more likely a programmer) got two work cards when he created the land of Lilliputians. Although the villains strictly abide by the rules, more than one person will go into the mountain to build building blocks, which may still lead to the collapse of the building blocks mountain.

After reading this story, and then looking at the following code, what do you think of?

This is the end of the introduction on "how to realize the problem of building up the mountain in the Lilliputian country by Qt". Thank you for your reading. If you want to know more about the industry, you can follow the industry information channel. The editor will update different knowledge points for you every day.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Internet Technology

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report