2 solutions
-
0
#include<bits/stdc++.h> using namespace std; int main(){ int a[3]; cin>>a[0]>>a[1]>>a[2]; sort(a,a+3); string s; cin>>s; for(int i=0;i<3;++i){ char c=s[i]; if(c=='A'){ cout<<a[0]; }else if(c=='B'){ cout<<a[1]; }else if(c=='C'){ cout<<a[2]; } if(i<2){ cout<<" "; } } return 0; }
Information
- ID
- 710
- Time
- 1000ms
- Memory
- 128MiB
- Difficulty
- 10
- Tags
- # Submissions
- 7
- Accepted
- 4
- Uploaded By