Untitled

mail@pastecode.io avatar
unknown
plain_text
2 years ago
298 B
0
Indexable
Never

#include <iostream>
#include <string>
using namespace std;

int main()
{
    string a, maxa;
    int n,maxsize = 0,i;
    cin >> n;
    for(i = 0;i<n;i++){
        cin >> a;
        if (a.size() > maxsize){
            maxsize = a.size();
            maxa = a;
        }
    }
    cout << maxa;
}