Language: C++

#include<iostream>
#include<string>
#include<algorithm>
#include<cstring>
#include<cctype>

using namespace std;

string revJ(string t){
ÃÂ ÃÂ string ret = t;
ÃÂ ÃÂ ret.insert(ret.begin(),t[t.length()-1]);
ÃÂ ÃÂ ret.erase(ret.end()-1);
ÃÂ ÃÂ return ret;
}
string revC(string t){
ÃÂ ÃÂ string ret = t;
ÃÂ ÃÂ ret += t[0];
ÃÂ ÃÂ ret.erase(ret.begin());
ÃÂ ÃÂ return ret;
}
string revE(string t){
ÃÂ ÃÂ char c=0;
ÃÂ ÃÂ if(t.length()==1)return t;
ÃÂ ÃÂ if(t.length()%2){
ÃÂ ÃÂ  ÃÂ c = t[t.length()/2];
ÃÂ ÃÂ  ÃÂ t.erase(t.begin()+t.length()/2);
ÃÂ ÃÂ }
ÃÂ ÃÂ string l = t.substr(0,t.length()/2);
ÃÂ ÃÂ string r = t.substr(t.length()/2,t.length()-t.length()/2);
ÃÂ ÃÂ if(c){
ÃÂ ÃÂ  ÃÂ return r+c+l;
ÃÂ ÃÂ }else return r+l;
}
string revA(string t){
ÃÂ ÃÂ string ret = t;
ÃÂ ÃÂ reverse(ret.begin(),ret.end());
ÃÂ ÃÂ return ret;
}
string revP(string t){
ÃÂ ÃÂ //dec
ÃÂ ÃÂ string ret = t;
ÃÂ ÃÂ for(int i = 0; i < (signed)ret.length(); ++i){
ÃÂ ÃÂ  ÃÂ if( isdigit(ret[i]) ){
ÃÂ ÃÂ  ÃÂ  ÃÂ ret[i]--;
ÃÂ ÃÂ  ÃÂ  ÃÂ if(ret[i]<'0')ret[i]='9';
ÃÂ ÃÂ  ÃÂ }
ÃÂ ÃÂ }
ÃÂ ÃÂ return ret;
}
string revM(string t){
ÃÂ ÃÂ //inc
ÃÂ ÃÂ string ret = t;
ÃÂ ÃÂ for(int i = 0; i < (signed)ret.length(); ++i){
ÃÂ ÃÂ  ÃÂ if( isdigit(ret[i]) ){
ÃÂ ÃÂ  ÃÂ  ÃÂ ret[i]++;
ÃÂ ÃÂ  ÃÂ  ÃÂ if(ret[i]>'9')ret[i]='0';
ÃÂ ÃÂ  ÃÂ }
ÃÂ ÃÂ }
ÃÂ ÃÂ return ret;
}

int main()
{
ÃÂ ÃÂ int n;
ÃÂ ÃÂ cin >> n;
ÃÂ ÃÂ for(int i = 0; i < n; ++i){
ÃÂ ÃÂ  ÃÂ string order;
ÃÂ ÃÂ  ÃÂ string msg;
ÃÂ ÃÂ  ÃÂ cin >> order >> msg;
ÃÂ ÃÂ  ÃÂ for(int i = (int)order.length()-1; i>=0; --i){
ÃÂ ÃÂ  ÃÂ  ÃÂ if( order[i] == 'J' ){
	msg = revJ( msg );
ÃÂ ÃÂ  ÃÂ  ÃÂ }
ÃÂ ÃÂ  ÃÂ  ÃÂ if( order[i] == 'C' ){
	msg = revC( msg );
ÃÂ ÃÂ  ÃÂ  ÃÂ }
ÃÂ ÃÂ  ÃÂ  ÃÂ if( order[i] == 'E' ){
	msg = revE( msg );
ÃÂ ÃÂ  ÃÂ  ÃÂ }
ÃÂ ÃÂ  ÃÂ  ÃÂ if( order[i] == 'A' ){
	msg = revA( msg );
ÃÂ ÃÂ  ÃÂ  ÃÂ }
ÃÂ ÃÂ  ÃÂ  ÃÂ if( order[i] == 'P' ){
	msg = revP( msg );
ÃÂ ÃÂ  ÃÂ  ÃÂ }
ÃÂ ÃÂ  ÃÂ  ÃÂ if( order[i] == 'M' ){
	msg = revM( msg );
ÃÂ ÃÂ  ÃÂ  ÃÂ }
ÃÂ ÃÂ  ÃÂ }
ÃÂ ÃÂ  ÃÂ cout << msg << endl;
ÃÂ ÃÂ }
ÃÂ ÃÂ return 0;
}

Compiler output:
a.cc:10:1: error: extended character  is not valid in an identifier
   10 | ÃÂ ÃÂ string ret = t;
      | ^
a.cc:10:1: error: extended character   is not valid in an identifier
a.cc:10:1: error: extended character  is not valid in an identifier
a.cc:10:1: error: extended character   is not valid in an identifier
a.cc:11:1: error: extended character  is not valid in an identifier
   11 | ÃÂ ÃÂ ret.insert(ret.begin(),t[t.length()-1]);
      | ^
a.cc:11:1: error: extended character   is not valid in an identifier
a.cc:11:1: error: extended character  is not valid in an identifier
a.cc:11:1: error: extended character   is not valid in an identifier
a.cc:12:1: error: extended character  is not valid in an identifier
   12 | ÃÂ ÃÂ ret.erase(ret.end()-1);
      | ^
a.cc:12:1: error: extended character   is not valid in an identifier
a.cc:12:1: error: extended character  is not valid in an identifier
a.cc:12:1: error: extended character   is not valid in an identifier
a.cc:13:1: error: extended character  is not valid in an identifier
   13 | ÃÂ ÃÂ return ret;
      | ^
a.cc:13:1: error: extended character   is not valid in an identifier
a.cc:13:1: error: extended character  is not valid in an identifier
a.cc:13:1: error: extended character   is not valid in an identifier
a.cc:16:1: error: extended character  is not valid in an identifier
   16 | ÃÂ ÃÂ string ret = t;
      | ^
a.cc:16:1: error: extended character   is not valid in an identifier
a.cc:16:1: error: extended character  is not valid in an identifier
a.cc:16:1: error: extended character   is not valid in an identifier
a.cc:17:1: error: extended character  is not valid in an identifier
   17 | ÃÂ ÃÂ ret += t[0];
      | ^
a.cc:17:1: error: extended character   is not valid in an identifier
a.cc:17:1: error: extended character  is not valid in an identifier
a.cc:17:1: error: extended character   is not valid in an identifier
a.cc:18:1: error: extended character  is not valid in an identifier
   18 | ÃÂ ÃÂ ret.erase(ret.begin());
      | ^
a.cc:18:1: error: extended character   is not valid in an identifier
a.cc:18:1: error: extended character  is not valid in an identifier
a.cc:18:1: error: extended character   is not valid in an identifier
a.cc:19:1: error: extended character  is not valid in an identifier
   19 | ÃÂ ÃÂ return ret;
      | ^
a.cc:19:1: error: extended character   is not valid in an identifier
a.cc:19:1: error: extended character  is not valid in an identifier
a.cc:19:1: error: extended character   is not valid in an identifier
a.cc:22:1: error: extended character  is not valid in an identifier
   22 | ÃÂ ÃÂ char c=0;
      | ^
a.cc:22:1: error: extended character   is not valid in an identifier
a.cc:22:1: error: extended character  is not valid in an identifier
a.cc:22:1: error: extended character   is not valid in an identifier
a.cc:23:1: error: extended character  is not valid in an identifier
   23 | ÃÂ ÃÂ if(t.length()==1)return t;
      | ^
a.cc:23:1: error: extended character   is not valid in an identifier
a.cc:23:1: error: extended character  is not valid in an identifier
a.cc:23:1: error: extended character   is not valid in an identifier
a.cc:24:1: error: extended character  is not valid in an identifier
   24 | ÃÂ ÃÂ if(t.length()%2){
      | ^
a.cc:24:1: error: extended character   is not valid in an identifier
a.cc:24:1: error: extended character  is not valid in an identifier
a.cc:24:1: error: extended character   is not valid in an identifier
a.cc:25:1: error: extended character  is not valid in an identifier
   25 | ÃÂ ÃÂ  ÃÂ c = t[t.length()/2];
      | ^
a.cc:25:1: error: extended character   is not valid in an identifier
a.cc:25:1: error: extended character  is not valid in an identifier
a.cc:25:1: error: extended character   is not valid in an identifier
a.cc:25:10: error: extended character  is not valid in an identifier
   25 | ÃÂ ÃÂ  ÃÂ c = t[t.length()/2];
      |          ^
a.cc:25:10: error: extended character   is not valid in an identifier
a.cc:26:1: error: extended character  is not valid in an identifier
   26 | ÃÂ ÃÂ  ÃÂ t.erase(t.begin()+t.length()/2);
      | ^
a.cc:26:1: error: extended character   is not valid in an identifier
a.cc:26:1: error: extended character  is not valid in an identifier
a.cc:26:1: error: extended character   is not valid in an identifier
a.cc:26:10: error: extended character  is not valid in an identifier
   26 | ÃÂ ÃÂ  ÃÂ t.erase(t.begin()+t.length()/2);
      |          ^
a.cc:26:10: error: extended character   is not valid in an identifier
a.cc:27:1: error: extended character  is not valid in an identifier
   27 | ÃÂ ÃÂ }
      | ^
a.cc:27:1: error: extended character   is not valid in an identifier
a.cc:27:1: error: extended character  is not valid in an identifier
a.cc:27:1: error: extended character   is not valid in an identifier
a.cc:28:1: error: extended character  is not valid in an identifier
   28 | ÃÂ ÃÂ string l = t.substr(0,t.length()/2);
      | ^
a.cc:28:1: error: extended character   is not valid in an identifier
a.cc:28:1: error: extended character  is not valid in an identifier
a.cc:28:1: error: extended character   is not valid in an identifier
a.cc:29:1: error: extended character  is not valid in an identifier
   29 | ÃÂ ÃÂ string r = t.substr(t.length()/2,t.length()-t.length()/2);
      | ^
a.cc:29:1: error: extended character   is not valid in an identifier
a.cc:29:1: error: extended character  is not valid in an identifier
a.cc:29:1: error: extended character   is not valid in an identifier
a.cc:30:1: error: extended character  is not valid in an identifier
   30 | ÃÂ ÃÂ if(c){
      | ^
a.cc:30:1: error: extended character   is not valid in an identifier
a.cc:30:1: error: extended character  is not valid in an identifier
a.cc:30:1: error: extended character   is not valid in an identifier
a.cc:31:1: error: extended character  is not valid in an identifier
   31 | ÃÂ ÃÂ  ÃÂ return r+c+l;
      | ^
a.cc:31:1: error: extended character   is not valid in an identifier
a.cc:31:1: error: extended character  is not valid in an identifier
a.cc:31:1: error: extended character   is not valid in an identifier
a.cc:31:10: error: extended character  is not valid in an identifier
   31 | ÃÂ ÃÂ  ÃÂ return r+c+l;
      |          ^
a.cc:31:10: error: extended character   is not valid in an identifier
a.cc:32:1: error: extended character  is not valid in an identifier
   32 | ÃÂ ÃÂ }else return r+l;
      | ^
a.cc:32:1: error: extended character   is not valid in an identifier
a.cc:32:1: error: extended character  is not valid in an identifier
a.cc:32:1: error: extended character   is not valid in an identifier
a.cc:35:1: error: extended character  is not valid in an identifier
   35 | ÃÂ ÃÂ string ret = t;
      | ^
a.cc:35:1: error: extended character   is not valid in an identifier
a.cc:35:1: error: extended character  is not valid in an identifier
a.cc:35:1: error: extended character   is not valid in an identifier
a.cc:36:1: error: extended character  is not valid in an identifier
   36 | ÃÂ ÃÂ reverse(ret.begin(),ret.end());
      | ^
a.cc:36:1: error: extended character   is not valid in an identifier
a.cc:36:1: error: extended character  is not valid in an identifier
a.cc:36:1: error: extended character   is not valid in an identifier
a.cc:37:1: error: extended character  is not valid in an identifier
   37 | ÃÂ ÃÂ return ret;
      | ^
a.cc:37:1: error: extended character   is not valid in an identifier
a.cc:37:1: error: extended character  is not valid in an identifier
a.cc:37:1: error: extended character   is not valid in an identifier
a.cc:40:1: error: extended character  is not valid in an identifier
   40 | ÃÂ ÃÂ //dec
      | ^
a.cc:40:1: error: extended character   is not valid in an identifier
a.cc:40:1: error: extended character  is not valid in an identifier
a.cc:40:1: error: extended character   is not valid in an identifier
a.cc:41:1: error: extended character  is not valid in an identifier
   41 | ÃÂ ÃÂ string ret = t;
      | ^
a.cc:41:1: error: extended character   is not valid in an identifier
a.cc:41:1: error: extended character  is not valid in an identifier
a.cc:41:1: error: extended character   is not valid in an identifier
a.cc:42:1: error: extended character  is not valid in an identifier
   42 | ÃÂ ÃÂ for(int i = 0; i < (signed)ret.length(); ++i){
      | ^
a.cc:42:1: error: extended character   is not valid in an identifier
a.cc:42:1: error: extended character  is not valid in an identifier
a.cc:42:1: error: extended character   is not valid in an identifier
a.cc:43:1: error: extended character  is not valid in an identifier
   43 | ÃÂ ÃÂ  ÃÂ if( isdigit(ret[i]) ){
      | ^
a.cc:43:1: error: extended character   is not valid in an identifier
a.cc:43:1: error: extended character  is not valid in an identifier
a.cc:43:1: error: extended character   is not valid in an identifier
a.cc:43:10: error: extended character  is not valid in an identifier
   43 | ÃÂ ÃÂ  ÃÂ if( isdigit(ret[i]) ){
      |          ^
a.cc:43:10: error: extended character   is not valid in an identifier
a.cc:44:1: error: extended character  is not valid in an identifier
   44 | ÃÂ ÃÂ  ÃÂ  ÃÂ ret[i]--;
      | ^
a.cc:44:1: error: extended character   is not valid in an identifier
a.cc:44:1: error: extended character  is not valid in an identifier
a.cc:44:1: error: extended character   is not valid in an identifier
a.cc:44:10: error: extended character  is not valid in an identifier
   44 | ÃÂ ÃÂ  ÃÂ  ÃÂ ret[i]--;
      |          ^
a.cc:44:10: error: extended character   is not valid in an identifier
a.cc:44:15: error: extended character  is not valid in an ide