Test Bar Chart of level 10 secondary protection machine of xigong University, and dashboard of xigong University

Source: Internet
Author: User

Test Bar Chart of level 10 secondary protection machine of xigong University, and dashboard of xigong University
1021. Bar Chart

Time Limit: 1000 ms memory limit: 10000 K total time limit: 3000 ms

Description
Write a program and read four lines of uppercase letters (each line cannot exceed 80 characters ), print a vertical bar chart such as Sample Output to show the number of occurrences of each uppercase letter (only uppercase letters, spaces, numbers, and punctuation characters are displayed ).

Input
Enter four lines of ASCII code. Each line cannot exceed 80 characters.

Output
Form output. The end of any row in the output cannot contain useless spaces, and do not output any blank lines at the beginning.

Input example
The quick brown fox jumped over the lazy dog.
THIS IS AN EXAMPLE TO TEST FOR YOUR
Histogram program.
HELLO!


Output example
*
*
**
****
****
******
**********
*************
******************
**************************
A B C D E F G H I J K L M N O P Q R S T U V W X Y Z

Prompt

A appears 5 times. lazy an example histogram program. So there are 5 * Similarly, B appears once. C appears once. D appears twice. E appears 8 times ...... Then let's look at the first line of O and fill the back with spaces. Because there is nothing, of course, the corresponding * is output, and then press enter directly (the end of any row cannot contain useless spaces) after the last line outputs A-> Z, the carriage return is not required.

/*********************************** Author: grant Yuan time: 201410/4 source: Level 10 beiyan machine trial explain: Water question, in addition to strict format requirements *********************************** */# include <iostream> # include <cstdio> # include <cstring> # include <cstdlib> # include <algorithm> # include <queue> using namespace std; int n; char a [100]; int num [256]; int main () {memset (a, 0, sizeof (a); int k, d; for (k = 1; k <= 4; k ++) {memset (a, 0, sizeof (a); gets (); int l = strlen (a); for (int I = 0; I <l; I ++) {if (a [I] >='a' & A [I] <= 'Z') {num [a [I] ++ ;}}} int l1 = 'A', l2 = 'Z', m = 0; for (k = l1; k <= l2; k ++) {if (num [k]> m) m = num [k];} while (1) {for (k = l1; k <= l2; k ++) if (num [k]> = m) d = k; for (k = l1; k <= l2; k ++) {if (num [k]> = m) {if (k <d) printf ("*"); else printf ("*");} else {if (k <d) printf ("");}} m --; printf ("\ n"); if (m <= 0) break ;} printf ("a B c d e f g h I J K L M N O P Q R S T U V W X Y Z"); return 0 ;}



Xigong university insurance research

There is nothing wrong with it. The gap between the two groups is not big, that is, the number of projects in the hands is still guaranteed, and graduate students still get a lot of training.

Xigong university insurance research?

The top 25% of the professional scores, Level 4 460 or level 6 426, were not involved in the study. This is the requirement this year. Then, the school ranks the students from high to low. A bunch of students choose out-of-school insurance research, out-of-school orientation, the University's masters, the University's masters, and all the other students are masters. These are all pure scores, with no extra points. The number of research institutes in each school is different. There are still a lot of related policies, so I will not elaborate on them. As long as you are qualified for the research, you will attend the research meeting of the Institute. Of course, it doesn't mean that you will be able to be guaranteed if you have the qualification for insurance research. If you have chosen all of the top candidates, you will not be able to choose the ones that are not guaranteed, but if you choose to study in this school, there are still preferential policies. In addition, Tsinghua is a bug. As long as you are qualified for research, you can apply for a non-Warranty quota. However, you must submit materials within the period specified by Tsinghua. This year, I was late because of my absence from the school and missed the registration deadline for Tsinghua. If the family conditions permit, you can also consider applying for Foreign graduate students, but English must pass.

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.