more than a dozen, with a large number of pruning, the performance is not bad.
Static int [] [] ref = {// phone keypad number-letter ing table {0}, {0}, {3, 0, 1, 2 }, // button 2, three letters a, B, c {3, 3, 4, 5}, {3, 6, 7, 8}, {3, 9, 10, 11}, {3, 12, 13, 14}, {4, 15, 16, 17, 18}, {3, 19, 20, 21}, {4, 22, 23, 24, 25 }}; public static queue
Thoughts:1. The above simulation process only gives the maximum possible degree of the string, you can also give all matching strings in order, and then
each scenario begins with a line ining "Scenario # I:", where I is the number of the scenario starting at 1.
For every number sequence s of the scenario, print one line for every keystroke stored in S, blocks t for the 1 at the end. in this line, print the most probable word prefix defined by the probabilities in the dictionary and the T9 selection rules explained above. whenever none of the words in the dictionary match the given number sequence, p
T9
Time Limit: 2000/1000 MS (Java/others) memory limit: 65536/32768 K (Java/Others)Total submission (s): 629 accepted submission (s): 250Problem descriptiona while ago it was quite cumbersome to create a message for the Short Message Service (SMS) on a mobile phone. this was because you only have nine keys and the alphabet has more than nine letters, so most characters cocould only be entered by pressing one key several times. for example, if you want
Celedial is a completely free, quick and easy intelligent dial-up helper that can help you quickly find the contacts you need. Provides a digital/alphabet Dial-up interface similar to the IPhone dialer (support for skin change), does not change the existing habits, simple and easy to use
Software running speed, find contact efficiency, experience even more than similar billing software. There is no need to jailbreak on the iphone, to achieve T9
Article Difficulty: Beginners
About T9 Input method of the core program (provided by my friend Nix), a total of two documents, one is NixInputMethod.h, there is a t9.c; See appendix.
The implementation of the specific input method is as follows:
1. First create a dialog box, and then put two controls in it: Idc_edit1 and Idc_word (static control)
2. In order to achieve the input in the edit, the static wi
Link:
http://acm.hdu.edu.cn/showproblem.php?pid=1298
Topic:
Problem Description
A while ago it is quite cumbersome to create a, the short message Service (SMS) on a mobile phone. This is because your only have nine keys and the alphabet has more than nine-letters, so most characters could Ered by pressing one key several The times. For example, if you are wanted to type "Hello" had to press key 4 twice, key 3 twice, key 5 three times, again key 5 three Times, and finally key 6 three times. T
Link:
Http://acm.hdu.edu.cn/showproblem.php? PID = 1, 1298
Question:
Problem descriptiona while ago it was quite cumbersome to create a message for the Short Message Service (SMS) on a mobile phone. this was because you only have nine keys and the alphabet has more than nine letters, so most characters cocould only be entered by pressing one key
Several times. for example, if you wanted to type "hello" You had to press Key 4 twice, key 3 twice, key 5 three times, again key 5 three times, and f
T9
Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission (s): 1273 Accepted Submission (s): 506
Problem DescriptionA while ago it was quite cumbersome to create a message for the Short Message Service (SMS) on a mobile phone. this was because you only have nine keys and the alphabet has more than nine letters, so most characters cocould only beEntered by pressing one key several times. for example, if you w
Problem Descriptiona while ago it is quite cumbersome to create a message for the short message Service (SMS) on a mobile Phone. This is because nine keys and the alphabet had more than nine letters, so most characters could only be ENT Ered by pressing one key several times. For example, if your wanted to type ' hello ' had to press key 4 twice, key 3 twice, key 5 three times, again key 5 three Times, and finally key 6 three times. This procedure was very tedious and keeps many people from usin
I previously worked on the address book software, where I had been worried about how to implement T9 input while I was working on a dial. I found a lot of posts online and I was not satisfied with the answer.However, it was finally implemented. It seems that many friends in the community need it. Let's share it here.This is the dial case extracted from my project. It fully implements the dial function in other address books, but it still lacks loading
Before doing the Address book software, which has been making dials for how to achieve T9 input troubles, the Internet to find a lot of posts, there is no satisfactory answer.But finally realized, look at the community seems to have a lot of friends need to share here.This is in my project to extract the dial case, the function of the full realization of the current other Address book dial function, but in the loading efficiency is still insufficient,
Problem Description a while ago it is quite cumbersome to create a message for the short message Service (SMS) on A Mobil E phone. This is because nine keys and the alphabet had more than nine letters, so most characters could only be ENT Ered by pressing one key several times. For example, if your wanted to type ' hello ' had to press key 4 twice, key 3 twice, key 5 three times, again key 5 three Times, and finally key 6 three times. This procedure was very tedious and keeps many people from us
Palindrome numberDetermines whether a positive integer is a palindrome. No extra space is allowed.AnalysisThe topic suggests that if you want to convert integers to string type, do not meet the topic does not occupy additional space, in additionYou could also try reversing an integer. However, if you had solved the problem "Reverse integer", you know that the reversed integer might overflow. How do would handle such case?So we can only use the mathematical calculation,/and% to calculate each bit
Source: poj 1451 T9
Question: give you some words and priorities. When you press the number, the first word that appears is the button on our mobile phone.
Ideas: to create a dictionary tree, because one number corresponds to multiple letters, we need to output the largest weight. I used the priority queue. Here, the priority of each prefix is that all words are given priority. sum of Values
For example, ABC 5 Abd 6 ACD 7, the priority of a prefix is
Question: http://acm.jlu.edu.cn/joj/showproblem.php? Pid = 1, 1058
Algorithm: Trie tree, breadth-first search
Idea: Build a dictionary into a Trie tree. Each time a key sequence is processed, a queue is established and processed cyclically. During the initial cycle, the Trie root node is queued. During each cycle, traverse all the child nodes of each node in the queue, and queue all the nodes of the child nodes that are the same as the keys currently processed, select the node with the highest
HDU-1298-T9
Http://acm.hdu.edu.cn/showproblem.php? PID = 1, 1298
A good question: dictionary tree + DFS. For more information, see swm8023.
Simulate the mobile phone input method, give a few words, that is, frequency, and then give several numeric strings to determine the characters that will be displayed for each input number for a given number string
Each number in the number string in this question represents a letter, rather than a regular
Title Source: POJ 1451 T9
Test instructions: Give you some words and priority values and then when you press the number, the first word is the key of our usual phone.
Idea: Build a dictionary tree because there are multiple letters in a number, so there's a lot of things we want to output the highest value of the one I used priority queue here the precedence value of each prefix is the value of all words and
For example ABC 5 ABD 6 ACD 7 then a the pr
Input method, the existence of a magical feature of our country.
In China, the mobile input method may be the most used by players. But any booming operating system, such as Symbian, Android, iOS and other platforms, can install a third-party input method. Because of the original Chinese input of various forces, which gives a large number of manufacturers to develop input method power and opportunity.
This time only talk about touch screen mobile phone design Input method, and because of its p
Input method, the existence of a magical feature of our country.
In China, the mobile input method may be the most used by players. But any booming operating system, such as Symbian, Android, iOS and other platforms, can install a third-party input method. Because of the original Chinese input of various forces, which gives a large number of manufacturers to develop input method power and opportunity.
This time only talk about touch screen mobile phone design Input method, and because of its p
Article Description: Mobile Input Method: keyboard layout that little thing.
Input method, the existence of a magical feature of our country.
In China, the mobile input method may be the most used by players. But any booming operating system, such as Symbian, Android, iOS and other platforms, can install a third-party input method. Because of the original Chinese input of various forces, which gives a large number of manufacturers
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.