Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
  • 2 commits
  • 2 files changed
  • 0 comments
  • 1 contributor

Showing 2 changed files with 23 additions and 0 deletions. Show diff stats Hide diff stats

  1. +1 0  .gitignore
  2. +22 0 10082/10082.cc
1  .gitignore
@@ -2,3 +2,4 @@
2 2 *.o
3 3 *.a
4 4 *_unittest
  5 +*.out
22 10082/10082.cc
... ... @@ -0,0 +1,22 @@
  1 +#include<iostream>
  2 +#include<string>
  3 +#include<map>
  4 +
  5 +int main(){
  6 + std::string line;
  7 + std::string result;
  8 + std::map<char,char> conversion_table;
  9 +
  10 + conversion_table['W'] = 'Q';
  11 + getline(std::cin, line);
  12 +
  13 + for(int i=0; i<line.size(); i++){
  14 + if (conversion_table.count(line[i])==1){
  15 + result.push_back(conversion_table[line[i]]);
  16 + } else {
  17 + result.push_back(line[i]);
  18 + }
  19 + }
  20 +
  21 + std::cout<<result<<std::endl;
  22 +}

No commit comments for this range

Something went wrong with that request. Please try again.