• 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;
    }
  • 相关阅读:
    java-并发解决方案
    linux-常用快捷键
    java-进程
    vim-常用快捷键
    数据库-事务
    spring-事务实现原理
    gdb
    x86 下的 struct 變數 member 擺放位置
    du 查看 資料夾 佔用空間
    ADC 計算時,階數的選擇
  • 原文地址:https://www.cnblogs.com/moonbay/p/2753984.html
Copyright © 2020-2023  润新知