RE+WA,大佬求解
查看原帖
RE+WA,大佬求解
1634050
psyxm楼主2025/7/28 15:18
#include<bits/stdc++.h>
using namespace std;
const int N=2e6+10;
int a[N];
int main(){
	int b[3];
	cin>>b[1]>>b[2]>>b[3];
	string s;
	cin>>s;
	sort(b+1,b+3+1);
	if(s=="ABC")cout<<b[1]<<' '<<b[2]<<' '<<b[3];
	if(s=="ACB")cout<<b[1]<<' '<<b[3]<<' '<<b[2];
	if(s=="BAC")cout<<b[2]<<' '<<b[1]<<' '<<b[3];
	if(s=="BCA")cout<<b[2]<<' '<<b[3]<<' '<<b[1];
	if(s=="CAB")cout<<b[3]<<' '<<b[1]<<' '<<b[2];
	if(s=="CBA")cout<<b[3]<<' '<<b[2]<<' '<<b[1];
	return 0;
}  

2025/7/28 15:18
加载中...