Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <bits/stdc++.h>
- using namespace std;
- #define pb push_back
- #define ALL(o) (o).begin(),(o).end()
- #define fo(n) for(int i=0;i<n;i++)
- struct ccc{
- int score;
- char clas;
- };
- bool cmp( ccc a , ccc b ){ return a.score < b.score; }
- int main(){
- int T;
- cin >> T;
- while( T-- ){
- int n , now = -1;
- char c = 'A';
- vector<ccc> p;
- cin >> n;
- fo( n ){
- ccc tmp;
- cin >> tmp.score;
- if( tmp.score < now ) c = 'B';
- now = tmp.score;
- tmp.clas = c;
- p.pb( tmp );
- }
- sort( ALL(p) , cmp );
- fo( 3 ) putchar( p[i].clas );
- puts("");
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement