Source code of the offoffoffer series-sequence of flipped words

Source: Internet
Author: User

Source code of the offoffoffer series-sequence of flipped words

Question 1361: flipped word order time limit: 2 seconds memory limit: 32 MB special question: No submitted: 1935 solution: 572 question Description: JOBDU recently came to a new employee Fish, every morning, I always hold an English magazine and write some sentences on the book. Cat, a colleague, is very interested in the content written by Fish. One day he borrowed it from Fish but did not understand it. For example, "student. a am I ". Later, I realized that this guy turned the order of sentence words. The correct sentence should be "I am a student .". Cat is not able to flip these words one by one. Can you help him? Input: one line for each test case, indicating an English sentence. We guarantee that the number of words in a sentence cannot exceed 600, and the length of each word cannot exceed 30. However, it should be noted that Fish is an informal person. Sometimes there may be many spaces in the middle of two words. For convenience, you can think that the total number of characters in a line is no more than 50000, And the punctuation can be processed like a regular letter. Output: For each test case, output a single line of correct sentences after turning. Sample input: student. a am II'm a Freshman and I like JOBDU! Sample output: I am a student. JOBDU! Like I and Freshman a I'm

# Include
 
  
# Include
  
   
# Include
   
    
Using namespace std; void reverseStr (char * begin, char * end) {if (begin = NULL | end = NULL) {return;} while (begin
    
     

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.