You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

14 lines
351 B

2 years ago
#include <bits/stdc++.h>
using namespace std;
int a[4];
char x, y, z;
int main() {
cin >> a[1] >> a[2] >> a[3];
cin >> x >> y >> z;
sort(a + 1, a + 1 + 3);
cout << a[x - 'A' + 1] << " "
<< a[y - 'A' + 1] << " " << a[z - 'A' + 1];//字母是大写减去A后得到0A,1B,2C
return 0;
}