Created
June 7, 2018 11:01
-
-
Save victorsenam/10bcc0358c5ae118bdb00b31cbb4dc2a to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <vector> | |
#include <string> | |
#include <iostream> | |
#include <algorithm> | |
int main() { | |
int n; | |
std::cin >> n; | |
std::vector<std::string> v; | |
for (int i = 0; i < n; i++) { | |
std::string str; | |
cin >> str; | |
v.push_back(str); | |
} | |
std::sort(v.begin(), v.end()); | |
for (int i = 0; i < n; i++) { | |
std::cout << v[i] << std::endl; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment