Untitled
unknown
plain_text
3 years ago
487 B
8
Indexable
#include <iostream>
#include <fstream>
#include <stdint.h>
#include <algorithm>
#include <string>
#include "Header.h"
using namespace std;
int main() {
ifstream in("input.txt");
ofstream out("output.txt");
string n;
vector <string> j;
while (getline(in, n)) {
j.push_back(n);
}
sort(j.begin(), j.end());
vector <string> l(j.size());
for (int i = 0; i < j.size(); i++) {
l[j.size() - 1 - i] = j[i];
}
for (string g : l) {
cout << g << '\n';
}
}
Editor is loading...