Untitled

 avatar
unknown
plain_text
2 years ago
497 B
4
Indexable
#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;

}
Editor is loading...