logo资料库

华南师范大学ACM协会第一次考试试题.pdf

第1页 / 共5页
第2页 / 共5页
第3页 / 共5页
第4页 / 共5页
第5页 / 共5页
资料共5页,全文预览结束
SCNUSCNUSCNU Monthly Monthly Monthly SCNU Monthly Round Round 1111 Round Round designed Problems designed by:by:by:by: Problems designed Problems designed Problems Jiantao FengFeng Jiantao Jiantao Feng Jiantao Feng Mengchao Mengchao LiuLiuLiuLiu Mengchao Mengchao Yuansheng Yuansheng XueXueXueXue Yuansheng Yuansheng Difficulty Colour: Difficulty Colour: Difficulty Colour: Difficulty Colour: EasyEasy ● Easy Easy Medium Medium ● Medium Medium HardHard ● Hard Hard
Problem Problem 0000 Problem Problem A+BA+BA+BA+B Problem Problem Problem Problem 10001000 Limit: TimeTime 1000 MSMSMSMS Limit: Limit: 1000 Time Limit: Time Problem Description Problem Description Problem Description Problem Description Give you two numbers a and b ,calculate a + b. Input Input Input Input Multiple test cases . Each test case has two numbers a and b. Output Output Output Output Output a + b in one line. SSSSample ample Input ample Input ample Input Input 1 1 2 2 3 3 4 4 5 5 Sample Output Sample Output Sample Output Sample Output 2 4 6 8 10 HINTHINT HINT HINT 初次接触编程比赛的同学请注意,在输入 a 和 b 之前不需要任何提示性的语句(诸 如:cout<<”请输入两个数 a,b:”等语句,直接输入 a 和 b 即可).例如下面的代码就是错误 的: #include void main() { int a , b; cout << ”请输入两个数 a,b:” << endl; cin >> a >> b; cout << a + b << endl; } 比赛开始 15 分钟之后,裁判会通过飞鸽传书发送此题的正确代码给大家,有不明白的同学可 以认真琢磨一番,或者举手示意向工作人员求助.
Problem Problem AAAA Problem Problem withwith money Share with youyouyouyou Share money money with Share money Share Limit: TimeTime 1000 MSMSMSMS 10001000 Limit: Limit: 1000 Time Limit: Time Problem Description Problem Description Problem Description Problem Description LYF is an extremely rich man as well as generous. One day he wants to distribute his possessions among 2010 children. He claims that he possesses N credit cards and each of them contains fabulous pounds. But it is difficult to guarantee every child can get equal part. So he wants to reserve some money after every child gets the same amount of money and as much as possible. All children may get nothing if they can't share the same amount of money and LYF can reserve all the money consequently. For example, if the total money is 2009, then no child can get any money; if the total money is 2010 then LYF reserves 0 pound, and he should reserve 1 money if the total money is 2011. Now the problem is how much money should he reserve? Can you help him? Input Input Input Input There are multiple test cases. Process to end of file. In each test case, an integer N ( N <= 2012 ) comes first, indicates that there are N credit cards. The following N lines , each line contains one positive integer, which means the money in the credit card. Output Output Output Output Output "Case #: X" in each line for every test case, '#'means the integer of the test case which starts from 1, 'X' specifies the money LYF should reserve. Sample Input Sample Input Sample Sample Input Input 1 2009 2 0 2010 2 2010 1 Sample Output Sample Output Sample Sample Output Output Case 1: 2009 Case 2: 0 Case 3: 1 Source Source Source Source South China Normal University Monthly Round 1
Problem Problem BBBB Problem Problem Little Little LYFLYFLYFLYF Little Little 10001000 Limit: TimeTime 1000 MMMMSSSS Limit: Limit: 1000 Time Limit: Time Problem Description Problem Description Problem Description Problem Description When LYF was 4 years old , he begins kindergarten. One day , the teacher gave every children n pieces of building blocks while are put in a line . Every block's size is 1*1*h , while h is the height of the block . Children can only use the 1*1 side as the bottom and put the blocks together in line to build " buildings " . Now the teacher asked everyone to choose a continuous part of the blocks , and then put them together in line to build artistic "buildings"(a "building" can be consider as an artistic "building" only if the heights of the blocks used to build the "building" are in rising order and the heights of them are successive numbers , also , it can not exist two blocks have the same height ) . And there is an artistic value of an artistic "building" that determined by the number of blocks used to build the " building ". The teacher said she will award the child who can build the most artistic "building" by a kiss . As the teacher is beautiful , LYF had fallen in love with the teacher secretly . So he want to build the most artistic "building" to get the kiss . But to build the most artistic "building" is a hard work because of the total number of the blocks is too large . Can you help LYF to get the kiss? Input Input Input Input Input contains multiple test cases. Process to end of file. Each test case starts with an integer n (n<=200), indicates the total number of the building blocks that teacher gave to children . Then follows n numbers , indicates the height of n blocks(0<=height<=1000). Output Output Output Output For each test case , output "Case T:"(T is the number of the test case) in the first line , then output the maximum artistic value that LYF can get from the blocks given by the teacher in the second line. Sample Input Sample Input Sample Sample Input Input 7 3 1 2 5 8 9 4 3 1 5 1 Sample Output Sample Output Sample Sample Output Output Case 1: 3 Case 2: 1 Source Source Source Source South China Normal University Monthly Round 1
Problem Problem CCCC Problem Problem Sending CCCChrysanthemum Sending Planting andandandand Sending Planting hrysanthemum Planting Sending hrysanthemum Planting hrysanthemum Limit: TimeTime Limit: 3333000000000000 MMMMSSSS Limit: Time Limit: Time Problem Description Problem Description Problem Description Problem Description Once LYF passed by a cemetery , he discovered that many of the tombs have no flowers . He think they were poor . So he want to build some farms to plant chrysanthemum to send to the death . Considering the environment of planting chrysanthemum , he would like to build the farms near a river ( X-axis is the river in the map , in other words , farms can only be build on X-axis ) . Now , there are N cemetery LYF wants to send flowers to . And he wants to build m farms . At the same time , he wants to make the sum of the transportation distance minimum . He think it is a difficult problem , can you help him to calculate the minimum sum of transportation distance? Input Input Input Input Input contains multiple test cases. Process to end of file. Each test case contains an N and M(1<=N,M<=100), indicates the number of the cemetery LYF wants to send flowers to and the farm LYF wants to build . Then N lines flower , each line contains two floating numbers X and Y , indicates the coordinate of the cemetery(-10000<=X,Y<=10000). Output Output Output Output For each test case , output the minimum sum of transportation distance , the number should be corrected to 1 digits after the decimal point. Sample Input Sample Input Sample Sample Input Input 3 1 0 1.0 1.0 1.0 2.0 1.0 2 1 0 1.0 3.0 3.0 Sample Output Sample Output Sample Sample Output Output 3.8 5.0 HINTHINT HINT HINT If your answer is not equal to the standard answer and the error (误差) is not exceed 1% of the standard answer ,it is accepted. Source Source Source Source South China Normal University Monthly Round 1
分享到:
收藏