#include<stdio.h>
int main()
{
int a, b, c, t;
scanf("%d %d %d", &a, &b, &c);
char d[2];
for (int i = 0; i <= 2; i++)
{
scanf("%c", &d[i]);
}
if (a > b)
{
t = a;
a = b;
b = t;
}
if (b > c)
{
t = b;
b = c;
c = t;
}
if (a > b)
{
t = a;
a = b;
b = t;
}
for (int i = 0; i <= 2; i++)
{
if (d[i] == 'A')
{
printf("%d ", a);
}
else if (d[i] == 'B')
{
printf("%d ", b);
}
else
{
printf("%d ", c);
}
}
return 0;
}
感觉逻辑正确,但就是不行。恳求大佬调一下