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