zoukankan      html  css  js  c++  java
  • hdu 3079水题

    水到什么都不想说了。

    /*
     * hdu3079/win.cpp
     * Created on: 2012-11-4
     * Author    : ben
     */
    #include <cstdio>
    #include <cstdlib>
    #include <cstring>
    #include <cmath>
    #include <ctime>
    #include <iostream>
    #include <algorithm>
    #include <queue>
    #include <set>
    #include <map>
    #include <stack>
    #include <string>
    #include <vector>
    #include <deque>
    #include <list>
    #include <functional>
    #include <numeric>
    #include <cctype>
    using namespace std;
    map<char, char> mymap;
    void init() {
        char vowels[] = "aoeiu";
        char vowels2[] = "AOEIU";
        char consonant[] = "bcdfghjklmnpqrstvwxyz";
        char consonant2[] = "BCDFGHJKLMNPQRSTVWXYZ";
        for(int i = 0; i < 5; i++) {
            mymap[vowels[i]] = vowels2[i];
            mymap[vowels2[i]] = vowels2[i];
        }
        for(int i = 0; i < 21; i++) {
            mymap[consonant2[i]] = consonant[i];
            mymap[consonant[i]] = consonant[i];
        }
    }
    int main() {
    #ifndef ONLINE_JUDGE
        freopen("data.in", "r", stdin);
    #endif
        int T, len;
        char str[200];
        init();
        scanf("%d", &T);
        getchar();
        while(T--) {
            gets(str);
            len = strlen(str);
            for(int i = 0; i < len; i++) {
                str[i] = mymap[str[i]];
            }
            puts(str);
        }
        return 0;
    }
  • 相关阅读:
    python 开启多进程的两种方法
    Python
    Python
    路由器配置
    python 自定义报头 实现大文件传输
    python socket
    Spring MVC 实现文件的上传
    SpringMVC异常处理
    SpringMVC 返回值类型,参数传递 解决乱码
    Spring—MVC案例
  • 原文地址:https://www.cnblogs.com/moonbay/p/2753984.html
Copyright © 2011-2022 走看看