fork download
  1. #include <iostream>
  2. #include <cstring>
  3. using namespace std;
  4.  
  5. int main() {
  6. string st;
  7. while(getline(cin,st)){
  8. int size=st.size();
  9. int br=0;
  10. for(int i=0;i<size;i++){
  11. if(st[i]==' '){
  12. int x=i;
  13. if(br==0)
  14. x=i-1;
  15. else
  16. x=i;
  17. while(x>=br){
  18. cout<<st[x];
  19. x--;
  20. }
  21. br=i+1;
  22. }else if(st[i]=='.'){
  23. cout<<" ";
  24. int x=i;
  25. while(x>=br){
  26. cout<<st[x];
  27. x--;
  28. }
  29. br=i;
  30. }
  31. }
  32. cout<<endl;
  33. }
  34. return 0;
  35. }
Success #stdin #stdout 0s 4268KB
stdin
Assure polite his really and others figure though. Day age advantages end sufficient eat expression travelling. Of on am father by agreed supply rather either. Own handsome delicate its property mistress her end appetite. Mean are sons too sold nor said. Son share three men power boy you. Now merits wonder effect garret own. 

Attention he extremity unwilling on otherwise. Conviction up partiality as delightful is discovered. Yet jennings resolved disposed exertion you off. Left did fond drew fat head poor. So if he into shot half many long. China fully him every fat was world grave. 
This is the problem!!!
My email is a@aa@aaa.com@
every dot is a . but not all dots are .s
is it a good test case ?
aa.bb.aa.
a.....aaaa..a..a.a..a
''.'sd.f'df'.df.'f.'
...adf....fds....sdf
.,,;;,',[,;,

sdfklj ,s,df, /////sdfdf
123456 aasdf
     568  sdf a1b2c3 :)
i am r2d2.
adfsaf 4-34549230 3
adffsflkdajflkdsajflafda afdsf 9024334242342342
,.z,.czxvkjwoijeoinlkf 2890ilakjnnc
dsakff;kdsafdafsaf adfaf
stdout
erussA etilop sih yllaer dna srehto erugif .hguoht . yaD ega segatnavda dne tneiciffus tae noisserpxe .gnillevart . fO no ma rehtaf yb deerga ylppus rehtar .rehtie . nwO emosdnah etaciled sti ytreporp ssertsim reh dne .etiteppa . naeM era snos oot dlos ron .dias . noS erahs eerht nem rewop yob .uoy . woN stirem rednow tceffe terrag .nwo .

noitnettA eh ytimertxe gnilliwnu no .esiwrehto . noitcivnoC pu ytilaitrap sa lufthgiled si .derevocsid . teY sgninnej devloser desopsid noitrexe uoy .ffo . tfeL did dnof werd taf daeh .roop . oS fi eh otni tohs flah ynam .gnol . anihC ylluf mih yreve taf saw dlrow .evarg .
sihT si eht
yM liame si .aaa@aa@a
yreve tod si a . . tub ton lla stod era .
si ti a doog tset esac
 .aa .bb. .aa.
 .a .. .. .. .. .aaaa. .. .a. .. .a. .a. ..
 .'' .ds'. .'fd'f. .fd. .f'.
 . .. .. .fda. .. .. .. .sdf. .. .. ..
 .

jlkfds ,fd,s,
654321
     865  fds 3c2b1a
i ma .2d2r
fasfda 03294543-4
adfalfjasdklfjadklfsffda fsdfa
 ., .,z. fklnioejiowjkvxzc.
fasfadfasdk;ffkasd