#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. vue +bootstrap 写的小例子

    最近vue挺火,最近也不是特别忙,就学习了下. vue和angular非常像都是MVVM.道理都是想通的,就是语法的差异 我觉得vue和angular区别: 1.vue更轻,更便捷,适用于移动开发 2 ...

  2. CPU load高而使用率低的问题分析

    最近服务器上出现了一个很诡异的问题,症状如下图所示: 查看进程发现: 如上图所示,非常多的df -h进程没有退出.于是手工kill掉这些 df -h进程.cpu load恢复正常. 至于为什么会有这么 ...

  3. c++ cout、<< 、cin、>> 、endl 详解

    std::cout是在#include<iostream>库中的ostream类型中的对象 std::表示命名空间,标准库定义的所有名字都在命名空间std中 std::cout是在#inc ...

  4. noip第3课作业

    1.    求最大值 [问题描述] 输入三个数a,b,c,输出三个整数中的最大值 [样例输入] 10 20 30 [样例输出] 30 #include <iostream> using n ...

  5. protobuf和protostuff的区别

    在我们的开发过程中,序列化是经常需要处理的问题,比如在做分布式访问数据时,或者是在做redis缓存存储数据时,如果我们涉及的知识面不够广的话,可能会简单的使用JDK的序列化,也即在需要序列化的类上im ...

  6. Codeforces812A Sagheer and Crossroads 2017-06-02 20:41 139人阅读 评论(0) 收藏

    A. Sagheer and Crossroads time limit per test 1 second memory limit per test 256 megabytes input sta ...

  7. codeforces891a

    A. Pride time limit per test 2 seconds memory limit per test 256 megabytes input standard input outp ...

  8. 微擎 人人商城 merchant.php源码

    <?php define('IN_SYS', true); require '../framework/bootstrap.inc.php'; load()->web('common'); ...

  9. 有人在用fastReport作报表时处理过字体自动缩小的问题吗,怎么做

    有人在用fastReport作报表时处理过字体自动缩小的问题吗,怎么做  我来答   浏览 49 次 1个回答 #吃瓜大会# Angelababy演技被吐槽, 你觉得她的演技怎么样? 最佳答案 热心 ...

  10. cxGrid之checkbox小结

    http://www.cnblogs.com/Kim53622744/p/4428997.html 在cxgrid中增加选择列 1.在dataset(query/table/clientdataset ...