#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. 07-09 07:28:38.350: E/AndroidRuntime(1437): Caused by: java.lang.ClassNotFoundException: Didn't find class "com.example.googleplay.ui.activity.MainActivity" on path: DexPathList[[zip file "/data/app/c

    一运行,加载mainActivity就报错 布局文件乱写一通,然后急着运行,报莫名其妙的错误: 07-09 07:28:38.350: E/AndroidRuntime(1437): Caused b ...

  2. linux c中select使用技巧

    1.select函数作为定时器使用    it_value.tv_sec = 0;    it_value.tv_usec = 100000:    select(1,NULL,NULL,NULL,& ...

  3. 使用oracle数据库开发,异常总结

    最近两天使用的oracle数据库开发项目时遇到了2个异常,第一个是执行sql语句时报异常:“ORA-00911: 无效字符”,如下图: sql语句如下: 断点调试,把sql语句拷贝到pl/sql里执行 ...

  4. mouse的各种事件

    IE测试对象为IE9,不全 mousemove(元素内部移动) 鼠标在元素内部移动时触发,只要鼠标移动,即使只是又移动了一个像素,也会触发,这就意味着短时间内会触发多次事件 支持情况: js onmo ...

  5. Anton and School

    Anton and School time limit per test 2 seconds memory limit per test 256 megabytes input standard in ...

  6. UVALive - 3942 Remember the Word

    input 字符串s  1<=len(s)<=300000 n 1<=n<=4000 word1 word2 ... wordn 1<=len(wordi)<=10 ...

  7. UIActivityIndicatorView的详细使用(加载菊花)

    UIActivityIndicatorView实例提供轻型视图,这些视图显示一个标准的旋转进度轮.当使用这些视图时,最重要的一个关键词是小.20×20像素是大多数指示器样式获得最清楚显示效果的大小.只 ...

  8. 《CSS设计指南》阅读笔记

    一.HTML实体 HTML实体常用于生成那些键盘上没有的印刷字符.以一个和号(&)开头,一个分号(:)结尾,二者之间是表示实体的字符串. 如:“左引号(")     ”右引号(&qu ...

  9. PAT (天梯)L2-004. 这是二叉搜索树吗?

    L2-004. 这是二叉搜索树吗? 时间限制 400 ms 内存限制 65536 kB 代码长度限制 8000 B 判题程序 Standard 作者 陈越 一棵二叉搜索树可被递归地定义为具有下列性质的 ...

  10. 学习笔记——适配器模式Adapter

    适配器模式适用于将不一致的接口转换为一致的接口. 比如,去香港玩儿,带上了自己的笔记本电脑,结果晚上插电时就抓瞎了,电源插孔与插座不一致.WTF…… 插座是酒店装好的,不可能拆了换一个,电源是自己的, ...