Hangzhou Electric HDU ACM ASCII code sequencing

Source: Internet
Author: User

ASCII-code Ordering Time limit:2000/1000 MS (java/others) Memory limit:65536/32768 K (java/others)
Total submission (s): 103963 Accepted Submission (s): 43442


Problem description Input Three characters, the ASCII code of each character is printed in order from small to large to output these three characters.
Input data has more than one group, each of which consists of three characters and no spaces between them.
Output for each set of input data, one line is printed, and the characters are separated by a space.
Sample Input
Qweasdzxc

Sample Output
e q wa d SC x z

Authorlcy Alas again to the last year to do water problems. The last year was a 2 start serial number. This year re-a it again. By the way, record the answer here. At the same time, I would like to compare two different times to do the same problem feeling. Isn't it simple?
#include <iostream> #include <algorithm>using namespace Std;int main () {char ls[4];while (cin>>ls[0] >>ls[1]>>ls[2] {sort (ls,ls+3);cout<<ls[0]<< "" <<ls[1]<< "" <<ls[2]< <endl;} return 0;}

Hangzhou Electric HDU ACM ASCII code sequencing

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.