/ SeriousOJ /

Record Detail

Wrong Answer


  
# Status Time Cost Memory Cost
#1 Wrong Answer 1ms 320.0 KiB
#2 Wrong Answer 2ms 532.0 KiB
#3 Wrong Answer 2ms 580.0 KiB
#4 Wrong Answer 2ms 576.0 KiB
#5 Wrong Answer 2ms 580.0 KiB
#6 Wrong Answer 2ms 532.0 KiB
#7 Wrong Answer 2ms 576.0 KiB
#8 Wrong Answer 2ms 512.0 KiB
#9 Wrong Answer 2ms 768.0 KiB
#10 Wrong Answer 2ms 576.0 KiB
#11 Wrong Answer 2ms 324.0 KiB
#12 Wrong Answer 2ms 576.0 KiB
#13 Wrong Answer 2ms 532.0 KiB
#14 Wrong Answer 2ms 576.0 KiB
#15 Wrong Answer 2ms 536.0 KiB

Code

// #include <bits/stdc++.h>
// #define int long long
// #define fastio ios_base::sync_with_stdio(false); cin.tie(NULL);
// #define YN(ans) ans?cout<<"YES"<<endl:cout<<"NO"<<endl;
// #define vin(a,n) vector<int>a(n);for(auto &x:a)cin>>x;
// #define st(v,x) x==0?sort(v.begin(),v.end()):sort(v.rbegin() , v.rend());
// #define vout(a) for(auto x:a){cout<<x<<' ';}cout<<"\n";
// using namespace std;
// const int mod=1e9+7;
// struct node{
//     int b,r,g,y;
// };

// void solved_by_RAFIQ(){
//     int n,m;cin>>n>>m;
//     vector<node>vs(n+1);
//     vector<string>vss(n+1);
//     vs[0].b=vs[0].r=vs[0].g=vs[0].y=0;
//     map<pair<char,int>,int>mpb;
//     vector<vector<int>>vv(n+1);
//     for(int i=0;i<n;i++){
//         string s;cin>>s;vss[i+1]=s;
//         vs[i+1].b=vs[i].b+s.find("B")?1:0;
//         vs[i+1].r=vs[i].r+s.find("R")?1:0;
//         vs[i+1].g=vs[i].g+s.find("G")?1:0;
//         vs[i+1].y=vs[i].y+s.find("Y")?1:0;
//         // vv[i+1][s[0]]=vv[i][s[0]]+
//         if(vs[i+1].b>vs[i].b)mpb[{'B',vs[i+1].b}]=i;
//         if(vs[i+1].r>vs[i].r)mpb[{'R',vs[i+1].r}]=i;
//         if(vs[i+1].g>vs[i].g)mpb[{'G',vs[i+1].g}]=i;
//         if(vs[i+1].y>vs[i].y)mpb[{'Y',vs[i+1].y}]=i;
//     }
//     while(m--){
//         int x,y;cin>>x>>y;
//         int ans=-1;
//         for(int i=1;i<3;i++){
//             if(mpb[{vss[x][i-1],}])
//         }
//     }

// }


// signed main(){
//     fastio
//     int test_case=1,n=1;cin>>test_case;
//     while (test_case--){
//         //cout<< "Case "<<n<<": ";n++;
//         solved_by_RAFIQ();
//     }
// }

#include <bits/stdc++.h>
#define int long long
#define fastio ios_base::sync_with_stdio(false); cin.tie(NULL);
#define YN(ans) ans?cout<<"YES"<<endl:cout<<"NO"<<endl;
#define vin(a,n) vector<int>a(n);for(auto &x:a)cin>>x;
#define st(v,x) x==0?sort(v.begin(),v.end()):sort(v.rbegin() , v.rend());
#define vout(a) for(auto x:a){cout<<x<<' ';}cout<<"\n";
using namespace std;
const int mod=1e9+7;

void solved_by_RAFIQ(){
    int n,k;cin>>n>>k;vin(v,n);st(v,1);
    vector<string>vs;
    for(int i=0;i<k;i++)vs.push_back(to_string(v[i]));
    st(vs,1);
    for(auto it:vs)cout<<it;
    cout<<endl;
}


signed main(){
    fastio
    int test_case=1,n=1;cin>>test_case;
    while (test_case--){
        //cout<< "Case "<<n<<": ";n++;
        solved_by_RAFIQ();
    }
}

Information

Submit By
Type
Submission
Problem
P1083 Number concatenation
Contest
Bangladesh 2.0
Language
C++20 (G++ 13.2.0)
Submit At
2024-08-16 17:42:01
Judged At
2024-10-03 13:21:07
Judged By
Score
0
Total Time
2ms
Peak Memory
768.0 KiB