Patrick_Pan @ 2024-10-22 16:29:44
#include<iostream>
#include<algorithm>
#include<cstdio>
#include<cstring>
#include<cmath>
#include<cstdlib>
#include<queue>
#include<set>
#include<map>
#include<stack>
#define Max(a,b) (((a)>(b))?(a):(b))
#define Min(a,b) (((a)<(b))?(a):(b))
#define L(i,j,k) for(int i=(j);i<=(k);i++)
#define R(i,j,k) for(int i=(j);i>=(k);i--)
using namespace std;
int a[4];
char A,B,C;
int main() {
L(i,1,3)scanf("%d",&a[i]);
sort(a+1,a+3+1);
int x=getchar();
scanf("%c%c%c",&A,&B,&C);
printf("%d %d %d",a[A-'A'+1],a[B-'A'+1],a[C-'A'+1]);
return 0;
}
测试点1是
1 2 3
ABC
答案是
1 2 3
蒟蒻不懂
by Patrick_Pan @ 2024-10-22 16:34:39
发现把scanf改成cin就对了。(更不懂了)
by ltz761222 @ 2024-10-22 16:52:20
by Patrick_Pan @ 2024-10-24 07:42:26
@ltz761222 scanf为什么在编译器中输入显示没问题,但是在测评机上会WA
by ltz761222 @ 2024-10-24 11:57:26
@Patrick_Pan 可能是你编译器的问题
by Patrick_Pan @ 2024-10-24 13:19:37
DEV 5.9会错吗?
by Estrella_Explore @ 2024-10-30 13:03:48
@Patrick_Pan 因为测试点中有的数据不止一位
样例中三个一位数只是巧合