repo.or.cz
/
furry-nemesis.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
cloned from srcbox.
[furry-nemesis.git]
/
poj
/
poj2141.cpp
blob
5f325d976b0ef151738f30899848577432cbd59f
1
#include <iostream>
2
#include <map>
3
#include <string>
4
#include <cctype>
5
using namespace
std
;
6
int
main
() {
7
map
<
char
,
char
>
changes
;
8
char
ch
;
9
int
i
;
10
for
(
i
=
0
;
i
<
26
;
i
++) {
11
cin
>>
ch
;
12
changes
[
char
(
int
(
'a'
)+
i
)]=
ch
;
13
changes
[
char
(
int
(
'A'
)+
i
)]=
char
(
int
(
ch
)-
32
);
14
}
15
string st
;
16
getline
(
cin
,
st
);
17
getline
(
cin
,
st
);
18
for
(
i
=
0
;
i
<
st
.
size
();
i
++)
19
if
(
isalpha
(
st
[
i
]))
cout
<<
changes
[
st
[
i
]];
else
cout
<<
st
[
i
];
20
return
0
;
21
}