fork(2) download
  1. #include <iostream>
  2. #include <string>
  3. using namespace std;
  4.  
  5. int main() {
  6. string b, c;
  7. getline(cin, b);
  8. getline(cin, c);
  9. for(int i = 0; i < b.length(); i++) {
  10. cout << (b[i] - 'A' < 0? ' ': c[b[i] - 'A']);
  11. }
  12. return 0;
  13. }
Success #stdin #stdout 0s 3464KB
stdin
HPC PJVYMIY 
BLMRGJIASOPZEFDCKWYHUNXQTV 
stdout
ACM CONTEST