Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<bits/stdc++.h>
- #include<time.h>
- using namespace std;
- #define sz(x) (x).size()
- /* ----------------- ~~~~~~~ ----------------- */
- string res, x;
- int n;
- /* ----------------- ~~~~~~~ ----------------- */
- int main(){
- //freopen("INPUT.inp", "r", stdin);
- //freopen("OUTPUT.out", "w", stdout);
- //ios_base::sync_with_stdio(0); cin.tie(0);
- /* ----------------- main func ----------------- */
- for(cin >> n >> res; --n; res = (sz(x) > sz(res)) ? x : res)
- cin >> x;
- cout << res << '\n' << sz(res);
- /* ----------------- ~~~~~~~~~ ----------------- */
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement