#include<iostream>
#include<stdio.h>
#include<string>
#include<algorithm>
#define MAXN 50
using namespace std;
char ch1[MAXN];
char ch2[MAXN];
int dig1[MAXN];
int dig2[MAXN];
int main()
{
//freopen("acm.acm","r",stdin);
int num;
char c;
int i;
int j;
int ans;
int len[];
int time;
int place;
int begin;
cin>>num;
getchar();
for(time = ; time <= num; ++ time)
{
ans = ;
memset(dig1,-,sizeof(dig1));
memset(dig2,-,sizeof(dig2));
gets(ch1);
gets(ch2);
len[] = strlen(ch1);
len[] = strlen(ch2);
for(i = ; i < len[]; ++ i)
{
dig1[i] = ch1[i] - 'a';
}
for(i = ; i < len[]; ++ i)
{
dig2[i] = ch2[i] - 'a';
}
//sort(dig2,dig2+len[1]);
//sort(dig1,dig1+len[0]);
begin = ;
for(i = ;i < len[]; ++ i)
{
for(j = ; j < len[]; ++ j)
if(ch1[i] == ch2[j])
{
ch2[j] = '~';
++ ans;
break;
}
}
cout<<"Case #"<<time<<": "<<len[]+len[]-*ans<<endl;
ch1[] = '\0';
ch2[] = '\0';
}
}

POJ 2681的更多相关文章

  1. poj 2681 字符串

    http://poj.org/problem?id=2681 给你任意长度的字符串,找出两串字符中不相同的字符个数(总数) #include<string> #include<cst ...

  2. POJ 3370. Halloween treats 抽屉原理 / 鸽巢原理

    Halloween treats Time Limit: 2000MS   Memory Limit: 65536K Total Submissions: 7644   Accepted: 2798 ...

  3. POJ 2356. Find a multiple 抽屉原理 / 鸽巢原理

    Find a multiple Time Limit: 1000MS   Memory Limit: 65536K Total Submissions: 7192   Accepted: 3138   ...

  4. POJ 2965. The Pilots Brothers' refrigerator 枚举or爆搜or分治

    The Pilots Brothers' refrigerator Time Limit: 1000MS   Memory Limit: 65536K Total Submissions: 22286 ...

  5. POJ 1753. Flip Game 枚举or爆搜+位压缩,或者高斯消元法

    Flip Game Time Limit: 1000MS   Memory Limit: 65536K Total Submissions: 37427   Accepted: 16288 Descr ...

  6. POJ 3254. Corn Fields 状态压缩DP (入门级)

    Corn Fields Time Limit: 2000MS   Memory Limit: 65536K Total Submissions: 9806   Accepted: 5185 Descr ...

  7. POJ 2739. Sum of Consecutive Prime Numbers

    Sum of Consecutive Prime Numbers Time Limit: 1000MS   Memory Limit: 65536K Total Submissions: 20050 ...

  8. POJ 2255. Tree Recovery

    Tree Recovery Time Limit: 1000MS   Memory Limit: 65536K Total Submissions: 11939   Accepted: 7493 De ...

  9. POJ 2752 Seek the Name, Seek the Fame [kmp]

    Seek the Name, Seek the Fame Time Limit: 2000MS   Memory Limit: 65536K Total Submissions: 17898   Ac ...

随机推荐

  1. mongodb知识积累

    1: 安装mongodb https://www.cnblogs.com/zhangdaicong/p/7492494.html 2:配置文件 vi /etc/mongodb.conf https:/ ...

  2. myBatis中if test 字符串注意事项

    错误写法: <if test="userName == 'boshen'"> AND `USER_NAME` = #{userName} </if> 正确写 ...

  3. 第28章:MongoDB-索引--过期索引(TTL)

    ①过期索引(TTL) TTL索引是让文档的某个日期时间满足条件的时候自动删除文档,这是一种特殊的索引,这种索引不是为了提高查询速度的,TTL索引类似于缓存,缓存时间到了就过期了,就要被删除了 ②范例: ...

  4. Java8函数式接口/Lambda表达式/接口默认方法/接口静态方法/接口冲突方法重写/lambda表达式指定泛型类型等

    一:函数式接口 1.函数式接口的概念就是此接口必须有且只能有一个抽象方法,可以通过@FunctionalInterface来显示规定(类似@Override),但是没有此注解的但是只有一个抽象方法的接 ...

  5. php 安装扩展

    安装mysqli扩展 1.到php文件ext下的mysqli      cd /usr/local/php-7.1.5/ext/mysqli 2.在mysqli文件夹下执行 /usr/local/ph ...

  6. CentOS 利用Yum安装mysql后无法启动(MySQL Daemon failed to start.)

    安装mysql-server [root@iZwz9cl4i8oy1reej7o8pmZ ~]# yum install -y mysql-server 进入/etc执行mysql_install_d ...

  7. springMVC注解(一)Controller

    HelloWorld程序 Step1  编写web.xml文件 <?xml version="1.0" encoding="UTF-8"?> < ...

  8. noip第3课资料

  9. Hdu2068 RPG的错排 2017-06-27 15:27 30人阅读 评论(0) 收藏

    RPG的错排 Time Limit : 1000/1000ms (Java/Other)   Memory Limit : 32768/32768K (Java/Other) Total Submis ...

  10. hdu 4983 线段树+斐波那契数

    http://acm.hdu.edu.cn/showproblem.php?pid=4893 三种操作: 1 k d, 修改k的为值增加d 2 l r, 查询l到r的区间和 3 l r, 从l到r区间 ...