Submission #2123021


Source Code Expand

// #define _CRT_SECURE_NO_WARNINGS
// #define _USE_MATH_DEFINES	// M_PI=3.1415...
#include <iostream>
#include <cstdio>
#include <algorithm>
#include <string>
#include <vector>
#include <map>
#include <set>
#include <stack>
#include <cmath>
#include <cstdlib>
#include <functional>
#include <locale>
#include <cctype>
#include <sstream>
#include <iomanip>	// 20桁出力 cout << setprecision(20) << double;
#include <queue>
#include <bitset>	// bitset<8> bs1(131uL); // 10000011 bs1[0]は1 01stringからビット集合生成可
#include <numeric>
#include <random>
using namespace std;

typedef long long LL;
typedef pair<LL, LL> P;
typedef vector<int> VI;
typedef vector<VI> VVI;
typedef vector<LL> VL;
typedef vector<VL> VVL;				// VVL v(100,VL(100,0));
typedef vector<pair<LL, LL> > VP;
typedef vector<string> VS;
typedef map<int, int> MAPII;
typedef multimap<int, char, greater<int> > MuMAPIC;
typedef multimap<int, string, greater<int> > MuMIS;
typedef pair<LL, pair<P, P> > PP;

#define INF 999999999999999997		// 少し加算したらオーバーフローする
#define MP make_pair
#define FAST_IO  cin.tie(0); ios::sync_with_stdio(false);
#define FOR(i,a,b) for(int i=(a);i<(b);i++)
#define FORL(i,a,b) for(LL i=(a);i<(b);i++)
#define FOR_REV(i,a,b) for(int i=(a);i>=(b);i--)
#define foreach_it(type,it,c) for(type::iterator it=c.begin(),c_end=c.end();it!=c_end;++it)
#define FOR_ITR(d) for(auto itr=d.begin(),d_end=d.end();itr!=d_end;++itr)	// C++11
#define O(s) cout<<s<<endl;

#define DUMP_VVI(b) if(dbgF){FOR(i,0,b.size()){FOR(j,0,b[i].size())printf("%d ",b[i][j]);puts("");}}
#define D_OUT(str,value) if(dbgF){cout<<str<<" : "<<value<<endl;}

template<class T>T IN() { T d; cin >> d; return d; }

LL gcd(LL a, LL b) { return (b > 0) ? gcd(b, a%b) : a; } // 最大公約数(Greatest Common Divisor)
LL lcm(LL a, LL b) { return a / gcd(a, b) * b; } // 最小公倍数(Least Common Multiple)
bool uruu(LL Y) { return (((Y % 4 == 0 && Y % 100 != 0) || Y % 400 == 0) ? true : false); } // うるう年判定

int dx[4] = { 0,1,0,-1 };
int dy[4] = { 1,0,-1,0 };
int dxx[8] = { 0,1,1,1,0,-1,-1,-1 };
int dyy[8] = { 1,1,0,-1,-1,-1,0,1 };

// vector注意
// vec[i][j]の形に入力を入れるとき、vecは初期化してある必要がある.

// ------------------- include, typedef, define END. -------------------


int main() {
	FAST_IO;
	bool dbgF = true; // for D_OUT(str, value)  ... cout<< str <<" : "<< value <<endl;

	LL N, K;
	cin >> N >> K;
	VS a;
	FOR(i, 0, N)
		a.push_back(IN<string>());

	sort(a.begin(), a.end(), greater<string>());

	FOR(i, 0, N)
		cout << a[i];
	cout << endl;

	return 0;
}

Submission Info

Submission Time
Task B - String Sorting
User conchan_akita
Language C++14 (GCC 5.4.1)
Score 100
Code Size 2711 Byte
Status AC
Exec Time 1 ms
Memory 256 KB

Judge Result

Set Name All
Score / Max Score 100 / 100
Status
AC × 43
Set Name Test Cases
All 00_sample_1, 00_sample_2, 10_max_06, 10_max_07, 10_max_08, 10_max_09, 10_max_10, 10_min_00, 10_min_01, 10_min_02, 10_min_03, 10_min_04, 10_min_05, 10_rand_11, 10_rand_12, 10_rand_13, 10_rand_14, 10_rand_15, 10_rand_16, 10_rand_17, 10_rand_18, 10_rand_19, 10_rand_20, 10_rand_21, 10_rand_22, 10_rand_23, 10_rand_24, 10_rand_25, 10_rand_26, 10_rand_27, 10_rand_28, 10_rand_29, 10_rand_30, 10_rand_31, 10_rand_32, 10_rand_33, 10_rand_34, 10_rand_35, 10_rand_36, 10_rand_37, 10_rand_38, 10_rand_39, 10_rand_40
Case Name Status Exec Time Memory
00_sample_1 AC 1 ms 256 KB
00_sample_2 AC 1 ms 256 KB
10_max_06 AC 1 ms 256 KB
10_max_07 AC 1 ms 256 KB
10_max_08 AC 1 ms 256 KB
10_max_09 AC 1 ms 256 KB
10_max_10 AC 1 ms 256 KB
10_min_00 AC 1 ms 256 KB
10_min_01 AC 1 ms 256 KB
10_min_02 AC 1 ms 256 KB
10_min_03 AC 1 ms 256 KB
10_min_04 AC 1 ms 256 KB
10_min_05 AC 1 ms 256 KB
10_rand_11 AC 1 ms 256 KB
10_rand_12 AC 1 ms 256 KB
10_rand_13 AC 1 ms 256 KB
10_rand_14 AC 1 ms 256 KB
10_rand_15 AC 1 ms 256 KB
10_rand_16 AC 1 ms 256 KB
10_rand_17 AC 1 ms 256 KB
10_rand_18 AC 1 ms 256 KB
10_rand_19 AC 1 ms 256 KB
10_rand_20 AC 1 ms 256 KB
10_rand_21 AC 1 ms 256 KB
10_rand_22 AC 1 ms 256 KB
10_rand_23 AC 1 ms 256 KB
10_rand_24 AC 1 ms 256 KB
10_rand_25 AC 1 ms 256 KB
10_rand_26 AC 1 ms 256 KB
10_rand_27 AC 1 ms 256 KB
10_rand_28 AC 1 ms 256 KB
10_rand_29 AC 1 ms 256 KB
10_rand_30 AC 1 ms 256 KB
10_rand_31 AC 1 ms 256 KB
10_rand_32 AC 1 ms 256 KB
10_rand_33 AC 1 ms 256 KB
10_rand_34 AC 1 ms 256 KB
10_rand_35 AC 1 ms 256 KB
10_rand_36 AC 1 ms 256 KB
10_rand_37 AC 1 ms 256 KB
10_rand_38 AC 1 ms 256 KB
10_rand_39 AC 1 ms 256 KB
10_rand_40 AC 1 ms 256 KB