#include<iostream>
#include<stdio.h>
#include<string>
#include<set>
using namespace std; int main()
{
//freopen("acm.acm","r",stdin);
set<char> coll[]; coll[].insert('B');
coll[].insert('F');
coll[].insert('P');
coll[].insert('V'); coll[].insert('C');
coll[].insert('G');
coll[].insert('J');
coll[].insert('K');
coll[].insert('Q');
coll[].insert('S');
coll[].insert('X');
coll[].insert('Z'); coll[].insert('D');
coll[].insert('T'); coll[].insert('L'); coll[].insert('M');
coll[].insert('N'); coll[].insert('R');
int i;
int j;
int tem;
string s;
//set<char>::iterator pos;
while(cin>>s)
{
tem = -;
for(i = ; i < s.length(); ++i)
{
for(j = ; j <= ; ++j)
{
if(coll[j].find(s[i]) != coll[j].end())
{
if(tem != j)
{
cout<<j;
tem = j;
}
break;
} }
if(j == )
tem = -;
}
cout<<endl;
} }

POJ 2608的更多相关文章

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

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

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

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

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

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

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

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

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

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

  6. POJ 2739. Sum of Consecutive Prime Numbers

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

  7. POJ 2255. Tree Recovery

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

  8. 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 ...

  9. poj 2352 Stars 数星星 详解

    题目: poj 2352 Stars 数星星 题意:已知n个星星的坐标.每个星星都有一个等级,数值等于坐标系内纵坐标和横坐标皆不大于它的星星的个数.星星的坐标按照纵坐标从小到大的顺序给出,纵坐标相同时 ...

随机推荐

  1. SimpleDateFormat转换时间,12,24时间格式[转]

    SimpleDateFormat转换时间,12,24时间格式 来自:http://blog.csdn.net/dongguang1082/article/details/4387165 在使用Simp ...

  2. 牛客训练:小a与黄金街道(欧拉函数+快速幂)

    题目链接:传送门 思路:欧拉函数的性质:前n个数的欧拉函数之和为φ(n)*n/2,由此求出结果. 参考文章:传送门 #include<iostream> #include<cmath ...

  3. 假期训练五(poj-1077bfs+康拓展开,hdu-2577dp)

    题目一:传送门 思路:主要是找到状态, 考虑字母有两种状态,大写和小写, 从小写变为大写的变化方式有两种:保持cap状态,或者按住shift键: 从小写变为大写也有一种变化方式:按住shift键: 看 ...

  4. java常用设计模式六:适配器模式

    一.定义 适配器模式把一个类的接口变换成客户端所期待的另一种接口,从而使原本因接口不匹配而无法在一起工作的两个类能够在一起工作.比如以下的场景: 用手机充电为例,有一个手机的插孔是TypeC口,现在只 ...

  5. Typecho 二次开发文档链接

    快速入门模板入门 模板制作快速入门推荐目录结构 Typecho模板的推荐页面构成模板文件说明 Typecho主题制作文件结构 页面制作制作functions文件: Typecho的functions. ...

  6. C和C++中的volatile、内存屏障和CPU缓存一致性协议MESI

    目录 1. 前言2 2. 结论2 3. volatile应用场景3 4. 内存屏障(Memory Barrier)4 5. setjmp和longjmp4 1) 结果1(非优化编译:g++ -g -o ...

  7. progress 进度条

      进度条.  属性名 类型 默认值 说明 percent Float 无 百分比0~100 show-info Boolean false 在进度条右侧显示百分比 stroke-width Numb ...

  8. 74(2B)Shortest Path (hdu 5636) (Floyd)

    Shortest Path Time Limit: 4000/2000 MS (Java/Others)    Memory Limit: 131072/131072 K (Java/Others)T ...

  9. Alpha阶段敏捷冲刺(二)

    1.提供当天站立式会议照片一张. 2.每个人的工作 (有work item 的ID),并将其记录在码云项目管理中: 昨天已完成的工作. 祁泽文:上网了解了艾宾浩斯遗忘曲线算法. 徐璐琳:找交互模块的源 ...

  10. POJ1064--Cable master(Binary Search)

    Description Inhabitants of the Wonderland have decided to hold a regional programming contest. The J ...