The first implementation is the implementation of the algorithm.Demand: Touch the bar Hu, can not eat, can not listen, can only self-touch Hu, which Laizi can do any card but not touch and bar.When you write, you don't play Mahjong or the boss teaches. ^_^The most troublesome is the HU card algorithm. Before the search is not included Laizi normal Hu card, with a% of 3 more than 2, of which the remainder of 2 is the meaning of the remaining.But a laiz
Reprint please indicate the source, thank you http://blog.csdn.net/ACM_cxlove? Viewmode = ContentsBy --- cxlove
Question: Give 13 Mahjong cards and ask what cards you want to grab ~~~
Http://acm.hdu.edu.cn/showproblem.php? PID = 1, 4431
It means no Mahjong at all. I simply read the question, and then I started to do it after I heard Victoria talk about it.
Enumerate all the cards, and then determine if the
Cocos2dx standalone Mahjong (III)
Mahjong logic 4. Obtain card data
We have saved a one-dimensional array. Similar to a table, we can calculate the number of all cards, but how can we get the cards in our hands?
// Poker Conversion
Byte switchtocarddata (byte cbcardindex [max_index]/* input table for counting the number of all cards */, byte cbcarddata [max_count]/* outgoing hand card data */)
{
// Convert
Title Link: hdu 5379 Mahjong TreeTree DP, each node has a maximum of 2 child nodes for the root node of a subtree of more than 1 nodes, and either the node values of the descendants are greater than or less than itself (so Tson not 0 is, to multiply by 2). For a child node of K single node, the number of species is the full row k!. When a node does not have a sibling node, a subtree with this node as its root nodes can choose the maximum or minimum.#p
[Game Statement]Jingdezhen Mahjong[Action Options]: Eat and touch the bar Hu[Eat cards]sub-card: Flush[3]only Home Note: > Flush[million-piece tube]> Word Loops[Cardinal][Medium Whitish][Touch Cards]Sub-card: With three cards[3][Bar Card]Sub-card: The same four cards[4][rules of the HU brand]Pinhou (four pair of Hu) hand {pair will[1], sub-card} + side pair seven pair (seven pair can hu) hand {pair will[7]} (all by the unitary group card can also HU)
First of all, four Laizi to do 34*34*34*34 's poor lifting.And then do the pruning optimization.Time complexity differs by an order of magnitude 34But it's not the average efficiency, and the worst is still not going to rise too much.But some mahjong Laizi number more than 7At this point should be used to look up the table, and then the cycle to do the poor is obviously a waste of efficiencyThe relevant code is temporarily not availableYou can leave a
DescriptionQuestion Bank linkGive you a pair of mahjong, the condition of the HU card is a pair will and a number of straight and engraved composition. Now give you \ (m\) cards, cards common \ (n\) species, ask you to listen to which card.\ (1\leq n\leq 400,1\leq m\leq 1000\)SolutionConsider enumerations to listen to that card, and then enumerate which pair to do.For the rest of the cards, first from small to large to sweep once, if the current card
Mahjong sorting time limit:1 Second Memory limit:65536 KB
Dreamgrid has just found a set of mahjong with suited tiles and a white Dragon the in his pocket. Each suited tile has a suit (Character, Bamboo or Dot) and a rank (ranging from 1 to), and there is exactly one tile of E Ach rank and suit combination.
Character tiles whose rank ranges from 1 to 9
Bamboo tiles whose rank ranges from 1 to 9
Dot tiles wh
The overwhelming popularity of the network and the increasingly refined responsibilities of the network industry make most people think that network administrators are actually the same as Internet cafe administrators. This is incorrect because you are not familiar with the specific work of these two types of jobs. This article will explain the responsibilities of the two industries.
I. Inconsistent start-up requirements and development directions
Int
Internet cafe management system purchase:1. the Internet cafe billing management system is an operational management system. The primary consideration is the system performance and design philosophy. Is it suitable for Internet cafe owners to consider the concept of Internet cafe management, whether it can meet the Ope
In recent years, the new technological revolution represented by the Internet is leading the development of the traditional telecom concept and structure system in a new direction, with the gradual opening of access network markets in various countries and the gradual relaxation of telecommunications control policies, new business needs emerge in an endless stream in the increasingly fierce battle of territory. Driven by the huge market potential, various access network technologies have been cr
With the development of China's routing industry, it has also promoted the upgrade of routing technology. Here we mainly explain the Selection Skills of Internet cafe routers. Currently, internet-based applications of Internet cafe users have expanded from simple web browsing to more extensive fields such as QQ chat, VOD on demand, online games, education and training, and IP phones, the increasing number o
Recommended Internet cafe routers are not unknown. Internet cafes are a complicated place. In addition to constantly asking the network administrator for three or four questions, sometimes it also deletes programs and spams viruses. The experts are also terrible. They often study this way. If they do not dare to study at home or in the company, they can do anything in the Internet cafe. In addition to these
"World-wide internet cafe gas station": creating a stable electronic trading platformThe Development of China's e-commerce market is obvious to all. Its fast development speed and wide coverage completely surpass people's imagination. However, based on the consideration of security and stability, traditional e-commerce has always adopted the "Mouse and cement" approach to conclude online transactions and conduct offline logistics, and use the traditio
Currently, Internet-based applications of Internet cafe users have expanded from simple web browsing to more extensive fields such as QQ chat, VOD on demand, online games, education and training, and IP phones, the increasing number of these applications puts forward higher and higher requirements on the speed and stability of the network. Therefore, the performance requirements for routers in Internet cafes are also increasing accordingly: first, mor
With the development of China's routing industry, we have also promoted the update and upgrade of the routing technology. Here we have analyzed how to choose the internet cafe router. During network construction, the router is a very important device. In the special network environment of Internet cafes, how to choose a proper internet cafe router usually determines the operation and maintenance of Internet
The services currently provided by Internet cafes, such as web browsing, online games, online movies, distance education, and other basic services, are all related to the Internet, the quality of the network directly determines the viability of Internet cafes. Therefore, how to plan a high-quality network environment is a key point that Internet cafe operators must consider. Internet cafe Integrated Wiring
Currently, Internet-based applications of Internet cafe users have expanded from simple web browsing to more extensive fields such as QQ chat, VOD on demand, online games, education and training, and IP phones, the increasing number of these applications puts forward higher and higher requirements on the speed and stability of the network. Therefore, the performance requirements for routers in Internet cafes are also increasing accordingly: first, mor
Internet cafe access networks are worth learning. Here we mainly introduce the demand analysis and optimization solutions for Internet cafe access networks, including the characteristics and implementation specifications of such solutions, I hope this will help the internet cafe administrator. The application of Internet cafe
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.