よじろめ覚書

私の理解度重視のソースコードです。

ABC042B - 文字列大好きいろはちゃんイージー / Iroha Loves Strings (ABC Edition)

問題:B - 文字列大好きいろはちゃんイージー / Iroha Loves Strings (ABC Edition)

#include <algorithm>
#include <iostream>
#include <string>
#include <vector>
using namespace std;

#define REP(i, n) for (int i = 0; i < (n); ++i)
#define ALL(a) (a).begin(), (a).end()
#define PB push_back

int main(void){
    int n, l;
    string s, ans = "";
    vector<string> vec;

    cin.tie(0);
    ios::sync_with_stdio(false);
    cin >> n >> l;
    REP(i, n) {
        cin >> s;
        vec.PB(s);
    }

    sort(ALL(vec));
    REP(i, n) {
        ans += vec[i];
    }

    cout << ans << "\n";
    return 0;
}