Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <algorithm>
- #include <string>
- #include <vector>
- using namespace std;
- int main() {
- vector<string> S;
- int N;
- std::cin >> N;
- if (N >= 0 and N <= 1000) {
- for (auto i{0}; i < N; ++i) {
- string s;
- cin >> s;
- if (s.size() >= 1 and s.size() <= 15) {
- sort(begin(s), end(s),
- [](char L, char R) {
- return tolower(L) < tolower(R);
- }
- );
- S.push_back(s);
- }
- }
- }
- for (auto &t : S) {
- cout << t << " ";
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement