Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<bits/stdc++.h>
- using namespace std;
- const int INF = 1e9 + 13;
- int main(){
- ifstream in("input.txt");
- int Max_length = -INF;
- int answer = -1;
- int cur_index = 0;
- string s;
- while(getline(in, s))
- {
- cur_index++;
- if (int(s.length()) > Max_length)
- {
- Max_length = s.length();
- answer = cur_index;
- }
- }
- cout << answer;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement