#include<cstdio>
#include<cstring>
#include<cmath>
#include<string>
#include<vector>
#include<map>
#include<algorithm>
using namespace std; char s[+][+];
int n;
map<string ,int>m; int main()
{
while(~scanf("%d",&n)){
for(int i=;i<n;i++) scanf("%s",s[i]);
m.clear();
for(int i=;i<n;i++)
{
int len=strlen(s[i]);
for(int j=;j<len;j++)
{
if(s[i][j]>='A'&&s[i][j]<='Z') s[i][j]=s[i][j]-'A'+'a';
}
} // for(int i=0;i<n;i++) printf("%s\n",s[i]);
int ans=;
for(int i=;i<n;i++)
{
for(int j=i+;j<n;j++)
{
if(strlen(s[i])==strlen(s[j]))
{
int len=strlen(s[i]);
int num=;
for(int k=;k<len;k++)
{
if(s[i][k]==s[j][k]) num++;
}
if(num>)
{
if(m[s[i]]==) ans++;
if(m[s[j]]==) ans++;
m[s[i]]=;
m[s[j]]=; }
}
}
}
printf("%d\n",ans);
}
return ;
}

计算机学院大学生程序设计竞赛(2015’12) 1001 The Country List的更多相关文章

  1. hdu 计算机学院大学生程序设计竞赛(2015’11)

    搬砖 Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65535/65535 K (Java/Others)Total Submissi ...

  2. 计算机学院大学生程序设计竞赛(2015’11)1005 ACM组队安排

    1005 ACM组队安排 Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others) Pro ...

  3. 计算机学院大学生程序设计竞赛(2015’12)Polygon

    Polygon Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others) Total Su ...

  4. 计算机学院大学生程序设计竞赛(2015’12)Study Words

    Study Words Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others) Tota ...

  5. 计算机学院大学生程序设计竞赛(2015’12)01 Matrix

    01 Matrix Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others) Total ...

  6. 计算机学院大学生程序设计竞赛(2015’12)The Country List

    The Country List Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others) ...

  7. 计算机学院大学生程序设计竞赛(2015’12) 1008 Study Words

    #include<cstdio> #include<cstring> #include<map> #include<string> #include&l ...

  8. 计算机学院大学生程序设计竞赛(2015’12) 1009 The Magic Tower

    #include<cmath> #include<cstdio> #include<cstring> #include<algorithm> using ...

  9. 计算机学院大学生程序设计竞赛(2015’12) 1006 01 Matrix

    #include<stdio.h> #include<string.h> #include<iostream> #include<algorithm> ...

随机推荐

  1. Linux设置静态IP【转】

    一只小码 2016-08-16 10:32 测试服务器OS: Centos 6.5 x64 本机OS: Ubuntu 14.04 x64 由于Virtualbox当时安装Centos 6.5的时候设置 ...

  2. 好用的API文档--在线版

    安卓在线api http://www.android-doc.com/reference/packages.html

  3. PHP错误异常处理详解【转载】

    异常处理(又称为错误处理)功能提供了处理程序运行时出现的错误或异常情况的方法. 异常处理通常是防止未知错误产生所采取的处理措施.异常处理的好处是你不用再绞尽脑汁去考虑各种错误,这为处理某一类错误提供了 ...

  4. SQL 查询时间段内的时间

    declare @dt1 as datetime declare @dt2 as datetime set @dt1 = '2008-01-01' set @dt2 = '2009-01-01' ;w ...

  5. git 提高下载速度

    1.  直接下载分支,就不用下载不需要的源码了. git clone --depth 1 git://github.com/TI-OpenLink/wl18xx.git  --branch ol_r8 ...

  6. Android BuildConfig.DEBUG的妙用

    在Android开发中,我们使用android.util.Log来打印日志,方便我们的开发调试.但是这些代码不想在发布后执行,我们并不想在软件发布后调试日志被其他开发者看到,现在我的方法是设置一个全局 ...

  7. MyBaits 错误分析

    错误原因:在DAO的映射文件中,在映射标签中的type类型写成DAO类了,应该写成javaBean

  8. Android中Canvas绘图基础详解(附源码下载) (转)

    Android中Canvas绘图基础详解(附源码下载) 原文链接  http://blog.csdn.net/iispring/article/details/49770651   AndroidCa ...

  9. combo扩展:禁止手工改变输入框的值

    <!DOCTYPE html> <html> <head> <meta http-equiv="Content-Type" content ...

  10. word2010无法打开文件时的一点对策

    word2010无法打开文件时的一点对策 1. Word 安全模式启动,点击「开始」,在搜索栏中输入winword /safe并回车,测试问题是否依然存在? 2. 正常启动Word,点击“文件”—“选 ...