为啥RE
查看原帖
为啥RE
1304371
xsw2014楼主2024/12/30 20:58
#include<bits/stdc++.h> 
using namespace std;
int main(){
    string st;
    int a[5],i;
    scanf("%d %d %d\n%s",&a[1],&a[2],&a[3],st);
    sort(a+1,a+4);
    for(i=1;i<4;i++){
        if(st[i]=='A')printf("%d",a[1]);
    }
    for(i=1;i<4;i++){
        if(st[i]=='B')printf("%d",a[2]);
    }
    for(i=1;i<4;i++){
        if(st[i]=='C')printf("%d",a[3]);
    }
}
2024/12/30 20:58
加载中...