#include <algorithm> #include <cctype> #include <iostream> #include <string> #include <vector> using namespace std; int main() { string s1, s2; //0110 string str1 = "0123456789abcedfABCEDF"; string str2 = "084C2A6E195D37BF5D37BF"; while (cin >> s1 >> s2) { vector<char> v1(s1.size()), v2(s2.size()); string strOout = s1 + s2; string odd, even; for (int i = 0; i < strOout.size(); i++) { if (i % 2 == 0) { even += strOout[i]; } else { odd += strOout[i]; } } sort(odd.begin(), odd.end()); sort(even.begin(), even.end()); //cout <<odd><< ":" <<even><<endl>= '0' && strOout[i] <= '9') || (toupper(strOout[i]) >= 'A' && toupper(strOout[i]) <= 'F')) { strOout[i] = str2[str1.find_last_of(strOout[i])]; } } cout << strOout << endl; } } // 64 位输出请用 printf("%lld")</endl></even></odd></char></vector></string></iostream></cctype></algorithm>
点赞

相关推荐

码农索隆:单休一个月少休息4天,一年就是48天,平时节假日,别人3天假期,单休的两天
点赞 评论 收藏
分享
牛客网
牛客网在线编程
牛客网题解
牛客企业服务