hdu 1075 What Are You Talking About(map)】的更多相关文章

What Are You Talking About Time Limit: 10000/5000 MS (Java/Others)    Memory Limit: 102400/204800 K (Java/Others) Total Submission(s): 16042    Accepted Submission(s): 5198 Problem Description Ignatius is so lucky that he met a Martian yesterday. But…
What Are You Talking About Time Limit: 10000/5000 MS (Java/Others)    Memory Limit: 102400/204800 K (Java/Others) Total Submission(s): 20680    Accepted Submission(s): 6852 Problem Description Ignatius is so lucky that he met a Martian yesterday. But…
http://acm.hdu.edu.cn/showproblem.php?pid=1075 What Are You Talking About Time Limit: 10000/5000 MS (Java/Others)    Memory Limit: 102400/204800 K (Java/Others)Total Submission(s): 13618    Accepted Submission(s): 4366 Problem Description Ignatius is…
Problem Description Ignatius is so lucky that he met a Martian yesterday. But he didn't know the language the Martians use. The Martian gives him a history book of Mars and a dictionary when it leaves. Now Ignatius want to translate the history book…
What Are You Talking About Time Limit: 10000/5000 MS (Java/Others)    Memory Limit: 102400/204800 K (Java/Others) Total Submission(s): 28482    Accepted Submission(s): 9710 Problem Description Ignatius is so lucky that he met a Martian yesterday. But…
Sample InputSTARTfrom fiwohello difhmars riwosfearth fnnvklike fiiwjENDSTARTdifh, i'm fiwo riwosf.i fiiwj fnnvk!END Sample Outputhello, i'm from mars.i like earth! 给你字符串以及它的映射,提问任意一个映射它真实的字符串是什么 #include<stdio.h> #include<algorithm> #include&l…
题意:单词翻译 思路:map #include<iostream> #include<stdio.h> #include<string.h> #include<map> using namespace std; map<string,string>mp; int main(){ string s1,s2; char c; cin>>s1; while(cin>>s1){ if(s1=="END")bre…
首先说字符串的截取套路吧 用坐标一个一个的输入 用遍历的方式逐个去检查字符串中的字符是否为符合的情况 如果是的话 把该字符放入截取string 中 让后坐标前移 如果不是的话 截取结束 坐标初始化 然后是map的使用 头文件为 <map> 定义的话 map<类型,类型> 变量名 对于map中值的传入的话 直接用数组的形式就好 这里由于有搜索 所以还要用到find函数   如果找不到的话 find返回值为end() 再就是string 类型变量的使用要注意 string类型的变量在下…
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=1075 题意:比较简单,易懂,这里不做说明. 解法:第一种方法:用map映射,耗时1000+ms:第二种方法:用字典树处理,500+ms. #include<iostream> #include<cstdio> #include<cstring> #include<cstdlib> #include<cmath> #include<algorit…
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=1075 map简单应用 代码: #include <stdio.h> #include <string.h> #include <math.h> #include <algorithm> #include <iostream> #include <ctype.h> #include <iomanip> #include <…