/ SeriousOJ /

Record Detail

Wrong Answer


  
# Status Time Cost Memory Cost
#1 Wrong Answer 2ms 536.0 KiB
#2 Accepted 2ms 588.0 KiB
#3 Accepted 2ms 592.0 KiB
#4 Wrong Answer 2ms 592.0 KiB
#5 Accepted 2ms 820.0 KiB
#6 Wrong Answer 2ms 592.0 KiB
#7 Wrong Answer 2ms 584.0 KiB
#8 Wrong Answer 2ms 812.0 KiB
#9 Wrong Answer 2ms 340.0 KiB
#10 Wrong Answer 2ms 584.0 KiB
#11 Wrong Answer 2ms 540.0 KiB
#12 Wrong Answer 2ms 496.0 KiB
#13 Wrong Answer 2ms 520.0 KiB
#14 Wrong Answer 2ms 532.0 KiB
#15 Wrong Answer 3ms 484.0 KiB

Code

#include <bits/stdc++.h>
using namespace std;

#define esh29() ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0);
#define ll long long int
#define pb push_back
#define ep emplace_back
#define forn(i, n) for(int i = 0; i < int(n); i++)
#define form(i, n) for(int i = 1; i < int(n); i++)
#define MOD 1000000007
#define w(t) int t; cin >> t; cin.ignore(); while (t--)

const double eps = 1e-9;
const double PI = acos(-1);

#define F first
#define S second
#define all(a) (a).begin(),(a).end()
#define rall(a) (a).rbegin(),(a).rend()
#define sz(x) (int)x.size()

typedef vector<int> vi;
typedef vector<ll> vl;
typedef vector<vi> vvi;
typedef vector<vl> vvl;
typedef pair<int,int> pii;
typedef pair<double, double> pdd;
typedef pair<ll, ll> pll;
typedef vector<pii> vii;
typedef vector<pll> vll;
typedef double dl;
#define dbg(args...) do {cerr << #args << " : "; faltu(args); } while(0)
#define fraction() cout.unsetf(ios::floatfield); cout.precision(10); cout.setf(ios::fixed,ios::floatfield);
ll gcd ( ll a, ll b ) { return __gcd ( a, b ); }
ll lcm ( ll a, ll b ) { return a * ( b / gcd ( a, b ) ); }

void solve(){
ll n,p,l,q,k,i,j;
cin>>n>>k;
vector<string>a;
string s;
forn(i,n){
    cin>>s;
    a.pb(s);
}
sort(rall(a));
for (i=1; i<=k; i++){
    a[0] += a[i];
}
cout<<a[0]<<endl;


}
int main() {
    esh29();

 w(t){
        solve(); 
     
}
  
    return 0;
}

Information

Submit By
Type
Submission
Problem
P1083 Number concatenation
Contest
Bangladesh 2.0
Language
C++17 (G++ 13.2.0)
Submit At
2024-08-16 15:55:59
Judged At
2024-10-03 13:29:26
Judged By
Score
15
Total Time
3ms
Peak Memory
820.0 KiB