链接

分析:找出每一个字母对应的数字,然后看字典里面那个与其匹配

 /*
ID: ****
PROG: namenum
LANG: C++
*/
#include<iostream>
#include<fstream>
#include<string.h> using namespace std; const char alpha[]={'','','','','','','','','','','','', '','','','','','','','','','','','','',''};
string data,tmp,words;
bool flag=false; int main(){
ifstream fin("namenum.in");
ofstream fout("namenum.out");
fin>>data;
ifstream tin("dict.txt");
while (tin>>words){
int l=words.size();
tmp="";
for (int i=;i<l;i++) tmp+=alpha[words[i]-];
if (tmp==data) {fout<<words<<endl;flag=true;}
}
if (!flag) fout<<"NONE"<<endl;
return ;
}  

Name That Number的更多相关文章

  1. JavaScript Math和Number对象

    目录 1. Math 对象:数学对象,提供对数据的数学计算.如:获取绝对值.向上取整等.无构造函数,无法被初始化,只提供静态属性和方法. 2. Number 对象 :Js中提供数字的对象.包含整数.浮 ...

  2. Harmonic Number(调和级数+欧拉常数)

    题意:求f(n)=1/1+1/2+1/3+1/4-1/n   (1 ≤ n ≤ 108).,精确到10-8    (原题在文末) 知识点:      调和级数(即f(n))至今没有一个完全正确的公式, ...

  3. Java 特定规则排序-LeetCode 179 Largest Number

    Given a list of non negative integers, arrange them such that they form the largest number. For exam ...

  4. Eclipse "Unable to install breakpoint due to missing line number attributes..."

    Eclipse 无法找到 该 断点,原因是编译时,字节码改变了,导致eclipse无法读取对应的行了 1.ANT编译的class Eclipse不认,因为eclipse也会编译class.怎么让它们统 ...

  5. 移除HTML5 input在type="number"时的上下小箭头

    /*移除HTML5 input在type="number"时的上下小箭头*/ input::-webkit-outer-spin-button, input::-webkit-in ...

  6. iOS---The maximum number of apps for free development profiles has been reached.

    真机调试免费App ID出现的问题The maximum number of apps for free development profiles has been reached.免费应用程序调试最 ...

  7. 有理数的稠密性(The rational points are dense on the number axis.)

    每一个实数都能用有理数去逼近到任意精确的程度,这就是有理数的稠密性.The rational points are dense on the number axis.

  8. [LeetCode] Minimum Number of Arrows to Burst Balloons 最少数量的箭引爆气球

    There are a number of spherical balloons spread in two-dimensional space. For each balloon, provided ...

  9. [LeetCode] Number of Boomerangs 回旋镖的数量

    Given n points in the plane that are all pairwise distinct, a "boomerang" is a tuple of po ...

  10. [LeetCode] Number of Segments in a String 字符串中的分段数量

    Count the number of segments in a string, where a segment is defined to be a contiguous sequence of ...

随机推荐

  1. qq空间微博等更多社交平台分享

    <!DOCTYPE html><html> <head> <meta charset="UTF-8"> <title>& ...

  2. 管理weblogic服务的启动和停止

    2012-11-10 12:58 26036人阅读 评论(4) 收藏 举报 分类: WebLogic(10) 版权声明:本文为博主原创文章,未经博主允许不得转载. 目录(?)[+] 介绍 Weblog ...

  3. 取汉子拼音首字母的C#方法

    /// <summary> /// 获得一个字符串的汉语拼音码 /// </summary> /// <param name="strText"> ...

  4. python requests接收chunked编码问题-python源码修改

    python requests接收chunked编码问题-python源码修改 学习了:https://blog.csdn.net/wangzuxi/article/details/40377467

  5. CentOS7 docker.repo 用阿里云Docker Yum源

    yum安装软件的时候经常出现找不到镜像的情况 https://download.docker.com/linux/centos/7/x86_64/stable/repodata/repomd.xml: ...

  6. VC++_错误 无法打开包括文件“glglut.h” No such file or directory 怎么办

    在网上看到类似的问题,查找资料找到了解决方案,现整理如下,有些更改,好让自己多些印象,附原文网址:http://blog.csdn.net/bigloomy/article/details/62265 ...

  7. 网络编程中的常见陷阱之 0x十六进制数(C++字面值常量)

    十六进制数相等的推断 请问例如以下程序的输出是神马? #include <iostream> #include <string> using namespace std; in ...

  8. JQuery插件ajaxFileUpload 异步上传文件

    一.先对ajaxFileUpload插件的语法参数进行讲解 原理:ajaxfileupload是通过监听iframe的onload方法来实现, 当从服务端处理完成后,就触发iframe的onload事 ...

  9. numpy - 数组索引

    numpy 数组索引 一.单个元素索引 一维数组索引 >>> x = np.arange(10) >>> x[2] 2 >>> x[-2] 8 二 ...

  10. java语句顺序有时非常重要

    我们学习java时,通常被告知,变量定义的顺序不重要,可是下面程序确在jdk 1.7上执行出错. public class FactoryImpl implements Serializable { ...