HDU-1113(map的运用)】的更多相关文章

http://acm.hdu.edu.cn/showproblem.php?pid=1113 Problem Description In millions of newspapers across the United States there is a word game called Jumble. The object of this game is to solve a riddle, but in order to find the letters that appear in th…
Problem Description In millions of newspapers across the United States there is a word game called Jumble. The object of this game is to solve a riddle, but in order to find the letters that appear in the answer it is necessary to unscramble four wor…
原题链接:http://acm.hdu.edu.cn/showproblem.php?pid=1113 字符串简单题: stl水过 如下: #include<algorithm> #include<iostream> #include<cstdlib> #include<cstring> #include<cstdio> #include<string> #include<map> #include<set>…
http://acm.hdu.edu.cn/showproblem.php?pid=1113 给定一个字典,然后每次输入一个字符串问字典中是否有单词与给定的字符串的所有字母一样(顺序可以打乱),按字典序输出字典中的原字符串. 我开始是直接用了 sort, 用一个结构体记录了所有字符串,和相应下标,输出的时候在用了冒泡排序. #include <iostream> #include <cstdio> #include <cmath> #include <vector…
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=1113 题意:输入一个字典,然后再输入若干单词(每行中,1 <= 单词数 <= 100,并且每个单词在字典中保证是唯一的),用XXXXXX结尾来表示字典的结束.接着输入一个单词word(1 <= 字母个数 <= 6),每个单词你都需要在字典中找出所有可以用word的字母重排后得到的单词,并按照字典序从小到大的顺序在一行中输出:如果不存在,则输出“NOT A VALID WORD”.注意:…
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…
http://acm.hdu.edu.cn/showproblem.php?pid=1247 Hat’s Words Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 7760    Accepted Submission(s): 2814 Problem Description A hat’s word is a word in the…
http://acm.hdu.edu.cn/showproblem.php?pid=4941 给定N,M和K,表示在一个N*M的棋盘上有K个棋子,给出K个棋子的位置和值,然后是Q次操作,对应的是: 1 a b :交换a和b两行 2 a b : 交换a和b两列 3 a b :查询a b这个位置上棋子的值,没有棋子的话输出0 不能直接模拟,对应行列交换,只需交换map映射值,查询时输出map[x],map[y]上值即可 #include <cstdio> #include <cstdlib&…
HDU Today Time Limit: 15000/5000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 6147    Accepted Submission(s): 1485 Problem Description 经过锦囊相助,海东集团最终度过了危机,从此,HDU的发展就一直顺风顺水,到了2050年,集团已经相当规模了,据说进入了钱江肉丝经济开发区500强.这时候.…
题意:给出一个数n,问n能否是斐波那契数列中数的乘积 先刷选 斐波那契数列,然后就枚举 #include <cstdio> #include <cstring> #include <queue> #include <map> #include <iostream> using namespace std; typedef long long LL; ; LL num[]; map<LL, bool> m; void init() {…