### [题解]Let’s Celebrate the 100th Contest on ZOJ! » ZOJ3439hhanger

```/**********************************************************************
Author: hhanger
Created Time: Thu 16 Dec 2010 04:34:45 PM CST
File Name: 1.cpp
Description:
**********************************************************************/

#include <algorithm>
#include <bitset>
#include <cctype>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <functional>
#include <iomanip>
#include <iostream>
#include <list>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <utility>
#include <vector>

using namespace std;

#define out(x) printf("%s %lld\n", #x, (long long)(x))i

map<int, int> mp;

void gao();

int main() {
int ch;
gao();
while ((ch = getchar()) != EOF) putchar(mp[ch]);
return 0;
}

void gao() {
for(int i = 0; i < 1000; ++i) mp[i] = i;
mp['a'] = 'l';
mp['b'] = 'm';
mp['c'] = 'p';
mp['d'] = 'j';
mp['e'] = 'e';
mp['f'] = 'o';
mp['g'] = 'r';
mp['h'] = 'u';
mp['i'] = 'a';
mp['j'] = 'd';
mp['k'] = 'b';
mp['l'] = 'c';
mp['m'] = 'y';
mp['n'] = 'h';
mp['o'] = 'w';
mp['p'] = 's';
mp['q'] = 'z';
mp['r'] = 'x';
mp['s'] = 'n';
mp['t'] = 't';
mp['u'] = 'f';
mp['v'] = 'g';
mp['w'] = 'q';
mp['x'] = 'v';
mp['y'] = 'i';
mp['z'] = 'k';
for (int ch = 'A'; ch <= 'Z'; ++ch) mp[ch] = mp[ch + 32] - 32;
map<int, int> tmp;
for (map<int, int>::iterator mi = mp.begin(); mi != mp.end(); ++mi) tmp[mi->second] = mi->first;
mp = tmp;
}
```
3 Responses to “ZOJ3439hhanger”
1. jing says:

但是还是不明白题目意思~~~~(>_<)~~~~

• watashi says:

题目是用置换密码加密过的，需要自己解密出来

2. jing says:

还是hh大神的代码比较好看(*^__^*) 嘻嘻……

3.