#include<iostream>
#include<string>
#include<algorithm>
#include<cstdio>
#include<stack>
#include<vector>
#include<queue>
#include<map>
using namespace std;
vector<string> dict;
multimap<string,string> d;
int main()
{
#ifndef ONLINE_JUDGE
freopen("a.in","r",stdin);
#endif
string word;
while(cin>>word,word!="XXXXXX")
dict.push_back(word);
sort(dict.begin(),dict.end());
for(vector<string>::iterator it=dict.begin();it!=dict.end();++it){
string val(*it);
sort((*it).begin(),(*it).end());
d.insert(make_pair(*it,val));
}
while(cin>>word,word!="XXXXXX"){
sort(word.begin(),word.end());
if(d.lower_bound(word)==d.upper_bound(word)){ puts("NOT A VALID WORD"); puts("******"); continue; }
for(multimap<string,string>::iterator it=d.lower_bound(word);it!=d.upper_bound(word);++it)
cout<<it->second<<endl;
cout<<"******"<<endl;
}
return 0;
}
相关推荐
TLV320AIC3204音频CODEC硬件设计与调试实战
本文深入解析了TLV320AIC3204音频CODEC的硬件设计与调试实战。文章从芯片功能定位入手,详细阐述了电源时钟设计、模拟输入电路等关键硬件设计要点,并提供了软件驱动配置与分层调试方法,帮助工程师有效规避常见陷阱,解决底噪、失真等典型音频调试问题。
POJ 1318 && HDU 1113 Word Amalgamation(水~)
Description 先给定n个字符串形成一个字典库,然后再给你任意一个字符串,问你这个字符串经过字符随意组合能形成多少个字典库里面匹配的字符串 Input 先输入字典库,以XXXXXX结束字典输入,然后给出多个查询字符串,同样以XXXXXX结束输入 Output 对于每个查询字符串,输出字典中能由其自由组合形成的所有字符串,若不存在则输出NOT A VALID WORD Sampl
newman的使用
Newman是一个基于Node.js的postman命令行工具,用于运行和测试PostmanAPI 请求的集合。它允许用户在命令行环境中执行Postman的JSON文件,从而实现接口自动化测试和持续集成,同时支持用户进行自动化测试、批量执行请求、生成报告等操作。
HDU1113 POJ1318 UVA642 ZOJ1181 UVALive5328 Word Amalgamation【MAP+排序+水题】
Word Amalgamation Time Limit: 1000MS Memory Limit: 10000K Total Submissions: 9395 Accepted: 4498 Description In millions of newspapers across the United States there
Cadence 设计实践笔记-小哥allegro 2层板笔记
规范建立文件夹本章节主要跟着B站PCB入门首选视频-小哥Cadence Allegro 2层板视频,结合自己的实践一步步完成一个完整的PCB板的设计。规范建立文件夹建立八个文件夹我使用的Cadence 17.4 有些差异原理图绘制原图绘制首先要熟悉原理图工作原理工作原理下面是这个项目的原理图重点关注电源新建原理图库打开Cadence 软件创建项目新建工程 File ==========》Project我这里选择了Enable PSPice 试试能不能仿真,新建项目如下。
基于综合阻抗特征的配电架空线路单相断线故障区段定位研究
本文提出了一种基于综合阻抗特征的配电架空线路单相断线故障区段定位方法。通过分析故障后正序、负序阻抗变化,构造综合阻抗判据实现精准定位。仿真结果表明:该方法能有效识别故障区段,差异度判据显著(故障区段达0.508,非故障区段<0.016);对过渡电阻(1-200Ω)和负荷变化具有强鲁棒性,定位准确率不受影响。相比传统方法,综合阻抗法放大了断线故障特征,解决了弱故障信号检测难题,为配电网安全运行提供了可靠的技术手段。
HDU1113 POJ1318 UVA642 ZOJ1181 UVALive5328 Word Amalgamation【MAP+排序】
Word Amalgamation Time Limit:1000MS Memory Limit:10000K Total Submissions:9395 Accepted:4498 Description In millions of newspapers across the United States there ...
Python爬虫实战:用最新技术高效下载摄影网站图片
本文将深入探讨如何利用Python最新技术栈构建一个功能完整的摄影网站图片爬虫。我们将使用异步编程、智能反爬策略和现代化工具,实现高效、可靠的图片下载系统。高性能异步架构:使用asyncio实现高并发下载智能反爬策略:支持多种反爬措施和浏览器模拟多网站适配:可解析多种摄影网站结构数据管理:完整的下载记录和统计功能扩展性强:支持代理、分布式等高级功能用户友好:提供进度显示和详细日志。
HDU 1016
#include #include int n,ans[21],isprime[]={0,0,1,1,0,1,0,1,0,0,0,1,0,1,0,0,0,1,0,1,0,0,0,1,0,0,0,0,0,1,0,1,0,0,0,0,0,1,0,0,0},vis[21]; void dfs(int step) { int i; if(step==n+1) { i
g2o&PCL 四阶多项式拟合
g2o&PCL 四阶多项式拟合
计算机毕设:线性回归 Xgboost LSTM 预测黄金价格实战 完整代码数据视频讲解 可直接运行
线性回归 Xgboost LSTM 预测黄金价格实战 完整代码数据视频讲解 可直接运行
HDU 1035
#include #include int main() { int n,m,k,i,j,vis[20][20],flag,step,step1; char s[20][20]; while(scanf("%d%d%d",&n,&m,&k)&&!(n==0&&m==0&&k==0)) { getchar(); step=0;
科研神器: 用Gemini 3
Edge藏了个科研开挂神器!免TZ/免谷歌账号用Gemini 3,1分钟上手(附保姆级教程) 做科研查文献、理数据总卡壳?想蹭Gemini 3的AI能力,却被“谷歌账号+TZ+节点筛选”三连劝退? 现在不用折腾了!Edge浏览器里装个插件,直接把Gemini 3揣进口袋——**免翻墙、免谷歌账号、国内直接用**,分分钟让你的科研效率翻三倍,导师都得问你“偷偷开了啥挂”!
HDU 3033 I love sneakers!
分组背包变形 #include #include #include int dp[15][10010]; int main() { int n,m,i,j,k,p,q,o,cnt[15],v[15][110],w[15][110]; while(scanf("%d%d%d",&n,&m,&k)!=EOF) { memset(cnt,0,sizeof(cnt)); for(i=0
android 蓝牙通讯demo
android 下蓝牙通讯demo,实现了发现蓝牙,使能蓝牙,通过蓝牙发送消息。
efm32 入门.pdf
本PDF共计22页,介绍的是操作驱动API,下载与否自己斟酌。
HDU 1015
#include #include int sum,len,step,vis[30],flag,tar; char s[30],ans[30],anss[30]; void dfs() { int i,j,t; if(step<5) { for(i=0;i<len;i++) if(!vis[i]) {
IDEA的使用指南
IDEA基于java的使用手册,可以最快速的上手,在使用中不断的丰富自己的使用技巧.
HDU 1025 Constructing Roads In JGShining's Kingdom
最长上升子序列 /* 以下内容摘自http://blog.youkuaiyun.com/ice_crazy/article/details/7536332 假设存在一个序列d[1..9] = 2 1 5 3 6 4 8 9 7,可以看出来它的LIS长度为5。 下面一步一步试着找出它。 我们定义一个序列B,然后令 i = 1 to 9 逐个考察这个序列。 此外,我们用一个变量Len来记录现在最长算到
ssm框架搭建
这个是一个在idea上成功跑起来的ssm框架项目,保存在这里方便以后使用直接下载
HDU 1173 采矿
设答案为x,y 则距离的运算公式为|x-x1|+|x-x2|+...+|x-xn|+|y-y1|+|y-y2|+...+|y-yn| 因此当x,y均为中位数时上式最小 用cin耗时2687ms 用scanf耗时453ms #include #include #include #include #include #include using namespace std; const i
HDU 1100
输入数据31117532写成31117531,导致我调了2小时,你妹。。 思想是化整为零。。。 #include #include #include #include #include #include #include using namespace std; const int maxN=19; int cat[maxN],sum[maxN+1]; void build(int d,
HDU 1253 胜利大逃亡
#include #include #include #include #include using namespace std; const int inf=1<<30; struct p { int x,y,z; }; int a,b,c,T,dx[]={-1,1,0,0,0,0},dy[]={0,0,-1,1,0,0},dz[]={0,0,0,0,-1,1},vis[55][55][55]
HDU 1732 Push Box
bfs暴搜,重点在于记录状态与判重 #include #include #include #include #include #include #include using namespace std; struct Point{ int x[4],y[4],step; Point(int *a,int *b,int n){ step=n; f
HDU 1047
#include #include int main() { int t,i,j,len,a[11000],b[11000],min,c,temp,sum; char s[10000]; scanf("%d",&t); while(t--) { memset(a,0,sizeof(a)); while(scanf("%s",s
HDU 1174 爆头
纯数学题,算出空间一点到一空间直线的距离 由题目描述可写出直线的点向式方程(x-x2)/a=(y-y2)/b=(z-z2)/c=tt 然后算出于与该直线垂直的该点所在平面,(a,b,c)为该平面的法向量,因此可得a*(x-x1)+b*(y-y1)+c*(z-z1)=0 算出空间直线与平面相交的点a*(a*tt+x2-x1)+b*(b*tt+y2-y1)+c*(c*tt+z2-z1)=0 该
HDU 1403 Longest Common Substring
好久没学新算法了,从现在开始努力吧。 花了3天时间看了后缀数组的论文,差不多看明白了,贴上一份应用的代码吧。 #include #include #include #include #include #include #include #include #include #include #include #include #define MP make_pair #d
HDU 2821 Pusher
dfs #include #include #include #include #include #include #include #include #include #include #define ll long long #define MK make_pair #define PB push_back #define SZ(x) ((int
HDU 1534 Schedule Problem
差分约束+spfa+判断是否存在正环 #include #include #include #include #include #include #include #include const int maxn = 1000010; const int inf = 0xffffff; struct Edge{ int u,v,w; }e[maxn]; int d[maxn],nex
HDU 3577 Fast Arrangement
成段更新的线段树- -! #include #include #include #include #include #include #include using namespace std; #define maxn 1000010 #define l(i) ((i)<<1) #define r(i) ((i)<<1|1) struct node{ int left,
1133



被折叠的 条评论
为什么被折叠?



