Untitled

mail@pastecode.io avatar
unknown
plain_text
a year ago
497 B
0
Indexable
Never
#include <iostream>
#include <fstream>
#include <stdint.h>
#include <algorithm>
#include <string>
#include "Header.h" 
using namespace std;
int main(){
	std::vector<std::string> n;
	std::ifstream in("input.txt");
	std::string k;
	string h; int s = 0;
	while (std::getline(in, k)) {
		int j = k.size();
		if (j > s) {
			s = j;
			h = k;
		}
		n.push_back(k);
	} 
    sort(n.begin(), find(n.begin(), n.end(),h));
	for (auto i : n){
		cout << i << '\n';
	}
	cout << h;

}