This topic let me understand a little map container, so this question is still my view of the problem, the less I see the better ....Map is the map, well, it's easy to use, there is the get () will read newline characters ... GetChar () can also, but scanf () theseFormatted to not be able to attend ... Will exist inside the bufferCode:#include Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced. UVA 10282
Title Address: POJ 2503Test instructions: Enter a dictionary, the dictionary format for "English foreign Language" one by one mapping relationship and then enter several foreign language words, output their English translation words, if the dictionary does not exist in the word, then output "eh".Idea: Use map to access foreign language and English mapping relationship, and then look good. Note the input format.#include #include #include #include #include #include #include #include #include #incl
again ). Then some local words are given, and you need to output the corresponding English words.
Analysis and Summary:English words and local words are simple mappings. When the number of questions reaches 100,000, hash is used to create a ing or directly sort the questions and then perform binary search. Even if the problem can be barely passed, the speed should be unsatisfactory.Therefore, the best way to do this is to use a hash table to establish a ing relationship.The speed is good. I ran
POJ2503: Babelfish (Binary)
DescriptionYou have just moved from Waterloo to a big city. The people here speak an incomprehensible dialect of a foreign language. Fortunately, you have a dictionary to help you understand them.
InputInput consists of up to 100,000 dictionary entries, followed by a blank line, followed by a message of up to 100,000 words. each dictionary entry is a line containing an English word, followed by a space and a foreign languag
The main idea is to give two words, the previous word is the translation of the next word, that is, there is a key to the value of the mapping relationship, to enter the empty behavior sign end input correspondence, and then input the word output corresponding translation. So this problem can be solved by using the map container of C + + to establish correspondence relation.The code is as follows:1#include 2#include 3#include 4#include 5 using namespacestd;6 intMain () {7 Charstr1[ *] ;8
Babelfish
Time limit:3000MS Memory Limit:65536KB 64bit IO Format:%i64d %i64 U
Submit
Status
Practice
POJ 2503
DescriptionYou are just moved from Waterloo to a big city. The people speak an incomprehensible dialect of a foreign language. Fortunately, you had a dictionary to help you understand them.
InputInput consists of 100,000 dictionary entries, followed by a blank line, followed by a message of up to 100,000 words . Each dictiona
Babelfish
Time Limit: 3000MS
Memory Limit: 65536K
Total Submissions: 35828
Accepted: 15320
DescriptionYou are just moved from Waterloo to a big city. The people speak an incomprehensible dialect of a foreign language. Fortunately, you had a dictionary to help you understand them.InputInput consists of 100,000 dictionary entries, followed by a blank line, followed by a message of up to 100
Babelfish
Time Limit: 3000MS
Memory Limit: 65536K
Total Submissions: 35009
Accepted: 14979
DescriptionYou are just moved from Waterloo to a big city. The people speak an incomprehensible dialect of a foreign language. Fortunately, you had a dictionary to help you understand them.InputInput consists of 100,000 dictionary entries, followed by a blank line, followed by a message of up to 100
1. Link:
Http://poj.org/problem? Id = 2503
Http://bailian.openjudge.cn/practice/2503/
2. content:
Babelfish
Time limit:3000 Ms
Memory limit:65536 K
Total submissions:32783
Accepted:14093
DescriptionYou have just moved from Waterloo to a big city. The people here speak an incomprehensible dialect of a foreign language. Fortunately, you have a dictionary to help you understand them.
InputInput con
Babelfish
Time limit:3000 Ms
Memory limit:65536 K
Total submissions:32988
Accepted:14189
DescriptionYou have just moved from Waterloo to a big city. The people here speak an incomprehensible dialect of a foreign language. Fortunately, you have a dictionary to help you understand them.
InputInput consists of up to 100,000 dictionary entries, followed by a blank line, followed by a message of up to 100,000 words. ea
Poj-2503-Babelfish-dictionary tree
// Make several trie statements to draw a conclusion that, when the word length exceeds 15, it is suitable for hash, and no more than 15 times, it is suitable for trie ,,,, // because the constants of trie are mainly multiplied by the cycle of the word length, and the constants of hash in this cycle are basically 1 ,,, however, in addition to hash, conflicts need to be processed. The longer the word, the less likel
ProblemGiven a dictionary, ask again.There is a blank line between the dictionary and the query.Cin.peek () is a pointer to the current character.#include Tips for handling empty lines#include "POJ 2503" Babelfish (String)
BabelfishTime limit:3000ms Memory limit:65536kTotal submissions:34278 accepted:14706DescriptionYou are just moved from Waterloo to a big city. The people speak an incomprehensible dialect of a foreign language. Fortunately, you had a dictionary to help you understand them.InputInput consists of 100,000 dictionary entries, followed by a blank line, followed by a message of up to 100,000 words . Each dictionary entry are a line containing an 中文版 word, followed by a space and a foreign language wor
The title means: give you a few strings to STR1,STR2. After the input is complete, there is a blank line, then the input of the query, a string per line, if the string is the same as STR2, the output is str1, otherwise the output "eh".The string pair reached 100000, the query reached 100,000, so the normal method must time out. So we need to build a dictionary tree.There is one more trouble with this question is the input. How to control the query input after that empty line is the key.Simple ap
Address: babelfish
Question:
You are about to migrate to a big city, but you have different languages. Fortunately, you have a dictionary that can be used to translate foreign languages. Each line starts with dictionary words and then foreign languages. After the dictionary is complete, give you a few foreign languages to output the dictionary words. Otherwise, output "eh ".
Solution:
Map uses the word MP in each row as an integer. This integer can
POJ 2503 Babelfish (Trie tree or map), pojtrieBabelfishTime Limit: 3000 MS Memory Limit: 65536 KTotal Submissions: 34278 Accepted: 14706
DescriptionYou have just moved from Waterloo to a big city. The people here speak an incomprehensible dialect of a foreign language. Fortunately, you have a dictionary to help you understand them.
InputInput consists of up to 100,000 dictionary entries, followed by a blank line, followed by a message of up to 100,
[1441] babelfish
Time Limit: 1000 MS memory limit: 65535 K
Problem description
You have just moved from Waterloo to a big city. The people here speak an incomprehensible dialect of a foreign language. Fortunately, you have a dictionary to help you understand them.
Input
Input consists of up to 100,000 dictionary entries, followed by a blank line, followed by a message of up to 100,000 words. each dictionary entry is a line containing an English w
input
catehloops
Question:
When you get to a strange place, the words in this place are different from those in English. Each English word corresponds to this local word (all of which are one-to-one and will not appear again ). Then some local words are given, and you need to output the corresponding English words.
Analysis and Summary:
English words and local words are simple mappings. When the number of questions reaches 100,000, hash is used to create a ing or directly sort the questions
Information Detection:
Target Site: http://www.sixxf.itServer IP Address: 192.232.2xx.97 (USA)Environment platform: PHPServer System: ApacheThis time, I used a webpage to detect that the information on this site is not complete. Go to the topic,
Wine data comes from the UCI database and records the chemical composition of wine 13 of different varieties in the same region of Italy, so as to achieve automatic wine Classification through scientific methods. The data of this classification has
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.