#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. BZOJ 2120 数颜色 (带修莫队)

    2120: 数颜色 Time Limit: 6 Sec  Memory Limit: 259 MBSubmit: 6367  Solved: 2537[Submit][Status][Discuss] ...

  2. leetcode - [1]Reverse Words in a String

    Question: Reverse Words in a String Given an input string, reverse the string word by word. For exam ...

  3. java基础-day15

    第01天 java面向对象 今日内容介绍 u 包和权限修饰符 u 内部类 第1章   包和权限修饰符 1.1      包的概述 java的包,其实就是我们电脑系统中的文件夹,包里存放的是类文件. 当 ...

  4. Hdu1151 Air Raid(最小覆盖路径)

    Air Raid Problem Description Consider a town where all the streets are one-way and each street leads ...

  5. poj 2192 Zipper

    题目 刚开始本来觉得可以用队列来写,但是 例如 ta te teta,ta的t先出队列那就不行了,所以还得用dp dp[i][j] 表示A前i个字符与B前j个字符是否能构成C前i+j个字符 要使 dp ...

  6. Hive为什么要分桶

    对于每一个表(table)或者分区, Hive可以进一步组织成桶,也就是说桶是更为细粒度的数据范围划分.Hive也是针对某一列进行桶的组织.Hive采用对列值哈希,然后除以桶的个数求余的方式决定该条记 ...

  7. codeforces982A

    题意 给你个排列    10001 满足下列条件输出yes  否则输出no 1.不能有两个1相连 2.当点排列不能再加入1 全0判断一下 开头判断一下 结尾判断一下 #include <iost ...

  8. pm2

    使用PM2将Node.js的集群变得更加容易(http://www.cnblogs.com/jaxu/p/5193643.html) nodejs pm2配置使用教程(http://blog.csdn ...

  9. libgdx游戏中的中文字体工具类

    // ---------全局Font------------ static FreeTypeFontGenerator Generator; static BitmapFont Font; stati ...

  10. AngularJS 启动执行过程

    一.浏览器下载HTML/CSS/JavaScript等 当你转到一个页面地址后,浏览器先回下载这个HTML,同时,会开启一些辅助线程下载所关联的script标签和link标签里引用的文件. 二.浏览器 ...