Submission #67972488


Source Code Expand

// ,,廿_廿,,
#include<iostream>
#include<vector>
using namespace std;
#include<algorithm>
int main(){
	int n,k,x;cin>>n>>k>>x;
	vector<string> s(n);
	for(int i=0;i<n;++i){
		cin >> s[i];
	}

	vector<string> t;
	auto dfs = [&] (auto &r,int c,string str) {
		if(c == k){
			t.emplace_back(str);
			return;
		}
		for(int i=0;i<n;++i){
			r(r,c+1,str+s[i]);
		}
	};
	dfs(dfs,0,"");
	sort(begin(t),end(t));
	cout << t[x-1] << endl;
}

Submission Info

Submission Time
Task C - Concat (X-th)
User ponzoie
Language C++ 23 (gcc 12.2)
Score 300
Code Size 455 Byte
Status AC
Exec Time 26 ms
Memory 12580 KiB

Judge Result

Set Name Sample All
Score / Max Score 0 / 0 300 / 300
Status
AC × 2
AC × 27
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 AC 2 ms 3688 KiB
hand_02.txt AC 26 ms 10364 KiB
hand_03.txt AC 1 ms 3644 KiB
hand_04.txt AC 24 ms 8988 KiB
hand_06.txt AC 1 ms 3484 KiB
hand_07.txt AC 1 ms 3504 KiB
random_01.txt AC 22 ms 9740 KiB
random_02.txt AC 14 ms 7968 KiB
random_03.txt AC 1 ms 3668 KiB
random_04.txt AC 1 ms 3392 KiB
random_05.txt AC 23 ms 10276 KiB
random_06.txt AC 1 ms 3508 KiB
random_07.txt AC 1 ms 3476 KiB
random_08.txt AC 2 ms 3700 KiB
random_09.txt AC 23 ms 10924 KiB
random_10.txt AC 2 ms 3516 KiB
random_11.txt AC 23 ms 9324 KiB
random_12.txt AC 4 ms 4640 KiB
random_13.txt AC 23 ms 11000 KiB
random_14.txt AC 1 ms 3548 KiB
random_15.txt AC 1 ms 3512 KiB
random_16.txt AC 1 ms 3492 KiB
random_17.txt AC 24 ms 12580 KiB
random_18.txt AC 19 ms 12516 KiB
random_19.txt AC 1 ms 3592 KiB
sample_01.txt AC 1 ms 3468 KiB
sample_02.txt AC 1 ms 3600 KiB