Files
weee/gen/sortline.cpp
T
iris 2201a02272 Squashed 'external/xbyak/' content from commit 431abd86
git-subtree-dir: external/xbyak
git-subtree-split: 431abd865e70a46d56f5aa0e1f87572decb60169
2026-05-12 14:03:16 +02:00

24 lines
452 B
C++

#include <iostream>
#include <fstream>
#include <string>
#include <set>
typedef std::set<std::string> StrSet;
int main()
{
StrSet ss;
std::string line;
while (std::getline(std::cin, line)) {
if (!line.empty() && line[line.size() - 1] == '\n') {
line.resize(line.size() - 1);
}
if (!line.empty()) {
ss.insert(line);
}
}
for (StrSet::const_iterator i = ss.begin(), ie = ss.end(); i != ie; ++i) {
std::cout << *i << std::endl;
}
}