Wang20280214 @ 2024-08-18 21:39:12
#include <bits/stdc++.h>
using namespace std;
int a[3],s,sum,aac,bbc,ccc;
int ac,bc,cc;
int main()
{
cin>>a[0]>>a[1]>>a[2];
getchar();
ac=getchar()-'A';
bc=getchar()-'A';
cc=getchar()-'A';
sort(a,a+3);
cout<<a[ac]<<" "<<a[bc]<<" "<<a[cc];
}
by Wang20280214 @ 2024-08-18 21:51:36
@jza110228 有道理
by Wang20280214 @ 2024-08-18 21:52:21
后面的我就不关注了
by fls888 @ 2024-08-19 13:00:25
#include<bits/stdc++.h>
using namespace std;
int main()
{
int n,x[3];
map<char,int>mp;
for(int i=0;i<3;i++) cin>>x[i];
sort(x,x+3);
mp['A']=x[0];
mp['B']=x[1];
mp['C']=x[2];
char m;
for(int i=0;i<3;i++)
{
cin>>m;
cout<<mp[m]<<" ";
}
return 0;
}