[BOJ] 1181. 단어 정렬 - C++
·
Algorithm/BOJ [C++]
https://www.acmicpc.net/problem/1181  #include using namespace std;bool Comapare(string a, string b) { if (a.length() == b.length()) return a v; int N; cin >> N; for (int i = 0; i > str; v.push_back(str); } sort(v.begin(), v.end(), Comapare); // sort 사용법 익히기 v.erase(unique(v.begin(), v.end()),v.end()); for (int i = 0; i     Compare()함수를 구현하여 길이가 같으면 문자를 비교하여 문자 내림차순으로 정렬하고길이가 다르면 길..