提出 #67948747


ソースコード 拡げる

#include <bits/stdc++.h>
#pragma GCC optimize("O3,unroll-loops,fast-math")
using namespace std;
typedef long long ll;
int n,k,x;
vector<string> ss,sss;
string s;
void ad(string h,int l) {
    if(!l) sss.push_back(h);
    else {
        for(int i=0;i<n;i++) {
            ad(h+ss[i],l-1);
        }
    }
    
}
int main() {
    ios::sync_with_stdio(false);
    cin.tie(0);
    cin >> n >> k >> x;
    for(int i=0;i<n;i++) {
        cin >> s;
        ss.push_back(s);
    }
    ad("", k);
    sort(sss.begin(),sss.end());
    //for(auto i:sss) cout << i << " ";
    cout << sss[x-1];
}

提出情報

提出日時
問題 C - Concat (X-th)
ユーザ Hakuaa_2
言語 C++ 20 (gcc 12.2)
得点 300
コード長 612 Byte
結果 AC
実行時間 29 ms
メモリ 12596 KiB

ジャッジ結果

セット名 Sample All
得点 / 配点 0 / 0 300 / 300
結果
AC × 2
AC × 27
セット名 テストケース
Sample sample_01.txt, sample_02.txt
All hand_01.txt, hand_02.txt, hand_03.txt, hand_04.txt, hand_06.txt, hand_07.txt, random_01.txt, random_02.txt, random_03.txt, random_04.txt, random_05.txt, random_06.txt, random_07.txt, random_08.txt, random_09.txt, random_10.txt, random_11.txt, random_12.txt, random_13.txt, random_14.txt, random_15.txt, random_16.txt, random_17.txt, random_18.txt, random_19.txt, sample_01.txt, sample_02.txt
ケース名 結果 実行時間 メモリ
hand_01.txt AC 2 ms 3772 KiB
hand_02.txt AC 29 ms 10352 KiB
hand_03.txt AC 2 ms 3712 KiB
hand_04.txt AC 25 ms 9068 KiB
hand_06.txt AC 1 ms 3528 KiB
hand_07.txt AC 1 ms 3632 KiB
random_01.txt AC 25 ms 9740 KiB
random_02.txt AC 16 ms 7812 KiB
random_03.txt AC 1 ms 3496 KiB
random_04.txt AC 1 ms 3432 KiB
random_05.txt AC 25 ms 10296 KiB
random_06.txt AC 1 ms 3436 KiB
random_07.txt AC 1 ms 3516 KiB
random_08.txt AC 2 ms 3724 KiB
random_09.txt AC 25 ms 10964 KiB
random_10.txt AC 3 ms 3596 KiB
random_11.txt AC 25 ms 9132 KiB
random_12.txt AC 5 ms 4636 KiB
random_13.txt AC 26 ms 10896 KiB
random_14.txt AC 1 ms 3528 KiB
random_15.txt AC 1 ms 3436 KiB
random_16.txt AC 1 ms 3452 KiB
random_17.txt AC 27 ms 12524 KiB
random_18.txt AC 22 ms 12596 KiB
random_19.txt AC 2 ms 3628 KiB
sample_01.txt AC 1 ms 3640 KiB
sample_02.txt AC 2 ms 3644 KiB