language: C++ (gcc-4.3.4)
date: 108 days 0 hours ago
link:
visibility: public
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
#include<iostream>
#include<stdio.h>
#include<string>
 
using namespace std;
void solve();
 
int main()
{
        int t;
        cin>>t;
        while(t--)      solve();        
        return 0;
}
 
void solve()
{
        string s;
        char a;
        a=getchar();
        while(1)
        {
                if(a==' ')
                {
                        a=getchar();
                        continue;
                }
                else
                {
                        s+=a;
                        while(a!='\n'||a!=' ')
                                a=getchar();
                        if(a=='\n')     break;
                }
        }
        cout<<s<<"\n";
}