Submission #67932266


Source Code Expand

#include <algorithm>
#include <iostream>
#include <string.h>

using namespace std;

int main()
{
    int n,k,x;
    cin >> n >> k >> x;
    string arr[n + 100];
    for(int i = 0; i < n ; i++)
        cin >> arr[i];
    sort(arr, arr + n);
    string ans = "";
    x--;
    for(int ct = 1 ; ct <= k ; ct++)
    {
        int val = x%n;
        ans = arr[val] + ans;
        x /= n;
    }
    cout << ans << endl;
    return 0;
}

Submission Info

Submission Time
Task C - Concat (X-th)
User MichaelH
Language C++ 17 (gcc 12.2)
Score 0
Code Size 454 Byte
Status WA
Exec Time 2 ms
Memory 3640 KiB

Judge Result

Set Name Sample All
Score / Max Score 0 / 0 0 / 300
Status
AC × 2
AC × 14
WA × 13
Set Name Test Cases
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
Case Name Status Exec Time Memory
hand_01.txt WA 1 ms 3580 KiB
hand_02.txt WA 1 ms 3492 KiB
hand_03.txt WA 1 ms 3492 KiB
hand_04.txt WA 1 ms 3516 KiB
hand_06.txt WA 1 ms 3512 KiB
hand_07.txt WA 1 ms 3516 KiB
random_01.txt AC 1 ms 3420 KiB
random_02.txt AC 1 ms 3516 KiB
random_03.txt AC 1 ms 3548 KiB
random_04.txt AC 1 ms 3512 KiB
random_05.txt AC 1 ms 3548 KiB
random_06.txt AC 1 ms 3640 KiB
random_07.txt AC 1 ms 3476 KiB
random_08.txt AC 1 ms 3516 KiB
random_09.txt WA 1 ms 3508 KiB
random_10.txt WA 1 ms 3516 KiB
random_11.txt WA 1 ms 3452 KiB
random_12.txt WA 1 ms 3492 KiB
random_13.txt WA 1 ms 3576 KiB
random_14.txt AC 1 ms 3452 KiB
random_15.txt WA 1 ms 3576 KiB
random_16.txt WA 1 ms 3416 KiB
random_17.txt AC 1 ms 3512 KiB
random_18.txt AC 1 ms 3456 KiB
random_19.txt AC 1 ms 3412 KiB
sample_01.txt AC 2 ms 3420 KiB
sample_02.txt AC 1 ms 3496 KiB