#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. 使用Golang+Mongodb打造你的第一个站点

    很多人推荐MEAN来开发站点.MEAN就是M:mongodb,E:expressjs.A:angular最后的N:nodejs. 但是如果你亲身的体会到了js的嵌套回调的话你就会想换换别的办法了.虽然 ...

  2. pyppeteer使用笔记

    pyppeteer -- python版本的puppeteer,一个强大的chronium headless浏览器API 最近搞天猫用了一波儿,记录一下. 先上文档: https://miyakogi ...

  3. _ZNote_Qt_对话框_模态非模态

    QDialog(及其子类,以及所有Qt::Dialog类型的类)的对于其 parent 指针都有额外的解释:如果 parent 为 NULL,则该对话框会作为一个顶层窗口,否则则作为其父组件的子对话框 ...

  4. java基础-day6

    第06天 java基础语法 今日内容介绍 u Eclipse断点调试 u 基础语法的练习 第1章   Eclipse断点调试 1.1      Eclipse断点调试概述 Eclipse的断点调试可以 ...

  5. 微信小程序-bindtap事件与冒泡

    bindtap就是点击事件 在.wxml文件绑定: <text id='textId' data-userXxx='100' bindtap='tapMessage'>cilck here ...

  6. CentOS7安装BugFree

    1. 安装apache yum install httpd 2. 安装mysql yum install mysql yum install mysql-server 注意: 1)已安装mysql的跳 ...

  7. 常见CEPH操作命令

    1. rbd ls 查看ceph默认资源池rbd里面的镜像2. rbd info xxx.img 查看xxx.img的具体的具体信息3. rbd rm xxx.img 删除xxx.img4. rbd ...

  8. FastReport调整字体

  9. 如何获取帮助———— QQ群讨论摘要

    QQ群对话整理(删除一些简单的回应),对一些重要的地方,我做了一些加粗   宝玉 2015/9/21 1:49:05       这次题目还有个问题就是如何读取Excel,我想对于很多同学来说是个困难 ...

  10. gcc 6.0编译opencv出错

    在编译opencv3.2时候,出现下面错误: cmake -DCMAKE_BUILD_TYPE=RELEASE -DCMAKE_INSTALL_PREFIX=/usr/local -DBUILD_NE ...