Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // 35
- #include <iostream>
- #include <string>
- using namespace std;
- /*
- ัะตัั
- ss aa aab a b hhhh ss d sd sdd asdd nsha reol asa sd
- */
- int main()
- {
- int maxSize = 0;
- string word, str = "";
- while(cin >> word){
- if(word.size() > maxSize){
- maxSize = word.size();
- str.erase();
- str += word + " ";
- continue;
- }
- if(word.size() == maxSize){
- str += word + " ";
- continue;
- }
- }
- cout << str;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement