ACM-ICPC North America Qualifier Contest 2016 A. A New Alphabet

A. A New Alphabet

模拟即可

#include
using namespace std;
#define clr(a) memset(a, 0, sizeof(a))

typedef long long ll;
const int MAXN = 1e6 + 10;
const int maxn = 1e5 + 10;
const int INF = 0x3f3f3f3f;
const int MOD = 1e9 + 7;
const int N = 1010;

char s[MAXN];
void change(char s){
    if(s == 'a' || s == 'A') cout << "@";
    else if(s == 'b' || s == 'B') cout << "8";
    else if(s == 'c' || s == 'C') cout << "(";
    else if(s == 'd' || s == 'D') cout << "|)";
    else if(s == 'e' || s == 'E') cout << "3";
    else if(s == 'f' || s == 'F') cout << "#";
    else if(s == 'g' || s == 'G') cout << "6";
    else if(s == 'h' || s == 'H') cout << "[-]";
    else if(s == 'i' || s == 'I') cout << "|";
    else if(s == 'j' || s == 'J') cout << "_|";
    else if(s == 'k' || s == 'K') cout << "|<";
    else if(s == 'l' || s == 'L') cout << "1";
    else if(s == 'm' || s == 'M') cout << "[]\\/[]";
    else if(s == 'n' || s == 'N') cout << "[]\\[]";
    else if(s == 'o' || s == 'O') cout << "0";
    else if(s == 'p' || s == 'P') cout << "|D";
    else if(s == 'q' || s == 'Q') cout << "(,)";
    else if(s == 'r' || s == 'R') cout << "|Z";
    else if(s == 's' || s == 'S') cout << "$";
    else if(s == 't' || s == 'T') cout << "']['";
    else if(s == 'u' || s == 'U') cout << "|_|";
    else if(s == 'v' || s == 'V') cout << "\\/";
    else if(s == 'w' || s == 'W') cout << "\\/\\/";
    else if(s == 'x' || s == 'X') cout << "}{";
    else if(s == 'y' || s == 'Y') cout << "`/";
    else if(s == 'z' || s == 'Z') cout << "2";
    else cout << s;
}

int main(){
    gets(s);
    int len = strlen(s);
    for(int i = 0; i < len; i++){
        change(s[i]);
    }
    return 0;
}

 

你可能感兴趣的:(思维)