Files
python/TangDou/LuoGuBook/P4414.cpp

14 lines
351 B
C++
Raw Normal View History

2025-08-30 18:35:01 +08:00
#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’后得到0(A),1(B),2(C)。
return 0;
}