Pro.ID22481 TitleScatter Point Plot Title链接http://10.20.2.8/oj/exercise/problem?problem_id=22481 AC0 Submit0 Ratio- 时间&空间限制描述This problem deals with generating a plot of points that fit on the display screen. The Y axis is vertical and contains 20 lines (one Y value for each row); the X axis is horizontal and contains 12 positions (each X value takes 5 columns). 输入1st line low X value and X axis increment Followed by one X value and one Y value per line. They will be positive integers up to 4 digits. 输出Description This problem deals with generating a plot of points that fit on the display screen. The Y axis is vertical and contains 20 lines (one Y value for each row); the X axis is horizontal and contains 12 positions (each X value takes 5 columns). Input 1st line low X value and X axis increment Followed by one X value and one Y value per line. They will be positive integers up to 4 digits. Output Using the screen, character display a X, Y plot including grid lines and axis labelling. All pairs of X, Y values will be inputted and the lowest and highest needs to be found to determine scaling values. The increment for each row or column will be based on 20 positions for the Y axis and 12 for the X axis. When establishing what position a value will fall on rounding is to be done up at the halfway point to the next increment value. If only one X, Y value falls at a particular point display the character 1. If two X, Y values fall at a particular point display the character 2; if three X, Y values fall at a particular point display the character 3; etc. Sample Input 100 50 Sample Output 95: 90: 85: 2 80: 75: 70: 65: 60: 55: 50: 45: 1 40: 35: 30: 25: 1 20: 2 1 1 15: 10: 1 5: 1 1 0: 1 2 +----+----+----+----+----+----+----+----+----+----+----+----+ 100 150 200 250 300 350 400 450 500 550 600 650 Source 样例输入100 50 样例输出 95: 90: 85: 2 80: 75: 70: 65: 60: 55: 50: 45: 1 40: 35: 30: 25: 1 20: 2 1 1 15: 10: 1 5: 1 1 0: 1 2 +----+----+----+----+----+----+----+----+----+----+----+----+ 100 150 200 250 300 350 400 450 500 550 600 650 作者 |